The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Alex Courbot <acourbot@nvidia.com>
Cc: Andrew Chew <achew@nvidia.com>,
	"thierry.reding@avionic-design.de"
	<thierry.reding@avionic-design.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1 v3] pwm_bl: Add support for backlight enable regulator
Date: Tue, 05 Mar 2013 21:20:51 -0700	[thread overview]
Message-ID: <5136C423.3070400@wwwdotorg.org> (raw)
In-Reply-To: <5136A781.2050303@nvidia.com>

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.

  parent reply	other threads:[~2013-03-06  4:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05 23:51 [PATCH 1/1 v3] pwm_bl: Add support for backlight enable regulator Andrew Chew
2013-03-06  2:18 ` Alex Courbot
2013-03-06  2:41   ` Andrew Chew
2013-03-06  4:53     ` Alex Courbot
2013-03-06  7:00       ` Thierry Reding
2013-03-06  8:37         ` Alex Courbot
2013-03-06 10:11           ` Thierry Reding
2013-03-06  4:20   ` Stephen Warren [this message]
2013-03-06  4:56     ` Alex Courbot
2013-03-06  7:10       ` Thierry Reding

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=5136C423.3070400@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=achew@nvidia.com \
    --cc=acourbot@nvidia.com \
    --cc=linux-kernel@vger.kernel.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