lkml.org 
[lkml]   [2009]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5] regulator: Add GPIO enable control to fixed voltage regulator driver
On Tue, Aug 04, 2009 at 08:58:50PM +0300, Roger Quadros wrote:
> From: Roger Quadros <ext-roger.quadros@nokia.com>

> Now fixed regulators that have their enable pin connected to a GPIO line
> can use the fixed regulator driver for regulator enable/disable control.
> The GPIO number and polarity information is passed through platform data.
> GPIO enable control is achieved using gpiolib.

> Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>

Looks good, thanks for taking the time to do this and fixing up the
review comments.

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

A couple of small notes that I don't see as blocking merge:

> +
> + /* FIXME: Remove below print warning
> + *
> + * config->gpio must be set to -EINVAL by platform code if
> + * GPIO control is not required. However, early adopters
> + * not requiring GPIO control may forget to initialize
> + * config->gpio to -EINVAL. This will cause GPIO 0 to be used
> + * for GPIO control.
> + *
> + * This warning will be removed once there are a couple of users
> + * for this driver.

Probably just for 2.6.33 or something; the point here is that this is an
incompatible change in the platform data which we can get away with here
due to the fact that there aren't any current users.

> + drvdata->is_enabled = config->enabled_at_boot;
> + ret = drvdata->is_enabled ?
> + config->enable_high : !config->enable_high;

Might be more legible without the ternery operator but no point spinning
the patch for that.


\
 
 \ /
  Last update: 2009-08-04 22:43    [W:0.054 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site