diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2020-01-13 13:35:00 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-17 06:06:54 +0300 |
commit | e3f3a121d8ebe15da868be8afbfb3e2a9ff80d4d (patch) | |
tree | 153d0aa0c94bb532ecdc84b86a812c4e9d464b41 /drivers/gpio/mpc8xxx_gpio.c | |
parent | 277a0ad8f559e6b54c0d32512697debc659d9fd5 (diff) | |
download | u-boot-e3f3a121d8ebe15da868be8afbfb3e2a9ff80d4d.tar.xz |
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/mpc8xxx_gpio.c')
-rw-r--r-- | drivers/gpio/mpc8xxx_gpio.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/gpio/mpc8xxx_gpio.c b/drivers/gpio/mpc8xxx_gpio.c index 4b385b8b39..1dfd22522c 100644 --- a/drivers/gpio/mpc8xxx_gpio.c +++ b/drivers/gpio/mpc8xxx_gpio.c @@ -133,26 +133,6 @@ static int mpc8xxx_gpio_get_value(struct udevice *dev, uint gpio) return !!mpc8xxx_gpio_get_val(data->base, gpio_mask(gpio)); } -static int mpc8xxx_gpio_get_open_drain(struct udevice *dev, uint gpio) -{ - struct mpc8xxx_gpio_data *data = dev_get_priv(dev); - - return !!mpc8xxx_gpio_open_drain_val(data->base, gpio_mask(gpio)); -} - -static int mpc8xxx_gpio_set_open_drain(struct udevice *dev, uint gpio, - int value) -{ - struct mpc8xxx_gpio_data *data = dev_get_priv(dev); - - if (value) - mpc8xxx_gpio_open_drain_on(data->base, gpio_mask(gpio)); - else - mpc8xxx_gpio_open_drain_off(data->base, gpio_mask(gpio)); - - return 0; -} - static int mpc8xxx_gpio_get_function(struct udevice *dev, uint gpio) { struct mpc8xxx_gpio_data *data = dev_get_priv(dev); @@ -229,8 +209,6 @@ static const struct dm_gpio_ops gpio_mpc8xxx_ops = { .direction_output = mpc8xxx_gpio_direction_output, .get_value = mpc8xxx_gpio_get_value, .set_value = mpc8xxx_gpio_set_value, - .get_open_drain = mpc8xxx_gpio_get_open_drain, - .set_open_drain = mpc8xxx_gpio_set_open_drain, .get_function = mpc8xxx_gpio_get_function, }; |