[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbyK3eevSu3JeTzWguhJkSAm+8vmxymV03UhxhNQUtVsw@mail.gmail.com>
Date: Mon, 23 Jan 2012 20:13:18 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: "Kim, Milo" <Milo.Kim@...com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: "shreshthakumar.sahu@...ricsson.com"
<shreshthakumar.sahu@...ricsson.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"rpurdie@...ys.net" <rpurdie@...ys.net>
Subject: Re: [PATCH 3/7] leds-lm3530: add 'is_vin_always_on' in the lm3530_platform_data
On Fri, Jan 20, 2012 at 2:48 AM, Kim, Milo <Milo.Kim@...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@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists