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>
This commit is contained in:
Родитель
c79468b895
Коммит
4537e52a52
|
@ -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));
|
||||
|
|
Загрузка…
Ссылка в новой задаче