Skip to contentSkip to conversation

gpio: mcp23s08: Populate subnodes

PATCH New Marek Vasut 1 participant 1 message May 4, 2017 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: mcp23s08: Populate subnodes

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.

---
 drivers/gpio/gpio-mcp23s08.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpio/gpio-mcp23s08.c +4 -0
index 2a57d024481d..8d11fa715028 100644
@@ -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);
Signature · 1 line
2.11.0