1
0
Fork 0

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>
alistair/sunxi64-5.4-dsi
Stefan Wahren 2019-08-24 16:09:46 +02:00 committed by Thierry Reding
parent c79468b895
commit 4537e52a52
1 changed files with 1 additions and 4 deletions

View File

@ -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));