pwm: pca9685: Fix regression for GPIO use
PATCH 1/1 pwm: pca9685: Fix regression for GPIO use
The commit e926b12c611c ("pwm: Clear chip_data in pwm_put()") breaks GPIO usage by actually removing a crucial call to pwm_set_chip_data(), which is being used as a flag to understand the mode (GPIO vs. PWM) in which pin is currently working. Now, if once I requested GPIO, I may not be able to free and request it again.
Fixes e926b12c611c ("pwm: Clear chip_data in pwm_put()") breaks GPIO usage
Cc Mika Westerberg <[email protected]>
Cc Uwe Kleine-König <[email protected]>
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/pwm/pwm-pca9685.c | 1 + 1 file changed, 1 insertion(+)
drivers/pwm/pwm-pca9685.c +1 -0
@@ -165,6 +165,7 @@ static void pca9685_pwm_gpio_free(struct gpio_chip *gpio, unsigned int offset)pm_runtime_put (pca->chip.dev);mutex_lock (&pca->lock); pwm = &pca->chip.pwms[offset]; +pwm_set_chip_data (pwm,NULL );mutex_unlock (&pca->lock); }
Signature · 1 line
2.23.0.rc1