diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-12-06 18:30:43 +0100 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2023-12-20 16:25:43 +0100 |
commit | d9eb24c6f499bf8f6625c5fea05d7511a2fecf52 (patch) | |
tree | 7fab8fbe03928b6a0337420aa6903782aa0e0998 /drivers/pwm/pwm-stmpe.c | |
parent | pwm: Reduce number of pointer dereferences in pwm_device_request() (diff) | |
download | linux-d9eb24c6f499bf8f6625c5fea05d7511a2fecf52.tar.xz linux-d9eb24c6f499bf8f6625c5fea05d7511a2fecf52.zip |
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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-stmpe.c')
-rw-r--r-- | drivers/pwm/pwm-stmpe.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pwm/pwm-stmpe.c b/drivers/pwm/pwm-stmpe.c index d730631c6583..19c0c0f39675 100644 --- a/drivers/pwm/pwm-stmpe.c +++ b/drivers/pwm/pwm-stmpe.c @@ -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); 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); return ret; } @@ -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); if (ret) { - dev_err(chip->dev, "error writing PWM#%u control\n", + dev_dbg(chip->dev, "error writing PWM#%u control\n", pwm->hwpwm); return ret; } @@ -70,7 +70,7 @@ static int stmpe_24xx_pwm_disable(struct pwm_chip *chip, ret = stmpe_reg_read(stmpe_pwm->stmpe, STMPE24XX_PWMCS); 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); return ret; } @@ -79,7 +79,7 @@ static int stmpe_24xx_pwm_disable(struct pwm_chip *chip, ret = stmpe_reg_write(stmpe_pwm->stmpe, STMPE24XX_PWMCS, value); if (ret) - dev_err(chip->dev, "error writing PWM#%u control\n", + dev_dbg(chip->dev, "error writing PWM#%u control\n", pwm->hwpwm); return ret; } @@ -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); if (ret) { - dev_err(chip->dev, "error writing register %02x: %d\n", + dev_dbg(chip->dev, "error writing register %02x: %d\n", offset, ret); return ret; } @@ -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); if (ret) { - dev_err(chip->dev, "error writing register %02x: %d\n", + dev_dbg(chip->dev, "error writing register %02x: %d\n", offset, ret); return ret; } |