Messages in this thread | | | Date | Mon, 23 Jan 2012 20:13:18 +0100 | Subject | Re: [PATCH 3/7] leds-lm3530: add 'is_vin_always_on' in the lm3530_platform_data | From | Linus Walleij <> |
| |
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
| |