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.fel...@pengutronix.de>
---
 drivers/mfd/da9063.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mfd/da9063.c b/drivers/mfd/da9063.c
index a7fff2c5bf..9c1752a38c 100644
--- a/drivers/mfd/da9063.c
+++ b/drivers/mfd/da9063.c
@@ -265,6 +265,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:
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to