Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1619799

Re: [PATCH 1/1] pwm: pca9685: fix gpio-only operation.

From Mika Westerberg <mika.westerberg@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] pwm: pca9685: fix gpio-only operation.
Date 2017-04-10 12:40 +0200
Message-ID <tuETM-7TH-29@gated-at.bofh.it> (permalink)
References <tunJg-5bL-15@gated-at.bofh.it> <tunJg-5bL-17@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


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 <TheSven73@googlemail.com>

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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/1] pwm: pca9685: fix gpio-only operation. Sven Van Asbroeck <thesven73@gmail.com> - 2017-04-09 18:20 +0200
  [PATCH 1/1] pwm: pca9685: fix gpio-only operation. Sven Van Asbroeck <thesven73@gmail.com> - 2017-04-09 18:20 +0200
    Re: [PATCH 1/1] pwm: pca9685: fix gpio-only operation. Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-04-10 12:40 +0200
      Re: [PATCH 1/1] pwm: pca9685: fix gpio-only operation. Sven Van Asbroeck <thesven73@gmail.com> - 2017-04-10 18:10 +0200
      Re: [PATCH 1/1] pwm: pca9685: fix gpio-only operation. Sven Van Asbroeck <thesven73@gmail.com> - 2017-04-11 05:40 +0200
        Re: [PATCH 1/1] pwm: pca9685: fix gpio-only operation. Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-04-11 11:20 +0200

csiph-web