Message ID | 20241209161434.6563-3-clamor95@gmail.com |
---|---|
State | New |
Delegated to: | Thierry Reding |
Headers | show |
Series | Restore original GPIO uclass logic | expand |
> -----Original Message----- > From: Svyatoslav Ryhel <clamor95@gmail.com> > Sent: Tuesday, December 10, 2024 1:15 AM > > Bind GPIO and SYSRESET children to parent node since they > do not have their own nodes in the device tree. > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Best Regards, > --- > drivers/power/pmic/max77663.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/power/pmic/max77663.c b/drivers/power/pmic/max77663.c > index cf08b6a7e1d..c2a7cbf7e40 100644 > --- a/drivers/power/pmic/max77663.c > +++ b/drivers/power/pmic/max77663.c > @@ -47,8 +47,9 @@ static int max77663_bind(struct udevice *dev) > int children, ret; > > if (IS_ENABLED(CONFIG_SYSRESET_MAX77663)) { > - ret = device_bind_driver(dev, MAX77663_RST_DRIVER, > - "sysreset", NULL); > + ret = device_bind_driver_to_node(dev, MAX77663_RST_DRIVER, > + "sysreset", dev_ofnode(dev), > + NULL); > if (ret) { > log_err("cannot bind SYSRESET (ret = %d)\n", ret); > return ret; > @@ -56,8 +57,8 @@ static int max77663_bind(struct udevice *dev) > } > > if (IS_ENABLED(CONFIG_MAX77663_GPIO)) { > - ret = device_bind_driver(dev, MAX77663_GPIO_DRIVER, > - "gpio", NULL); > + ret = device_bind_driver_to_node(dev, MAX77663_GPIO_DRIVER, > + "gpio", dev_ofnode(dev), NULL); > if (ret) { > log_err("cannot bind GPIOs (ret = %d)\n", ret); > return ret; > -- > 2.43.0
diff --git a/drivers/power/pmic/max77663.c b/drivers/power/pmic/max77663.c index cf08b6a7e1d..c2a7cbf7e40 100644 --- a/drivers/power/pmic/max77663.c +++ b/drivers/power/pmic/max77663.c @@ -47,8 +47,9 @@ static int max77663_bind(struct udevice *dev) int children, ret; if (IS_ENABLED(CONFIG_SYSRESET_MAX77663)) { - ret = device_bind_driver(dev, MAX77663_RST_DRIVER, - "sysreset", NULL); + ret = device_bind_driver_to_node(dev, MAX77663_RST_DRIVER, + "sysreset", dev_ofnode(dev), + NULL); if (ret) { log_err("cannot bind SYSRESET (ret = %d)\n", ret); return ret; @@ -56,8 +57,8 @@ static int max77663_bind(struct udevice *dev) } if (IS_ENABLED(CONFIG_MAX77663_GPIO)) { - ret = device_bind_driver(dev, MAX77663_GPIO_DRIVER, - "gpio", NULL); + ret = device_bind_driver_to_node(dev, MAX77663_GPIO_DRIVER, + "gpio", dev_ofnode(dev), NULL); if (ret) { log_err("cannot bind GPIOs (ret = %d)\n", ret); return ret;
Bind GPIO and SYSRESET children to parent node since they do not have their own nodes in the device tree. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> --- drivers/power/pmic/max77663.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)