diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2014-04-16 10:01:38 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-18 18:35:03 +0100 |
commit | 4a8c475f5fd5c1271dba36a453d666d5ed473aa6 (patch) | |
tree | fcbc82d2b185af50f6070323e8142e4127aca125 /drivers/mfd/arizona-core.c | |
parent | 36bcdf1bb6a16d58f8d60549502fd1da6b27a81a (diff) | |
download | lwn-4a8c475f5fd5c1271dba36a453d666d5ed473aa6.tar.gz lwn-4a8c475f5fd5c1271dba36a453d666d5ed473aa6.zip |
regulator: arizona-ldo1: Move setup processing from arizona-core
It is more idiomatic to process things relating to the regulator in its
driver. This patch moves both processing of device tree relating to the
regulator and checking if the regulator is external from arizona-core
into the regulator driver.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/mfd/arizona-core.c')
-rw-r--r-- | drivers/mfd/arizona-core.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c index 37b5e1447d02..07e6e27be23c 100644 --- a/drivers/mfd/arizona-core.c +++ b/drivers/mfd/arizona-core.c @@ -533,7 +533,6 @@ static int arizona_of_get_core_pdata(struct arizona *arizona) int ret, i; pdata->reset = arizona_of_get_named_gpio(arizona, "wlf,reset", true); - pdata->ldoena = arizona_of_get_named_gpio(arizona, "wlf,ldoena", true); ret = of_property_read_u32_array(arizona->dev->of_node, "wlf,gpio-defaults", @@ -665,6 +664,9 @@ int arizona_dev_init(struct arizona *arizona) return -EINVAL; } + /* Mark DCVDD as external, LDO1 driver will clear if internal */ + arizona->external_dcvdd = true; + ret = mfd_add_devices(arizona->dev, -1, early_devs, ARRAY_SIZE(early_devs), NULL, 0, NULL); if (ret != 0) { @@ -864,14 +866,6 @@ int arizona_dev_init(struct arizona *arizona) arizona->pdata.gpio_defaults[i]); } - /* - * LDO1 can only be used to supply DCVDD so if it has no - * consumers then DCVDD is supplied externally. - */ - if (arizona->pdata.ldo1 && - arizona->pdata.ldo1->num_consumer_supplies == 0) - arizona->external_dcvdd = true; - pm_runtime_set_autosuspend_delay(arizona->dev, 100); pm_runtime_use_autosuspend(arizona->dev); pm_runtime_enable(arizona->dev); |