diff mbox series

[v1,1/3] Revert "drivers: gpio-uclass: support PMIC GPIO children"

Message ID 20241209161434.6563-2-clamor95@gmail.com
State New
Delegated to: Thierry Reding
Headers show
Series Restore original GPIO uclass logic | expand

Commit Message

Svyatoslav Ryhel Dec. 9, 2024, 4:14 p.m. UTC
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(-)

Comments

Jaehoon Chung Dec. 10, 2024, 10:35 p.m. UTC | #1
> -----Original Message-----
> From: Svyatoslav Ryhel <clamor95@gmail.com>
> Sent: Tuesday, December 10, 2024 1:15 AM
>
> 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>

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,

> ---
>  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
diff mbox series

Patch

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