diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-12-10 00:00:46 +0100 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2023-12-20 17:01:43 +0100 |
commit | 4430d02dc1dfb811b0b39bb58662f006f1e4749d (patch) | |
tree | e61157286710c4738c177588bd6f35fd86ddd1c7 /drivers/pwm | |
parent | pwm: meson: Simplify using dev_err_probe() (diff) | |
download | linux-4430d02dc1dfb811b0b39bb58662f006f1e4749d.tar.xz linux-4430d02dc1dfb811b0b39bb58662f006f1e4749d.zip |
pwm: lpc18xx-sct: Don't modify the cached period of other PWM outputs
Even though the hardware only supports a single period for all PWM
outputs, modifying the other (disabled) outputs's period is strange and
wrong. Only the pwm core is supposed to update these values.
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')
-rw-r--r-- | drivers/pwm/pwm-lpc18xx-sct.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-lpc18xx-sct.c b/drivers/pwm/pwm-lpc18xx-sct.c index b3d4a955aa31..fe891fa71a1d 100644 --- a/drivers/pwm/pwm-lpc18xx-sct.c +++ b/drivers/pwm/pwm-lpc18xx-sct.c @@ -194,7 +194,7 @@ static int lpc18xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, int duty_ns, int period_ns) { struct lpc18xx_pwm_chip *lpc18xx_pwm = to_lpc18xx_pwm_chip(chip); - int requested_events, i; + int requested_events; if (period_ns < lpc18xx_pwm->min_period_ns || period_ns > lpc18xx_pwm->max_period_ns) { @@ -223,8 +223,6 @@ static int lpc18xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, if ((requested_events <= 2 && lpc18xx_pwm->period_ns != period_ns) || !lpc18xx_pwm->period_ns) { lpc18xx_pwm->period_ns = period_ns; - for (i = 0; i < chip->npwm; i++) - pwm_set_period(&chip->pwms[i], period_ns); lpc18xx_pwm_config_period(chip, period_ns); } |