mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] mfd: da9063: add support to populate subdevs
@ 2019-09-11 15:00 Marco Felsch
  2019-09-11 15:00 ` [PATCH 2/2] gpio: add DA9062 MFD gpio support Marco Felsch
  2019-09-12  6:40 ` [PATCH 1/2] mfd: da9063: add support to populate subdevs Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Marco Felsch @ 2019-09-11 15:00 UTC (permalink / raw)
  To: barebox

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>
---
 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-12  6:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-11 15:00 [PATCH 1/2] mfd: da9063: add support to populate subdevs Marco Felsch
2019-09-11 15:00 ` [PATCH 2/2] gpio: add DA9062 MFD gpio support Marco Felsch
2019-09-12  6:40 ` [PATCH 1/2] mfd: da9063: add support to populate subdevs Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox