Commit d9eb24c6 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Thierry Reding

pwm: stmpe: Silence duplicate error messages

stmpe_reg_read() and stmpe_reg_write() already emit error messages when
they fail. So the extra error messages in the pwm driver are only little
useful. They are useful in some situation, as they give a bit of context
to the failing register write. So don't remove them but degrade them to
dev_dbg().
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent efb704ab
...@@ -44,7 +44,7 @@ static int stmpe_24xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) ...@@ -44,7 +44,7 @@ static int stmpe_24xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
ret = stmpe_reg_read(stmpe_pwm->stmpe, STMPE24XX_PWMCS); ret = stmpe_reg_read(stmpe_pwm->stmpe, STMPE24XX_PWMCS);
if (ret < 0) { if (ret < 0) {
dev_err(chip->dev, "error reading PWM#%u control\n", dev_dbg(chip->dev, "error reading PWM#%u control\n",
pwm->hwpwm); pwm->hwpwm);
return ret; return ret;
} }
...@@ -53,7 +53,7 @@ static int stmpe_24xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) ...@@ -53,7 +53,7 @@ static int stmpe_24xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
ret = stmpe_reg_write(stmpe_pwm->stmpe, STMPE24XX_PWMCS, value); ret = stmpe_reg_write(stmpe_pwm->stmpe, STMPE24XX_PWMCS, value);
if (ret) { if (ret) {
dev_err(chip->dev, "error writing PWM#%u control\n", dev_dbg(chip->dev, "error writing PWM#%u control\n",
pwm->hwpwm); pwm->hwpwm);
return ret; return ret;
} }
...@@ -70,7 +70,7 @@ static int stmpe_24xx_pwm_disable(struct pwm_chip *chip, ...@@ -70,7 +70,7 @@ static int stmpe_24xx_pwm_disable(struct pwm_chip *chip,
ret = stmpe_reg_read(stmpe_pwm->stmpe, STMPE24XX_PWMCS); ret = stmpe_reg_read(stmpe_pwm->stmpe, STMPE24XX_PWMCS);
if (ret < 0) { if (ret < 0) {
dev_err(chip->dev, "error reading PWM#%u control\n", dev_dbg(chip->dev, "error reading PWM#%u control\n",
pwm->hwpwm); pwm->hwpwm);
return ret; return ret;
} }
...@@ -79,7 +79,7 @@ static int stmpe_24xx_pwm_disable(struct pwm_chip *chip, ...@@ -79,7 +79,7 @@ static int stmpe_24xx_pwm_disable(struct pwm_chip *chip,
ret = stmpe_reg_write(stmpe_pwm->stmpe, STMPE24XX_PWMCS, value); ret = stmpe_reg_write(stmpe_pwm->stmpe, STMPE24XX_PWMCS, value);
if (ret) if (ret)
dev_err(chip->dev, "error writing PWM#%u control\n", dev_dbg(chip->dev, "error writing PWM#%u control\n",
pwm->hwpwm); pwm->hwpwm);
return ret; return ret;
} }
...@@ -233,7 +233,7 @@ static int stmpe_24xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, ...@@ -233,7 +233,7 @@ static int stmpe_24xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
ret = stmpe_reg_write(stmpe_pwm->stmpe, offset, value); ret = stmpe_reg_write(stmpe_pwm->stmpe, offset, value);
if (ret) { if (ret) {
dev_err(chip->dev, "error writing register %02x: %d\n", dev_dbg(chip->dev, "error writing register %02x: %d\n",
offset, ret); offset, ret);
return ret; return ret;
} }
...@@ -242,7 +242,7 @@ static int stmpe_24xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, ...@@ -242,7 +242,7 @@ static int stmpe_24xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
ret = stmpe_reg_write(stmpe_pwm->stmpe, offset, value); ret = stmpe_reg_write(stmpe_pwm->stmpe, offset, value);
if (ret) { if (ret) {
dev_err(chip->dev, "error writing register %02x: %d\n", dev_dbg(chip->dev, "error writing register %02x: %d\n",
offset, ret); offset, ret);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment