From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] mfd: da9063: add support to populate subdevs
Date: Wed, 11 Sep 2019 17:00:18 +0200 [thread overview]
Message-ID: <20190911150019.5236-1-m.felsch@pengutronix.de> (raw)
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
next reply other threads:[~2019-09-11 15:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 15:00 Marco Felsch [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190911150019.5236-1-m.felsch@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox