Skip to content

Commit d9eb24c

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
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: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent efb704a commit d9eb24c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/pwm/pwm-stmpe.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static int stmpe_24xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
4444

4545
ret = stmpe_reg_read(stmpe_pwm->stmpe, STMPE24XX_PWMCS);
4646
if (ret < 0) {
47-
dev_err(chip->dev, "error reading PWM#%u control\n",
47+
dev_dbg(chip->dev, "error reading PWM#%u control\n",
4848
pwm->hwpwm);
4949
return ret;
5050
}
@@ -53,7 +53,7 @@ static int stmpe_24xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
5353

5454
ret = stmpe_reg_write(stmpe_pwm->stmpe, STMPE24XX_PWMCS, value);
5555
if (ret) {
56-
dev_err(chip->dev, "error writing PWM#%u control\n",
56+
dev_dbg(chip->dev, "error writing PWM#%u control\n",
5757
pwm->hwpwm);
5858
return ret;
5959
}
@@ -70,7 +70,7 @@ static int stmpe_24xx_pwm_disable(struct pwm_chip *chip,
7070

7171
ret = stmpe_reg_read(stmpe_pwm->stmpe, STMPE24XX_PWMCS);
7272
if (ret < 0) {
73-
dev_err(chip->dev, "error reading PWM#%u control\n",
73+
dev_dbg(chip->dev, "error reading PWM#%u control\n",
7474
pwm->hwpwm);
7575
return ret;
7676
}
@@ -79,7 +79,7 @@ static int stmpe_24xx_pwm_disable(struct pwm_chip *chip,
7979

8080
ret = stmpe_reg_write(stmpe_pwm->stmpe, STMPE24XX_PWMCS, value);
8181
if (ret)
82-
dev_err(chip->dev, "error writing PWM#%u control\n",
82+
dev_dbg(chip->dev, "error writing PWM#%u control\n",
8383
pwm->hwpwm);
8484
return ret;
8585
}
@@ -233,7 +233,7 @@ static int stmpe_24xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
233233

234234
ret = stmpe_reg_write(stmpe_pwm->stmpe, offset, value);
235235
if (ret) {
236-
dev_err(chip->dev, "error writing register %02x: %d\n",
236+
dev_dbg(chip->dev, "error writing register %02x: %d\n",
237237
offset, ret);
238238
return ret;
239239
}
@@ -242,7 +242,7 @@ static int stmpe_24xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
242242

243243
ret = stmpe_reg_write(stmpe_pwm->stmpe, offset, value);
244244
if (ret) {
245-
dev_err(chip->dev, "error writing register %02x: %d\n",
245+
dev_dbg(chip->dev, "error writing register %02x: %d\n",
246246
offset, ret);
247247
return ret;
248248
}

0 commit comments

Comments
 (0)