From: Marek Vasut <marex@denx.de>
To: linux-gpio@vger.kernel.org
Cc: Marek Vasut <marex@denx.de>
Subject: [PATCH] gpio: mcp23s08: Populate subnodes
Date: Thu, 4 May 2017 12:30:50 +0200 [thread overview]
Message-ID: <20170504103050.10726-1-marex@denx.de> (raw)
The MCP23S08 driver can have OF subnodes which bind ie. LEDs to the
expander pins. Populate those subnodes so that the drivers get bound
to them.
Signed-off-by: Marek Vasut <marex@denx.de>
---
drivers/gpio/gpio-mcp23s08.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c
index 2a57d024481d..8d11fa715028 100644
--- a/drivers/gpio/gpio-mcp23s08.c
+++ b/drivers/gpio/gpio-mcp23s08.c
@@ -682,6 +682,10 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
if (ret)
goto fail;
}
+
+ of_platform_populate(mcp->chip.of_node, of_default_bus_match_table,
+ NULL, dev);
+
fail:
if (ret < 0)
dev_dbg(dev, "can't setup chip %d, --> %d\n", addr, ret);
--
2.11.0
reply other threads:[~2017-05-04 10:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170504103050.10726-1-marex@denx.de \
--to=marex@denx.de \
--cc=linux-gpio@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).