lkml.org 
[lkml]   [2012]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/7] leds-lm3530: add 'is_vin_always_on' in the lm3530_platform_data
From
On Fri, Jan 20, 2012 at 2:48 AM, Kim, Milo <Milo.Kim@ti.com> wrote:

> The 'IN' pin(Input voltage connection) can be always turned on
> in case it is connected with VBATT.
> To support this case, 'is_vin_always_on' is added.
> If VIN is always on, then we don't need to control the regulator for IN pin.
>
> Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
(...)
> + if (!drvdata->enable && !pltfm->is_vin_always_on) {
> ret = regulator_enable(drvdata->regulator);
> if (ret) {
> dev_err(&drvdata->client->dev,
> @@ -256,7 +256,7 @@ static void lm3530_brightness_set(struct led_classdev *led_cdev,
> else
> drvdata->brightness = brt_val / 2;
>
> - if (brt_val == 0) {
> + if (brt_val == 0 && !pdata->is_vin_always_on) {
> err = regulator_disable(drvdata->regulator);

NACK on this, and paging Mark.

As far as I know we want to get rid of different design patterns
avoiding the regulator interface. The way forward for this is
either:

(A) Provide a fixed voltage regulator in your platform for this
device (AFAIK the voltage does not even have to be correct)
(B) Enable dummy regulators in your platform

(A) is more elegant.

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2012-01-23 20:15    [W:0.052 / U:1.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site