[lkml]   [2017]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/1] pwm: pca9685: fix gpio-only operation.
On Sun, Apr 09, 2017 at 12:11:24PM -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 keeping the SLEEP bit cleared
> for the lifetime of the driver instance.
> Fixes: bccec89f0a35 ("Allow any of the 16 PWMs to be used as a GPIO")
> Signed-off-by: Sven Van Asbroeck <>

How about implementing a real runtime PM in the driver? Then when the
device is idle regardless of whether it is GPIO or PWM, the SLEEP bit is
set and cleared accordingly.

 \ /
  Last update: 2017-04-10 12:34    [W:0.079 / U:5.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site