[PATCH v3 15/21] gpio: add ops to set dir flags

Simon Glass sjg at chromium.org
Thu Jan 30 03:18:16 CET 2020


On Mon, 13 Jan 2020 at 03:35, Patrick Delaunay <patrick.delaunay at st.com> wrote:
>
> Add the ops for GPIO driver set_dir_flags() to set the dir flags.
> The user can update the direction and configuration
> of each GPIO with a only call to dm_gpio_set_dir_flags() or
> dm_gpio_set_dir() and respecting the configuration provided by
> device tree (saved in desc->flags).
>
> When these optional ops are absent, the gpio uclass use the mandatory
> ops (direction_output, direction_input, get_value) and desc->flags
> to manage only the main dir flags:
> - GPIOD_IS_IN
> - GPIOD_IS_OUT
> - GPIOD_IS_OUT_ACTIVE
> - GPIOD_ACTIVE_LOW
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> ---
>
> This patch was part of v2 08/14
> = gpio: add ops for configuration with dir flags
>
>
> Changes in v3:
> - Split the previous patch [PATCH v2 08/14] to help review
>
> Changes in v2:
> - change the proposed ops for pin config to set_dir_flags/get_dir_flags
> - reused the existing API dm_gpio_set_dir_flags/dm_gpio_set_dir
> - add a new API dm_gpio_get_dir_flags
>
>  drivers/gpio/gpio-uclass.c | 17 ++++++++++++-----
>  include/asm-generic/gpio.h | 16 ++++++++++++++++
>  2 files changed, 28 insertions(+), 5 deletions(-)

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


More information about the U-Boot mailing list