* [PATCH] gpio: mcp23s08: Populate subnodes
@ 2017-05-04 10:30 Marek Vasut
0 siblings, 0 replies; only message in thread
From: Marek Vasut @ 2017-05-04 10:30 UTC (permalink / raw)
To: linux-gpio; +Cc: Marek Vasut
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-04 10:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-04 10:30 [PATCH] gpio: mcp23s08: Populate subnodes Marek Vasut
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).