linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
	linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	kernel@pengutronix.de, Shawn Guo <shawn.guo@linaro.org>,
	Matt Sealey <matt@genesi-usa.com>
Subject: Re: [PATCH 2/3] leds/pwm: Don't disable pwm when setting brightness to 0
Date: Mon, 2 Dec 2013 13:33:19 +0100	[thread overview]
Message-ID: <20131202123318.GC12793@ulmo.nvidia.com> (raw)
In-Reply-To: <1385412225-29740-3-git-send-email-u.kleine-koenig@pengutronix.de>

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

On Mon, Nov 25, 2013 at 09:43:44PM +0100, Uwe Kleine-König wrote:
> This fixes disabling the LED on i.MX28. The PWM hardware delays using
> the newly set pwm-config until the beginning of a new period. It's very
> likely that pwm_disable is called before the current period ends. In
> case the LED was on brightness=max before the LED stays on because in
> the disabled PWM block the period never ends.
> 
> Also only call pwm_enable only once in the probe call back and the
> matching pwm_disable in .remove(). Moreover the pwm is explicitly
> initialized to off.

While I do understand the reasoning behind this, if this is really the
behaviour that we need then there's no use in having pwm_enable() and
pwm_disable() at all. They can just be folded into pwm_get() and
pwm_put(), respectively.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-12-02 12:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 20:43 [PATCH 0/3] leds/pwm: don't call pwm_disable when setting brightness Uwe Kleine-König
2013-11-25 20:43 ` [PATCH 1/3] pwm/doc: Clearify that the pin state after pwm_disable is undefined Uwe Kleine-König
2013-11-25 20:43 ` [PATCH 2/3] leds/pwm: Don't disable pwm when setting brightness to 0 Uwe Kleine-König
2013-12-02 12:33   ` Thierry Reding [this message]
2013-12-02 13:18     ` Uwe Kleine-König
2013-12-05 21:26       ` Uwe Kleine-König
2013-12-11 15:30         ` Thierry Reding
2013-12-12 21:10           ` Uwe Kleine-König
2013-11-25 20:43 ` [PATCH 3/3] leds/pwm: fix driver description and make license match the header Uwe Kleine-König
2015-11-19 19:17   ` Uwe Kleine-König
2015-11-20  9:36     ` Jacek Anaszewski
2014-02-21 14:15 ` [PATCH 0/3] leds/pwm: don't call pwm_disable when setting brightness Uwe Kleine-König

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=20131202123318.GC12793@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=cooloney@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=matt@genesi-usa.com \
    --cc=rpurdie@rpsys.net \
    --cc=shawn.guo@linaro.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).