summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-uclass.c
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2020-01-13 11:35:00 +0100
committerTom Rini <trini@konsulko.com>2020-04-16 23:06:54 -0400
commite3f3a121d8ebe15da868be8afbfb3e2a9ff80d4d (patch)
tree153d0aa0c94bb532ecdc84b86a812c4e9d464b41 /drivers/gpio/gpio-uclass.c
parent277a0ad8f559e6b54c0d32512697debc659d9fd5 (diff)
gpio: remove the open_drain API and ops
This patch removes the ops get_open_drain/set_open_drain and the API dm_gpio_get_open_drain/dm_gpio_set_open_drain. The ops only provided in one driver (mpc8xxx gpio) and the associated API is never called in boards. This patch prepare a more generic set/get_dir_flags ops, including the open drain property. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'drivers/gpio/gpio-uclass.c')
-rw-r--r--drivers/gpio/gpio-uclass.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 0a22441d38..2515df4e7c 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -491,38 +491,6 @@ int dm_gpio_set_value(const struct gpio_desc *desc, int value)
return 0;
}
-int dm_gpio_get_open_drain(struct gpio_desc *desc)
-{
- struct dm_gpio_ops *ops = gpio_get_ops(desc->dev);
- int ret;
-
- ret = check_reserved(desc, "get_open_drain");
- if (ret)
- return ret;
-
- if (ops->set_open_drain)
- return ops->get_open_drain(desc->dev, desc->offset);
- else
- return -ENOSYS;
-}
-
-int dm_gpio_set_open_drain(struct gpio_desc *desc, int value)
-{
- struct dm_gpio_ops *ops = gpio_get_ops(desc->dev);
- int ret;
-
- ret = check_reserved(desc, "set_open_drain");
- if (ret)
- return ret;
-
- if (ops->set_open_drain)
- ret = ops->set_open_drain(desc->dev, desc->offset, value);
- else
- return 0; /* feature not supported -> ignore setting */
-
- return ret;
-}
-
int dm_gpio_set_dir_flags(struct gpio_desc *desc, ulong flags)
{
struct udevice *dev = desc->dev;
@@ -1053,10 +1021,6 @@ static int gpio_post_bind(struct udevice *dev)
ops->get_value += gd->reloc_off;
if (ops->set_value)
ops->set_value += gd->reloc_off;
- if (ops->get_open_drain)
- ops->get_open_drain += gd->reloc_off;
- if (ops->set_open_drain)
- ops->set_open_drain += gd->reloc_off;
if (ops->get_function)
ops->get_function += gd->reloc_off;
if (ops->xlate)