]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
pmic: max77663: bind children to parent node
authorSvyatoslav Ryhel <clamor95@gmail.com>
Mon, 9 Dec 2024 10:51:33 +0000 (12:51 +0200)
committerSvyatoslav Ryhel <clamor95@gmail.com>
Wed, 12 Feb 2025 08:34:32 +0000 (10:34 +0200)
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>
drivers/power/pmic/max77663.c

index cf08b6a7e1df9059bd8eb02d60fb8de0a5303369..c2a7cbf7e400e6c5b7f95d7279ec610692e784d4 100644 (file)
@@ -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;