diff options
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/simple-bus.c | 1 | ||||
-rw-r--r-- | drivers/core/uclass.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c index 913c3ccc70..1a9c864ef3 100644 --- a/drivers/core/simple-bus.c +++ b/drivers/core/simple-bus.c @@ -53,6 +53,7 @@ UCLASS_DRIVER(simple_bus) = { static const struct udevice_id generic_simple_bus_ids[] = { { .compatible = "simple-bus" }, + { .compatible = "simple-mfd" }, { } }; diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index 12095e75a4..1141ce1ba3 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -401,6 +401,19 @@ int uclass_first_device(enum uclass_id id, struct udevice **devp) return uclass_get_device_tail(dev, ret, devp); } +int uclass_first_device_err(enum uclass_id id, struct udevice **devp) +{ + int ret; + + ret = uclass_first_device(id, devp); + if (ret) + return ret; + else if (!*devp) + return -ENODEV; + + return 0; +} + int uclass_next_device(struct udevice **devp) { struct udevice *dev = *devp; |