diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-03-28 17:11:01 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-29 18:49:07 +0100 |
commit | d1a820011b2fbc11d5af80d1a961fe66c613fa4b (patch) | |
tree | a651cd0d73b9a2b94385c83463a57964a4a7ca62 /drivers/regulator/ab8500.c | |
parent | regulator: ab8500: Amend the update value for AB8500_LDO_INTCORE regulator (diff) | |
download | linux-d1a820011b2fbc11d5af80d1a961fe66c613fa4b.tar.xz linux-d1a820011b2fbc11d5af80d1a961fe66c613fa4b.zip |
regulator: ab8500-ext: New driver to control external regulators
The ABx500 is capable of controlling three external regulator supplies.
Most commonly on and off are supported, but if an external regulator
chipset or power supply supports high-power and low-power mode settings,
we can control those too.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/ab8500.c')
-rw-r--r-- | drivers/regulator/ab8500.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index 3a1896655557..49746884923d 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -947,6 +947,11 @@ static int ab8500_regulator_probe(struct platform_device *pdev) return err; } + /* register external regulators (before Vaux1, 2 and 3) */ + err = ab8500_ext_regulator_init(pdev); + if (err) + return err; + /* register all regulators */ for (i = 0; i < ARRAY_SIZE(ab8500_regulator_info); i++) { err = ab8500_regulator_register(pdev, &pdata->regulator[i], i, NULL); @@ -959,7 +964,7 @@ static int ab8500_regulator_probe(struct platform_device *pdev) static int ab8500_regulator_remove(struct platform_device *pdev) { - int i; + int i, err; for (i = 0; i < ARRAY_SIZE(ab8500_regulator_info); i++) { struct ab8500_regulator_info *info = NULL; @@ -971,6 +976,11 @@ static int ab8500_regulator_remove(struct platform_device *pdev) regulator_unregister(info->regulator); } + /* remove external regulators (after Vaux1, 2 and 3) */ + err = ab8500_ext_regulator_exit(pdev); + if (err) + return err; + return 0; } |