diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2013-04-11 18:36:57 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-11 17:56:21 +0100 |
commit | 3ea9389656ddf8beb1b5b52b8db6333fa4a7c00e (patch) | |
tree | 6fd19df4038a595b51d7b39dcc4fb9249b0ba4af | |
parent | e3d27775fcf5e78cca346d298e8e7f4afeefc5c1 (diff) | |
download | linux-3.10-3ea9389656ddf8beb1b5b52b8db6333fa4a7c00e.tar.gz linux-3.10-3ea9389656ddf8beb1b5b52b8db6333fa4a7c00e.tar.bz2 linux-3.10-3ea9389656ddf8beb1b5b52b8db6333fa4a7c00e.zip |
regulator: wm8994: Use GPIO parsed from DT when registering regulators
Ensure the regulators are registered with a GPIO parsed from the device
tree when available.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | drivers/regulator/wm8994-regulator.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c index f03fbf1ff38..a612c356a69 100644 --- a/drivers/regulator/wm8994-regulator.c +++ b/drivers/regulator/wm8994-regulator.c @@ -149,9 +149,11 @@ static int wm8994_ldo_probe(struct platform_device *pdev) config.init_data = &ldo->init_data; if (pdata) config.ena_gpio = pdata->ldo[id].enable; + else if (wm8994->dev->of_node) + config.ena_gpio = wm8994->pdata.ldo[id].enable; /* Use default constraints if none set up */ - if (!pdata || !pdata->ldo[id].init_data) { + if (!pdata || !pdata->ldo[id].init_data || wm8994->dev->of_node) { dev_dbg(wm8994->dev, "Using default init data, supply %s %s\n", ldo->supply.dev_name, ldo->supply.supply); |