U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Svyatoslav Ryhel <clamor95@gmail.com>
To: Tom Rini <trini@konsulko.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	Simon Glass <sjg@chromium.org>,
	Peter Robinson <pbrobinson@gmail.com>,
	Heiko Schocher <hs@denx.de>, Jonas Karlman <jonas@kwiboo.se>
Cc: u-boot@lists.denx.de
Subject: [PATCH v1 2/3] pmic: max77663: bind children to parent node
Date: Mon,  9 Dec 2024 18:14:33 +0200	[thread overview]
Message-ID: <20241209161434.6563-3-clamor95@gmail.com> (raw)
In-Reply-To: <20241209161434.6563-1-clamor95@gmail.com>

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(-)

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


  parent reply	other threads:[~2024-12-09 16:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 16:14 [PATCH v1 0/3] Restore original GPIO uclass logic Svyatoslav Ryhel
2024-12-09 16:14 ` [PATCH v1 1/3] Revert "drivers: gpio-uclass: support PMIC GPIO children" Svyatoslav Ryhel
2024-12-10 22:35   ` Jaehoon Chung
2024-12-09 16:14 ` Svyatoslav Ryhel [this message]
2024-12-10 22:35   ` [PATCH v1 2/3] pmic: max77663: bind children to parent node Jaehoon Chung
2024-12-09 16:14 ` [PATCH v1 3/3] pmic: palmas: bind sysreset " Svyatoslav Ryhel
2024-12-10 22:36   ` Jaehoon Chung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241209161434.6563-3-clamor95@gmail.com \
    --to=clamor95@gmail.com \
    --cc=hs@denx.de \
    --cc=jh80.chung@samsung.com \
    --cc=jonas@kwiboo.se \
    --cc=pbrobinson@gmail.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox