1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00
Files
u-boot-megous/include
Patrick Delaunay 477ca57b9a gpio: add support of new GPIO direction flag
This commit manages the new dir flags that can be used in gpio
specifiers to indicate the pull-up or pull-down resistor
configuration for output gpio (GPIO_PULL_UP, GPIO_PULL_DOWN)
or the Open Drain/Open Source configuration for input gpio
(GPIO_OPEN_DRAIN, GPIO_OPEN_SOURCE).

These flags are already supported in Linux kernel in gpio lib.

This patch only parse and save the direction flags in GPIO
descriptor (desc->flags), it prepares the introduction of new ops
to manage them.
The GPIO uclass supports new GPIO flags from device-tree
(GPIO_XXX define in include/dt-bindings/gpio/gpio.h)
and translate them in the dir flags (GPIOD_XXX):
- GPIO_PULL_UP     => GPIOD_PULL_UP
- GPIO_PULL_DOWN   => GPIOD_PULL_DOWN
- GPIO_OPEN_DRAIN  => GPIOD_OPEN_DRAIN
- GPIO_OPEN_SOURCE => GPIOD_OPEN_SOURCE

This patch also adds protection in the check_dir_flags function for
new invalid configuration of the dir flags.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-04-16 23:06:54 -04:00
..
2020-04-16 14:36:28 +08:00
2019-12-06 16:44:20 -05:00
2019-12-15 11:44:16 +08:00
2020-02-05 19:33:46 -07:00
2020-04-16 14:36:28 +08:00
2020-01-07 14:37:50 +01:00
2020-02-05 19:33:46 -07:00
2020-01-24 23:06:47 +05:30
2020-01-20 15:38:16 +01:00
2020-01-20 15:38:16 +01:00
2020-01-24 23:06:49 +05:30
2019-12-02 18:23:11 -05:00
2020-01-25 12:04:36 -05:00
2020-03-09 18:11:23 -05:00
2020-02-05 19:33:46 -07:00
2019-12-15 11:44:11 +08:00
2020-02-05 19:33:46 -07:00
2019-12-06 16:44:19 -05:00
2020-03-09 08:33:16 +08:00
2020-02-05 19:33:46 -07:00
2020-04-16 14:36:28 +08:00
2020-03-16 16:42:50 -04:00
2020-01-24 23:06:49 +05:30
2020-01-21 15:56:15 +01:00
2020-02-07 22:46:35 +08:00
2019-12-02 18:23:09 -05:00