diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2013-04-11 12:36:57 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-11 12:56:21 -0400 |
commit | 3ea9389656ddf8beb1b5b52b8db6333fa4a7c00e (patch) | |
tree | 6fd19df4038a595b51d7b39dcc4fb9249b0ba4af /drivers/regulator | |
parent | e3d27775fcf5e78cca346d298e8e7f4afeefc5c1 (diff) |
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>
Diffstat (limited to 'drivers/regulator')
-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 f03fbf1ff38a..a612c356a697 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) | |||
149 | config.init_data = &ldo->init_data; | 149 | config.init_data = &ldo->init_data; |
150 | if (pdata) | 150 | if (pdata) |
151 | config.ena_gpio = pdata->ldo[id].enable; | 151 | config.ena_gpio = pdata->ldo[id].enable; |
152 | else if (wm8994->dev->of_node) | ||
153 | config.ena_gpio = wm8994->pdata.ldo[id].enable; | ||
152 | 154 | ||
153 | /* Use default constraints if none set up */ | 155 | /* Use default constraints if none set up */ |
154 | if (!pdata || !pdata->ldo[id].init_data) { | 156 | if (!pdata || !pdata->ldo[id].init_data || wm8994->dev->of_node) { |
155 | dev_dbg(wm8994->dev, "Using default init data, supply %s %s\n", | 157 | dev_dbg(wm8994->dev, "Using default init data, supply %s %s\n", |
156 | ldo->supply.dev_name, ldo->supply.supply); | 158 | ldo->supply.dev_name, ldo->supply.supply); |
157 | 159 | ||