diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2020-01-13 11:35:00 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-16 23:06:54 -0400 |
commit | e3f3a121d8ebe15da868be8afbfb3e2a9ff80d4d (patch) | |
tree | 153d0aa0c94bb532ecdc84b86a812c4e9d464b41 /include | |
parent | 277a0ad8f559e6b54c0d32512697debc659d9fd5 (diff) | |
download | u-boot-e3f3a121d8ebe15da868be8afbfb3e2a9ff80d4d.tar.gz u-boot-e3f3a121d8ebe15da868be8afbfb3e2a9ff80d4d.tar.xz u-boot-e3f3a121d8ebe15da868be8afbfb3e2a9ff80d4d.zip |
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 'include')
-rw-r--r-- | include/asm-generic/gpio.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 4064efeb8d..4d5348d8c8 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -253,8 +253,6 @@ struct dm_gpio_ops { int value); int (*get_value)(struct udevice *dev, unsigned offset); int (*set_value)(struct udevice *dev, unsigned offset, int value); - int (*get_open_drain)(struct udevice *dev, unsigned offset); - int (*set_open_drain)(struct udevice *dev, unsigned offset, int value); /** * get_function() Get the GPIO function * @@ -586,38 +584,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_get_open_drain() - Check if open-drain-mode of a GPIO is active - * - * This checks if open-drain-mode for a GPIO is enabled or not. This method is - * optional. - * - * @desc: GPIO description containing device, offset and flags, - * previously returned by gpio_request_by_name() - * @return Value of open drain mode for GPIO (0 for inactive, 1 for active) or - * -ve on error - */ -int dm_gpio_get_open_drain(struct gpio_desc *desc); - -/** - * dm_gpio_set_open_drain() - Switch open-drain-mode of a GPIO on or off - * - * This enables or disables open-drain mode for a GPIO. This method is - * optional; if the driver does not support it, nothing happens when the method - * is called. - * - * In open-drain mode, instead of actively driving the output (Push-pull - * output), the GPIO's pin is connected to the collector (for a NPN transistor) - * or the drain (for a MOSFET) of a transistor, respectively. The pin then - * either forms an open circuit or a connection to ground, depending on the - * state of the transistor. - * - * @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_open_drain(struct gpio_desc *desc, int value); - -/** * dm_gpio_set_dir() - Set the direction for a GPIO * * This sets up the direction according tot the provided flags. It will do |