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 1/3] Revert "drivers: gpio-uclass: support PMIC GPIO children"
Date: Mon,  9 Dec 2024 18:14:32 +0200	[thread overview]
Message-ID: <20241209161434.6563-2-clamor95@gmail.com> (raw)
In-Reply-To: <20241209161434.6563-1-clamor95@gmail.com>

Requesting of PMIC's GPIO child should be done by binding
GPIO driver to PMIC's node is GPIO driver does not have
its own node.

This reverts commit c03cd98d1a163666b4addcdd9a34fc0c77dfd0a5.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpio/gpio-uclass.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 0213271e3a6..67fc776cada 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -1142,29 +1142,9 @@ static int gpio_request_tail(int ret, const char *nodename,
 		ret = uclass_get_device_by_ofnode(UCLASS_GPIO, args->node,
 						  &desc->dev);
 		if (ret) {
-#if CONFIG_IS_ENABLED(MAX77663_GPIO) || CONFIG_IS_ENABLED(PALMAS_GPIO)
-			struct udevice *pmic;
-			ret = uclass_get_device_by_ofnode(UCLASS_PMIC, args->node,
-							  &pmic);
-			if (ret) {
-				log_debug("%s: PMIC device get failed, err %d\n",
-					  __func__, ret);
-				goto err;
-			}
-
-			device_foreach_child(desc->dev, pmic) {
-				if (device_get_uclass_id(desc->dev) == UCLASS_GPIO)
-					break;
-			}
-
-			/* if loop exits without GPIO device return error */
-			if (device_get_uclass_id(desc->dev) != UCLASS_GPIO)
-				goto err;
-#else
 			debug("%s: uclass_get_device_by_ofnode failed\n",
 			      __func__);
 			goto err;
-#endif
 		}
 	}
 	ret = gpio_find_and_xlate(desc, args);
-- 
2.43.0


  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 ` Svyatoslav Ryhel [this message]
2024-12-10 22:35   ` [PATCH v1 1/3] Revert "drivers: gpio-uclass: support PMIC GPIO children" Jaehoon Chung
2024-12-09 16:14 ` [PATCH v1 2/3] pmic: max77663: bind children to parent node Svyatoslav Ryhel
2024-12-10 22:35   ` 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-2-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