summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorStefan Wahren <wahrenst@gmx.net>2019-08-24 16:09:46 +0200
committerThierry Reding <thierry.reding@gmail.com>2019-09-21 01:22:42 +0200
commit4537e52a526698f503dcb151234414cfa46d534b (patch)
tree02fc0999dd0085c95eb85db55331d3d6157eb4f6 /drivers/pwm
parentc79468b8955b4924b5aca858247395265201ac42 (diff)
pwm: bcm2835: Suppress error message for invalid period_ns
The PWM config can be triggered via sysfs, so we better suppress the error message in case of an invalid period to avoid kernel log spamming. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-bcm2835.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
index f6fe0b922e1e..52763063c100 100644
--- a/drivers/pwm/pwm-bcm2835.c
+++ b/drivers/pwm/pwm-bcm2835.c
@@ -72,11 +72,8 @@ static int bcm2835_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
scaler = DIV_ROUND_CLOSEST(NSEC_PER_SEC, rate);
- if (period_ns <= MIN_PERIOD) {
- dev_err(pc->dev, "period %d not supported, minimum %d\n",
- period_ns, MIN_PERIOD);
+ if (period_ns <= MIN_PERIOD)
return -EINVAL;
- }
writel(DIV_ROUND_CLOSEST(duty_ns, scaler),
pc->base + DUTY(pwm->hwpwm));