linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kyungmin Park <kyungmin.park@samsung.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: backlight/ld9040.c: regulator control in the lcd driver
Date: Fri, 02 Dec 2011 10:14:24 +0000	[thread overview]
Message-ID: <CAH9JG2VY=L2OMitpiV-Au6fYmmthEnuLSSDywa1MS2=5-ZMsCg@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdan-zKk6TN15MkbEuNk5C949SL-jniK98vReFTzfvGC4w@mail.gmail.com>

On 12/2/11, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Fri, Dec 2, 2011 at 9:57 AM, Kyungmin Park <kyungmin.park@samsung.com>
> wrote:
>>>[leedonghwa]
>> [Me]
>>>> +         lcd->reg_vdd3 = regulator_get(lcd->dev, "vdd");
>>>> +         if (IS_ERR(lcd->reg_vdd3)) {
>>>> +                   dev_info(lcd->dev, "no %s regulator found\n",
>>>> "vdd");
>>>> +                   lcd->reg_vdd3 = NULL;
>>>> +         }
>>>> +
>>>> +         lcd->reg_vci = regulator_get(lcd->dev, "vci");
>>>> +         if (IS_ERR(lcd->reg_vci)) {
>>>> +                   dev_info(lcd->dev, "no %s regulator found\n",
>>>> "vci");
>>>> +                   lcd->reg_vci = NULL;
>>>> +         }
>>>
>>> As explained in earlier discussion with Mark regarding the SMSC911x
>>> driver regulator, treat these as errors and do not fail
>>> "gracefully" like this.
>>>
>>> Reference:
>>> http://marc.info/?l=linux-netdev&m\x131914562120725&w=2
>>
>> As mentioned at commit message, the lcd regulator is optional part and
>> refer the mmc codes
>>
>>        host->vmmc = regulator_get(mmc_dev(mmc), "vmmc");
>>        if (IS_ERR(host->vmmc)) {
>>                pr_info("%s: no vmmc regulator found\n",
>> mmc_hostname(mmc));
>>                host->vmmc = NULL;
>>        } else {
>>                regulator_enable(host->vmmc);
>>        }
>>
>> Previous time, these codes are located at board file, but more boards
>> are used, it has same codes for all boards. so move it to drivers.
>
> I know. This was brought up in the aforementioned discussion,
> but the above is also wrong, simply. See:
> http://marc.info/?l=linux-netdev&m\x131914562120667&w=2
> http://marc.info/?l=linux-netdev&m\x131914562120690&w=2
> http://marc.info/?l=linux-netdev&m\x131914562120725&w=2
> http://marc.info/?l=linux-netdev&m\x131963332527416&w=2
>
>> In our case, it has the regulator but some boards don't.
>>
>> Umm then how to handle the regulator gracefully?
>
> Mark suggest using a fixed-voltage regulator for boards
> where the power is always on. The voltage level itself
> is optional. See:
> http://marc.info/?l=linux-netdev&m\x131963332527416&w=2

Make sense, okay send the updated patch
>
> Other approaches is to use dummy regulators, or not
> call regulator_has_full_constraints(), which means the
> regulator core will provide dummy regulators anyways.
> See:
> http://marc.info/?l=linux-netdev&m\x131973043527112&w=2
> http://marc.info/?l=linux-netdev&m\x131975178703166&w=2
>
> Whole thread of discussion:
> http://marc.info/?l=linux-netdev&w=2&r=1&s=smsc911x&q=b
>
> Yours,
> Linus Walleij
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

  reply	other threads:[~2011-12-02 10:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <000c01ccb0c6$697c2aa0$3c747fe0$%lee@samsung.com>
2011-12-02  8:49 ` backlight/ld9040.c: regulator control in the lcd driver Linus Walleij
2011-12-02  8:57   ` Kyungmin Park
2011-12-02 10:05     ` Linus Walleij
2011-12-02 10:14       ` Kyungmin Park [this message]
2011-12-02 10:31     ` Mark Brown
2011-12-02 10:36       ` Linus Walleij
2011-12-02 10:52         ` Mark Brown

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='CAH9JG2VY=L2OMitpiV-Au6fYmmthEnuLSSDywa1MS2=5-ZMsCg@mail.gmail.com' \
    --to=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).