Skip to contentSkip to conversation

regulator: gpio-regulator: fix can't find regulator node in dt

PATCH New Frank Li 2 participants 2 messages Nov 12, 2012 – Nov 13, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Frank Li

author
#0 lore raw

PATCH 2/2 regulator: gpio-regulator: fix can't find regulator node in dt

Need initilize of_node in regulator config when register regulator, otherwise regulator driver think it is no-dt device.

in regulator_dev_lookup
list_for_each_entry(r, &regulator_list, list)

	if (r->dev.parent &&
		node == r->dev.of_node)
			return r

r->dev.of_noe will be zero if miss config in cfg.

---
 drivers/regulator/gpio-regulator.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/regulator/gpio-regulator.c +1 -0
index e467d0a..faa2f71 100644
@@ -303,6 +303,7 @@ static int __devinit gpio_regulator_probe(struct platform_device *pdev)
 	cfg.dev = &pdev->dev;
 	cfg.init_data = config->init_data;
 	cfg.driver_data = drvdata;
+	cfg.of_node = np;
 
 	if (config->enable_gpio >= 0)
 		cfg.ena_gpio = config->enable_gpio;
Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/2 regulator: gpio-regulator: fix can't find regulator node in dt

Quoted 2 lines · Frank Li

Need initilize of_node in regulator config when register regulator, otherwise regulator driver think it is no-dt device.

Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121113/f304e241/attachment.sig>