diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-27 17:51:46 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-28 17:30:07 +0000 |
commit | 55a18aef2e963c43d3a0ae20c1dfd404830aa6f9 (patch) | |
tree | 62e4f2ec1eb60627cbbf0a6ed3c75268ffc0f79d /drivers/regulator/arizona-ldo1.c | |
parent | 86a14501180de78ccec1e513b031a06ea60c973f (diff) |
regulator: arizona-ldo1: Support DVFS in default constraints
Some Arizona devices such as the WM5102 can use DVFS on their digital core,
for these devices allow the voltage range to vary in the default setup.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/arizona-ldo1.c')
-rw-r--r-- | drivers/regulator/arizona-ldo1.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/regulator/arizona-ldo1.c b/drivers/regulator/arizona-ldo1.c index 9d504585104a..36c1c5cbc265 100644 --- a/drivers/regulator/arizona-ldo1.c +++ b/drivers/regulator/arizona-ldo1.c @@ -61,6 +61,16 @@ static const struct regulator_desc arizona_ldo1 = { .owner = THIS_MODULE, }; +static const struct regulator_init_data arizona_ldo1_dvfs = { + .constraints = { + .min_uV = 1200000, + .max_uV = 1800000, + .valid_ops_mask = REGULATOR_CHANGE_STATUS | + REGULATOR_CHANGE_VOLTAGE, + }, + .num_consumer_supplies = 1, +}; + static const struct regulator_init_data arizona_ldo1_default = { .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS, @@ -88,7 +98,15 @@ static __devinit int arizona_ldo1_probe(struct platform_device *pdev) * default init_data for it. This will be overridden with * platform data if provided. */ - ldo1->init_data = arizona_ldo1_default; + switch (arizona->type) { + case WM5102: + ldo1->init_data = arizona_ldo1_dvfs; + break; + default: + ldo1->init_data = arizona_ldo1_default; + break; + } + ldo1->init_data.consumer_supplies = &ldo1->supply; ldo1->supply.supply = "DCVDD"; ldo1->supply.dev_name = dev_name(arizona->dev); |