From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Thierry Reding <thierry.reding@gmail.com>
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: Thu, 5 Dec 2013 22:26:41 +0100 [thread overview]
Message-ID: <20131205212641.GC4707@pengutronix.de> (raw)
In-Reply-To: <20131202131807.GC29721@pengutronix.de>
Hello Thierry,
On Mon, Dec 02, 2013 at 02:18:07PM +0100, Uwe Kleine-König wrote:
> On Mon, Dec 02, 2013 at 01:33:19PM +0100, Thierry Reding wrote:
> > 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.
> So after the first pwm_get the pwm starts with an unspecified duty
> cycle? That's not that nice, is it?
How can we come forward here? After all it's a real bug being fixed.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
WARNING: multiple messages have this Message-ID (diff)
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] leds/pwm: Don't disable pwm when setting brightness to 0
Date: Thu, 5 Dec 2013 22:26:41 +0100 [thread overview]
Message-ID: <20131205212641.GC4707@pengutronix.de> (raw)
In-Reply-To: <20131202131807.GC29721@pengutronix.de>
Hello Thierry,
On Mon, Dec 02, 2013 at 02:18:07PM +0100, Uwe Kleine-K?nig wrote:
> On Mon, Dec 02, 2013 at 01:33:19PM +0100, Thierry Reding wrote:
> > 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.
> So after the first pwm_get the pwm starts with an unspecified duty
> cycle? That's not that nice, is it?
How can we come forward here? After all it's a real bug being fixed.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2013-12-05 21:26 UTC|newest]
Thread overview: 24+ 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 ` 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 ` 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-11-25 20:43 ` Uwe Kleine-König
2013-12-02 12:33 ` Thierry Reding
2013-12-02 12:33 ` Thierry Reding
2013-12-02 13:18 ` Uwe Kleine-König
2013-12-02 13:18 ` Uwe Kleine-König
2013-12-05 21:26 ` Uwe Kleine-König [this message]
2013-12-05 21:26 ` Uwe Kleine-König
2013-12-11 15:30 ` Thierry Reding
2013-12-11 15:30 ` Thierry Reding
2013-12-12 21:10 ` Uwe Kleine-König
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
2013-11-25 20:43 ` Uwe Kleine-König
2015-11-19 19:17 ` Uwe Kleine-König
2015-11-19 19:17 ` Uwe Kleine-König
2015-11-20 9:36 ` Jacek Anaszewski
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
2014-02-21 14:15 ` 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=20131205212641.GC4707@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--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=thierry.reding@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.