misc: Allow child devices
authorSimon Glass <sjg@chromium.org>
Thu, 27 Dec 2018 20:24:36 +0000 (13:24 -0700)
committerSimon Glass <sjg@chromium.org>
Sat, 9 Feb 2019 19:50:22 +0000 (12:50 -0700)
Allow misc devices to have children, so that we can use this uclass for
cases where a child device (e.g. I2S) needs to access a misc driver for
transferring data.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/misc/misc-uclass.c

index f240cda5c056fdfb20547b8b48bac97f63ba8154..55381edc9808f4c5cccd385eb0c96407e9517c74 100644 (file)
@@ -68,4 +68,7 @@ int misc_set_enabled(struct udevice *dev, bool val)
 UCLASS_DRIVER(misc) = {
        .id             = UCLASS_MISC,
        .name           = "misc",
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
+       .post_bind      = dm_scan_fdt_dev,
+#endif
 };