linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Sven Van Asbroeck <thesven73@gmail.com>
Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org,
	clemens.gruber@pqgruber.com, mika.westerberg@linux.intel.com,
	andriy.shevchenko@linux.intel.com,
	Sven Van Asbroeck <TheSven73@googlemail.com>
Subject: Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation.
Date: Thu, 13 Apr 2017 17:34:16 +0200	[thread overview]
Message-ID: <20170413153416.GD27388@ulmo.ba.sec> (raw)
In-Reply-To: <1492088291-5215-2-git-send-email-svenv@arcx.com>

[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]

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 <TheSven73@googlemail.com>
> Signed-off-by: Sven Van Asbroeck <TheSven73@googlemail.com>
> Suggested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
>  drivers/pwm/pwm-pca9685.c | 112 ++++++++++++++++++++++++++++++++--------------
>  1 file changed, 79 insertions(+), 33 deletions(-)

Applied with s/gpio/GPIO/ and s/pwm/PWM/.

Thanks,
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-04-13 15:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-13 12:58 [PATCH v4 0/1] pwm: pca9685: fix gpio-only operation Sven Van Asbroeck
2017-04-13 12:58 ` [PATCH v4 1/1] " Sven Van Asbroeck
2017-04-13 15:34   ` Thierry Reding [this message]
2017-04-18  9:14   ` Andy Shevchenko
2017-04-18 15:52     ` Sven Van Asbroeck
2017-04-19 20:24       ` Mika Westerberg
2017-04-20  7:29       ` Andy Shevchenko
2017-04-20 14:12         ` Sven Van Asbroeck
2017-04-20 15:07           ` Andy Shevchenko
2017-04-20 15:50             ` Sven Van Asbroeck
2017-04-20 16:13               ` Andy Shevchenko
2017-04-20 15:55             ` Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170413153416.GD27388@ulmo.ba.sec \
    --to=thierry.reding@gmail.com \
    --cc=TheSven73@googlemail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=clemens.gruber@pqgruber.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=thesven73@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).