summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2019-09-11 17:00:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-14 12:52:11 +0200
commitbd7d8325627c5918a090a0c03e1554583b4a8a63 (patch)
tree9da469f644d45db311b90c8cf08af088004620b9 /drivers/mfd
parentc2cf9442bbaae379a29ff4c4d00870e204759282 (diff)
downloadbarebox-bd7d8325627c5918a090a0c03e1554583b4a8a63.tar.gz
barebox-bd7d8325627c5918a090a0c03e1554583b4a8a63.tar.xz
mfd: da9063: add support to populate subdevs
The upstream dt-bindings abstracts the DA9063/2 PMIC MFD by multiple of-subnodes and the linux-mfd core creates platform-devices for each node. Due to the lack of a mfd fw we need to add the platform-devices by our own to reuse the upstream bindings. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/da9063.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mfd/da9063.c b/drivers/mfd/da9063.c
index 5f77e5935b..ac737637a2 100644
--- a/drivers/mfd/da9063.c
+++ b/drivers/mfd/da9063.c
@@ -262,6 +262,9 @@ static int da9063_probe(struct device_d *dev)
restart_handler_register(&priv->restart);
+ if (IS_ENABLED(CONFIG_OFDEVICE) && dev->device_node)
+ return of_platform_populate(dev->device_node, NULL, dev);
+
return 0;
on_error: