All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Thomas Abraham <thomas.abraham@linaro.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, rpurdie@rpsys.net,
	linux-samsung-soc@vger.kernel.org, grant.likely@secretlab.ca,
	rob.herring@calxeda.com, kgene.kim@samsung.com,
	jg1.han@samsung.com, kyungmin.park@samsung.com, cbou@mail.ru,
	kwangwoo.lee@gmail.com, augulis.darius@gmail.com,
	ben-linux@fluff.org, patches@linaro.org
Subject: Re: [PATCH] backlight: lcd: add driver for raster-type lcd's with gpio controlled panel reset
Date: Thu, 5 Jan 2012 22:49:30 -0800	[thread overview]
Message-ID: <20120106064929.GB3496@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4F05F509.6020405@metafoo.de>

On Thu, Jan 05, 2012 at 08:07:53PM +0100, Lars-Peter Clausen wrote:

> > +- lcd,pwrctrl-min-uV: If a regulator controls the Vcc voltage of the lcd panel,
> > +  this property specifies the minimum voltage the regulator should supply.
> > +  The value of this property should in in micro-volts.
> > +- lcd,pwrctrl-max-uV: If a regulator controls the Vcc voltage of the lcd panel,
> > +  this property specifies the maximum voltage the regulator should limit to
> > +  on the Vcc line. The value of this property should in in micro-volts.

> The min and max voltage should rather be specified through the regulator
> constraints.

In principle it should be specified in both places to account for shared
supplies though for all practical purposes for an LCD panel I can't see
multiple users sharing the same regulator and varying the voltage at
runtime.

> > +	if (lcd_enable) {
> > +		if ((pd->min_uV || pd->max_uV) &&
> > +			regulator_set_voltage(lp->regulator,
> > +						pd->min_uV, pd->max_uV))
> > +				dev_info(lp->dev,
> > +					"regulator voltage set failed\n");
> > +		if (regulator_enable(lp->regulator))
> > +			dev_info(lp->dev, "failed to enable regulator\n");
> > +	} else {
> > +		regulator_disable(lp->regulator);
> > +	}

> I think you have to make sure that the regulator enable and disable calls are
> balanced.

Yes.

> > +#ifdef CONFIG_OF

> I think you can remove all the CONFIG_OF ifdefs, the of API should stub itself out.

It's reasonably idiomatic to do this if the parsing code is in a
separate function.

WARNING: multiple messages have this Message-ID (diff)
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] backlight: lcd: add driver for raster-type lcd's with gpio controlled panel reset
Date: Thu, 5 Jan 2012 22:49:30 -0800	[thread overview]
Message-ID: <20120106064929.GB3496@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4F05F509.6020405@metafoo.de>

On Thu, Jan 05, 2012 at 08:07:53PM +0100, Lars-Peter Clausen wrote:

> > +- lcd,pwrctrl-min-uV: If a regulator controls the Vcc voltage of the lcd panel,
> > +  this property specifies the minimum voltage the regulator should supply.
> > +  The value of this property should in in micro-volts.
> > +- lcd,pwrctrl-max-uV: If a regulator controls the Vcc voltage of the lcd panel,
> > +  this property specifies the maximum voltage the regulator should limit to
> > +  on the Vcc line. The value of this property should in in micro-volts.

> The min and max voltage should rather be specified through the regulator
> constraints.

In principle it should be specified in both places to account for shared
supplies though for all practical purposes for an LCD panel I can't see
multiple users sharing the same regulator and varying the voltage at
runtime.

> > +	if (lcd_enable) {
> > +		if ((pd->min_uV || pd->max_uV) &&
> > +			regulator_set_voltage(lp->regulator,
> > +						pd->min_uV, pd->max_uV))
> > +				dev_info(lp->dev,
> > +					"regulator voltage set failed\n");
> > +		if (regulator_enable(lp->regulator))
> > +			dev_info(lp->dev, "failed to enable regulator\n");
> > +	} else {
> > +		regulator_disable(lp->regulator);
> > +	}

> I think you have to make sure that the regulator enable and disable calls are
> balanced.

Yes.

> > +#ifdef CONFIG_OF

> I think you can remove all the CONFIG_OF ifdefs, the of API should stub itself out.

It's reasonably idiomatic to do this if the parsing code is in a
separate function.

  reply	other threads:[~2012-01-06  6:49 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05 15:42 [PATCH] backlight: lcd: add driver for raster-type lcd's with gpio controlled panel reset Thomas Abraham
2012-01-05 15:42 ` Thomas Abraham
2012-01-05 19:07 ` Lars-Peter Clausen
2012-01-05 19:07   ` Lars-Peter Clausen
2012-01-06  6:49   ` Mark Brown [this message]
2012-01-06  6:49     ` Mark Brown
2012-01-07 11:04     ` Thomas Abraham
2012-01-07 11:04       ` Thomas Abraham
2012-01-07 17:28       ` Mark Brown
2012-01-07 17:28         ` Mark Brown
2012-01-11 10:51         ` Thomas Abraham
2012-01-11 10:51           ` Thomas Abraham
2012-01-11 17:45           ` Mark Brown
2012-01-11 17:45             ` Mark Brown
2012-01-12  1:34             ` Thomas Abraham
2012-01-12  1:34               ` Thomas Abraham
2012-01-07 10:46   ` Thomas Abraham
2012-01-07 10:46     ` Thomas Abraham
2012-01-07 10:46     ` Thomas Abraham
2012-01-06  2:16 ` Jingoo Han
2012-01-06  2:16   ` Jingoo Han
2012-01-07 10:48   ` Thomas Abraham
2012-01-07 10:48     ` Thomas Abraham
2012-01-06  6:46 ` Olof Johansson
2012-01-06  6:46   ` Olof Johansson
2012-01-06  6:46   ` Olof Johansson
2012-01-07 10:59   ` Thomas Abraham
2012-01-07 10:59     ` Thomas Abraham
2012-01-07 10:59     ` Thomas Abraham
2012-01-07 18:23 ` Russell King - ARM Linux
2012-01-07 18:23   ` Russell King - ARM Linux
2012-01-07 18:32   ` Lars-Peter Clausen
2012-01-07 18:32     ` Lars-Peter Clausen
2012-01-11 10:58   ` Thomas Abraham
2012-01-11 10:58     ` Thomas Abraham

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=20120106064929.GB3496@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=augulis.darius@gmail.com \
    --cc=ben-linux@fluff.org \
    --cc=cbou@mail.ru \
    --cc=grant.likely@secretlab.ca \
    --cc=jg1.han@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kwangwoo.lee@gmail.com \
    --cc=kyungmin.park@samsung.com \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=rob.herring@calxeda.com \
    --cc=rpurdie@rpsys.net \
    --cc=thomas.abraham@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.