
If correct PMIC child was found it should be requested as well.
Signed-off-by: Svyatoslav Ryhel clamor95@gmail.com --- drivers/gpio/gpio-uclass.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index e776906fe73..e6c00c48722 100644 --- a/drivers/gpio/gpio-uclass.c +++ b/drivers/gpio/gpio-uclass.c @@ -1160,6 +1160,14 @@ static int gpio_request_tail(int ret, const char *nodename, /* if loop exits without GPIO device return error */ if (device_get_uclass_id(desc->dev) != UCLASS_GPIO) goto err; + + ret = uclass_get_device_by_name(UCLASS_GPIO, desc->dev->name, + &desc->dev); + if (ret) { + log_debug("%s: getting GPIO device failed %d\n", + __func__, ret); + goto err; + } #else debug("%s: uclass_get_device_by_ofnode failed\n", __func__);