[PATCH v4 05/16] gpio: Drop dm_gpio_set_dir()

Simon Glass sjg at chromium.org
Fri Feb 5 05:21:58 CET 2021


This function is not used. Drop it.

Signed-off-by: Simon Glass <sjg at chromium.org>

Reviewed-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
---

(no changes since v1)

 drivers/gpio/gpio-uclass.c | 11 -----------
 include/asm-generic/gpio.h | 11 -----------
 2 files changed, 22 deletions(-)

diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 87254b0781b..8931c420845 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -671,17 +671,6 @@ int dm_gpio_set_dir_flags(struct gpio_desc *desc, ulong flags)
 	return ret;
 }
 
-int dm_gpio_set_dir(struct gpio_desc *desc)
-{
-	int ret;
-
-	ret = check_reserved(desc, "set_dir");
-	if (ret)
-		return ret;
-
-	return _dm_gpio_set_flags(desc, desc->flags);
-}
-
 int dm_gpio_get_flags(struct gpio_desc *desc, ulong *flagsp)
 {
 	struct udevice *dev = desc->dev;
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 4f8d1938da9..f7f10c469c0 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -657,17 +657,6 @@ int dm_gpio_get_value(const struct gpio_desc *desc);
 
 int dm_gpio_set_value(const struct gpio_desc *desc, int value);
 
-/**
- * dm_gpio_set_dir() - Set the direction for a GPIO
- *
- * This sets up the direction according to the GPIO flags: desc->flags.
- *
- * @desc:	GPIO description containing device, offset and flags,
- *		previously returned by gpio_request_by_name()
- * @return 0 if OK, -ve on error
- */
-int dm_gpio_set_dir(struct gpio_desc *desc);
-
 /**
  * dm_gpio_set_dir_flags() - Set direction using description and added flags
  *
-- 
2.30.0.478.g8a0d178c01-goog



More information about the U-Boot mailing list