pmic: max77663: bind children to parent node
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>
This commit is contained in:
@@ -47,8 +47,9 @@ static int max77663_bind(struct udevice *dev)
|
|||||||
int children, ret;
|
int children, ret;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_SYSRESET_MAX77663)) {
|
if (IS_ENABLED(CONFIG_SYSRESET_MAX77663)) {
|
||||||
ret = device_bind_driver(dev, MAX77663_RST_DRIVER,
|
ret = device_bind_driver_to_node(dev, MAX77663_RST_DRIVER,
|
||||||
"sysreset", NULL);
|
"sysreset", dev_ofnode(dev),
|
||||||
|
NULL);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
log_err("cannot bind SYSRESET (ret = %d)\n", ret);
|
log_err("cannot bind SYSRESET (ret = %d)\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
@@ -56,8 +57,8 @@ static int max77663_bind(struct udevice *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_MAX77663_GPIO)) {
|
if (IS_ENABLED(CONFIG_MAX77663_GPIO)) {
|
||||||
ret = device_bind_driver(dev, MAX77663_GPIO_DRIVER,
|
ret = device_bind_driver_to_node(dev, MAX77663_GPIO_DRIVER,
|
||||||
"gpio", NULL);
|
"gpio", dev_ofnode(dev), NULL);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
log_err("cannot bind GPIOs (ret = %d)\n", ret);
|
log_err("cannot bind GPIOs (ret = %d)\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user