From: Alex Courbot <acourbot@nvidia.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Stephen Warren <swarren@nvidia.com>,
Thierry Reding <thierry.reding@avionic-design.de>,
Simon Glass <sjg@chromium.org>,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Anton Vorontsov <cbou@mail.ru>,
David Woodhouse <dwmw2@infradead.org>,
Arnd Bergmann <arnd@arndb.de>,
"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH v5 2/4] pwm_backlight: use power sequences
Date: Fri, 07 Sep 2012 08:28:17 +0000 [thread overview]
Message-ID: <2360396.YKI4EihrfI@percival> (raw)
In-Reply-To: <50478B07.4080708@wwwdotorg.org>
On Thursday 06 September 2012 01:25:27 Stephen Warren wrote:
> On 08/31/2012 05:34 AM, Alexandre Courbot wrote:
> > Make use of the power sequences specified in the device tree or platform
> > data to control how the backlight is powered on and off.
> >
> > +++ b/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt
> >
> > Optional properties:
> > - - pwm-names: a list of names for the PWM devices specified in the
> > - "pwms" property (see PWM binding[0])
> > + - pwm-names: name for the PWM device specified in the "pwms" property
> > (see PWM + binding[0]). Necessary if power sequences are used
>
> So this implies that power sequence are completely optional in the pwm
> binding...
>
> > diff --git a/drivers/video/backlight/Kconfig
> > b/drivers/video/backlight/Kconfig>
> > config BACKLIGHT_PWM
> >
> > tristate "Generic PWM based Backlight Driver"
> > depends on PWM
> >
> > + select POWER_SEQ
>
> ... but that implies they're basically mandatory.
>
> Briefly looking at the code, power sequences don't appear to be
> optional, at least for the DT case, so perhaps you just need to update
> the documentation to make "pwm-names" non-optional?
This has to do with how power sequences are enabled during the build. Instead
of providing yet-another-kernel-option, I thought it would be better to make
it invisible and let drivers that take advantage of power seqs enable the
option by themselves when they are selected. That's why power sequences are
unconditionally compiled when pwm-backlight is selected.
But on the other hand, pwm-backlight already has a DT interface that does not
use power sequences, and its current users are still relying on the legacy
platform data interface (with one PWM and some callback functions). Making the
power sequences mandatory in the DT bindings would make it impossible to use
that legacy interface.
We could make power sequences an option of its own and add #ifdefs to drivers
that use it to lift this ambiguity, but I like the transparency of the current
way. It also seems hard (illegal?) to get rid of the legacy DT interface.
Alex.
next prev parent reply other threads:[~2012-09-07 8:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-31 11:34 [PATCH v5 0/4] Runtime Interpreted Power Sequences Alexandre Courbot
[not found] ` <1346412846-17102-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-08-31 11:34 ` [PATCH v5 1/4] " Alexandre Courbot
2012-09-05 17:19 ` Stephen Warren
2012-09-07 8:21 ` Alex Courbot
2012-09-06 14:14 ` Heiko Stübner
[not found] ` <201209061614.54022.heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
2012-09-07 8:04 ` Alex Courbot
2012-09-07 8:15 ` Mark Brown
2012-09-07 9:08 ` Heiko Stübner
[not found] ` <201209071108.42083.heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
2012-09-07 16:36 ` Stephen Warren
2012-08-31 11:34 ` [PATCH v5 2/4] pwm_backlight: use power sequences Alexandre Courbot
[not found] ` <1346412846-17102-3-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-09-05 17:25 ` Stephen Warren
2012-09-07 8:28 ` Alex Courbot [this message]
2012-09-07 8:29 ` Mark Brown
[not found] ` <20120907082835.GC17749-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-09-07 8:34 ` Alex Courbot
2012-08-31 11:34 ` [PATCH v5 3/4] tegra: dt: add label to tegra20's PWM Alexandre Courbot
2012-08-31 11:34 ` [PATCH v5 4/4] tegra: ventana: add pwm backlight DT nodes Alexandre Courbot
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=2360396.YKI4EihrfI@percival \
--to=acourbot@nvidia.com \
--cc=arnd@arndb.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cbou@mail.ru \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dwmw2@infradead.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=sjg@chromium.org \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@avionic-design.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).