Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pwm: pca9685: Don't disable hardware in .free()

It's the responsibility of the consumer to disable the hardware before
it's released. And there are use cases where it's beneficial to keep the
PWM on, e.g. to keep a backlight on before kexec()ing into a new kernel.

Even if it would be considered right to disable on pwm_put(), this
should be done in the core and not each individual driver. So drop the
hardware access in .free().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/1ee1a514aeb5f0effafa2d6ec91bc54130895cd9.1753784092.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>

authored by

Uwe Kleine-König and committed by
Uwe Kleine-König
ca478d8a d8af3812

-1
-1
drivers/pwm/pwm-pca9685.c
··· 497 497 struct pca9685 *pca = to_pca(chip); 498 498 499 499 mutex_lock(&pca->lock); 500 - pca9685_pwm_set_duty(chip, pwm->hwpwm, 0); 501 500 clear_bit(pwm->hwpwm, pca->pwms_enabled); 502 501 mutex_unlock(&pca->lock); 503 502