aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/fixed-helper.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-06-19 11:44:39 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-19 18:22:30 -0400
commit15719ccc274981b19ad8fe9ac20c94249de8a257 (patch)
treedf5d6a07460b7446262170387b940353bf6b73ae /drivers/regulator/fixed-helper.c
parentdfad84aeab5f71b33a12e6803a809f698bdef5a2 (diff)
regulator: extend the fixed dummy voltage regulator to accept voltage
Trivially extend the regulator_register_always_on() helper function to be even more useful by adding a voltage parameter to it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/fixed-helper.c')
-rw-r--r--drivers/regulator/fixed-helper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/fixed-helper.c b/drivers/regulator/fixed-helper.c
index 3aa268dfdb1d..f9d027992aae 100644
--- a/drivers/regulator/fixed-helper.c
+++ b/drivers/regulator/fixed-helper.c
@@ -24,9 +24,10 @@ static void regulator_fixed_release(struct device *dev)
24 * @name: name to be used for the regulator 24 * @name: name to be used for the regulator
25 * @supplies: consumers for this regulator 25 * @supplies: consumers for this regulator
26 * @num_supplies: number of consumers 26 * @num_supplies: number of consumers
27 * @uv: voltage in microvolts
27 */ 28 */
28struct platform_device *regulator_register_always_on(int id, const char *name, 29struct platform_device *regulator_register_always_on(int id, const char *name,
29 struct regulator_consumer_supply *supplies, int num_supplies) 30 struct regulator_consumer_supply *supplies, int num_supplies, int uv)
30{ 31{
31 struct fixed_regulator_data *data; 32 struct fixed_regulator_data *data;
32 33
@@ -40,7 +41,7 @@ struct platform_device *regulator_register_always_on(int id, const char *name,
40 return NULL; 41 return NULL;
41 } 42 }
42 43
43 data->cfg.microvolts = 0; 44 data->cfg.microvolts = uv;
44 data->cfg.gpio = -EINVAL; 45 data->cfg.gpio = -EINVAL;
45 data->cfg.enabled_at_boot = 1; 46 data->cfg.enabled_at_boot = 1;
46 data->cfg.init_data = &data->init_data; 47 data->cfg.init_data = &data->init_data;