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>
This commit is contained in:
parent
e3d27775fc
commit
3ea9389656
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue