lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 6 Mar 2013 08:10:40 +0100
From:	Thierry Reding <thierry.reding@...onic-design.de>
To:	Alex Courbot <acourbot@...dia.com>
Cc:	Stephen Warren <swarren@...dotorg.org>,
	Andrew Chew <AChew@...dia.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1 v3] pwm_bl: Add support for backlight enable regulator

On Wed, Mar 06, 2013 at 01:56:40PM +0900, Alex Courbot wrote:
> On 03/06/2013 01:20 PM, Stephen Warren wrote:
> >On 03/05/2013 07:18 PM, Alex Courbot wrote:
> >>On 03/06/2013 08:51 AM, Andrew Chew wrote:
> >>>The backlight enable regulator is specified in the device tree node for
> >>>backlight.
> >
> >>>diff --git a/include/linux/pwm_backlight.h
> >
> >>>   struct platform_pwm_backlight_data {
> >>>       int pwm_id;
> >>>+    struct regulator *en_supply;
> >>
> >>You should not have this here. Platform data is supposed to provide the
> >>necessary information for the driver to resolve the resource - not the
> >>resource itself.
> >...
> >>There is one catch though: in case you don't want to use a regulator,
> >>and thus have none defined, regulator_get() will return -EPROBE_DEFER,
> >>so you cannot distinguish between "no regulator needed" and "supplier
> >>not ready yet" and your driver will always *require* a regulator. So at
> >>the end of the day you might still need a "use_enable_regulator" in the
> >>platform data to explicitly ask for probe() to look for it. This
> >>variable would also be set by parse_dt() if the "enable-supply" property
> >>exists.
> >
> >A driver that requires a regulator always requires that regulator. If a
> >particular board doesn't have SW control over the power source, you're
> >supposed to provide a dummy (fixed) regulator so that the driver doesn't
> >care about the difference.
> 
> That's good to know, thanks. So does this mean that Andrew should
> make the enable regulator mandatory and update current users to
> provide a dummy one?

That would be the right thing to do. I was planning to move all users of
pwm-backlight to use PWM lookup tables as well at some point (in order
to get rid of the legacy pwm_request() calls), so maybe we can do both
in one go.

Thierry

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ