On Thu, Apr 13, 2017 at 08:58:11AM -0400, Sven Van Asbroeck wrote: > gpio-only driver operation never clears the SLEEP bit, which can > cause the gpios to become unusable. > > Example: > 1. user requests first pwm -> driver clears SLEEP bit > 2. user frees last pwm -> driver sets SLEEP bit > 3. user requests gpio > 4. user switches gpio on -> output does not turn on > because SLEEP bit is set > > Prevent this behaviour by letting the runtime_pm framework > control the SLEEP bit. This will put the chip to SLEEP if > no pwms/gpios are exported/in use. > > Fixes: bccec89f0a35 ("Allow any of the 16 PWMs to be used as a GPIO") > Reported-by: Sven Van Asbroeck > Signed-off-by: Sven Van Asbroeck > Suggested-by: Mika Westerberg > Reviewed-by: Mika Westerberg > --- > drivers/pwm/pwm-pca9685.c | 112 ++++++++++++++++++++++++++++++++-------------- > 1 file changed, 79 insertions(+), 33 deletions(-) Applied with s/gpio/GPIO/ and s/pwm/PWM/. Thanks, Thierry