dm: firmware: Automatically bind child devices
authorAndreas Dannenberg <dannenberg@ti.com>
Mon, 27 Aug 2018 10:27:38 +0000 (15:57 +0530)
committerTom Rini <trini@konsulko.com>
Tue, 11 Sep 2018 12:32:55 +0000 (08:32 -0400)
To support scenarios where a firmware device node has subnodes that
have their own drivers automatically scan the DT and bind those when
the firmware device gets bound.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
drivers/firmware/firmware-uclass.c

index d09923595b845a950636d17e0bec9b6dd1d82554..3d33b6deba33dc516ac371b625ddfd3902dafada 100644 (file)
@@ -7,4 +7,7 @@
 UCLASS_DRIVER(firmware) = {
        .id             = UCLASS_FIRMWARE,
        .name           = "firmware",
+#if CONFIG_IS_ENABLED(OF_CONTROL)
+       .post_bind      = dm_scan_fdt_dev,
+#endif
 };