summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-10-13 13:45:30 +0300
committerMark Brown <broonie@kernel.org>2015-10-16 19:59:34 +0300
commit0d19208e70b3a65144c7a0b6368f849c57818242 (patch)
tree1a53457881eae01b10618f3cafd5e88e30af4e91 /drivers/regulator
parent5abe4f223ed6b820443d3657bd48600692f61c12 (diff)
downloadlinux-0d19208e70b3a65144c7a0b6368f849c57818242.tar.xz
regulator: i.MX anatop: Allow supply regulator
The anatop regulators are SoC internal LDO regulators usually supplied by an external PMIC. This patch adds support for specifying the supply from the device tree using the vin-supply property. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/anatop-regulator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index 738adfa5332b..7d99f2c8cef3 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -30,6 +30,7 @@
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/of_regulator.h>
+#include <linux/regulator/machine.h>
#define LDO_RAMP_UP_UNIT_IN_CYCLES 64 /* 64 cycles per step */
#define LDO_RAMP_UP_FREQ_IN_MHZ 24 /* cycle based on 24M OSC */
@@ -199,6 +200,7 @@ static int anatop_regulator_probe(struct platform_device *pdev)
rdesc->owner = THIS_MODULE;
initdata = of_get_regulator_init_data(dev, np, rdesc);
+ initdata->supply_regulator = "vin";
sreg->initdata = initdata;
anatop_np = of_get_parent(np);
@@ -262,6 +264,7 @@ static int anatop_regulator_probe(struct platform_device *pdev)
rdesc->vsel_reg = sreg->control_reg;
rdesc->vsel_mask = ((1 << sreg->vol_bit_width) - 1) <<
sreg->vol_bit_shift;
+ rdesc->min_dropout_uV = 125000;
config.dev = &pdev->dev;
config.init_data = initdata;