u-boot/drivers/gpio
Patrice Chotard 427f452cb9 gpio: stm32_gpio: Rework GPIO hole management
On some STM32 SoC's package, GPIO bank may have hole in their GPIO bank
Example:
  If GPIO bank have 16 GPIO pins [0-15].
  In particular SoC's package case, some GPIO bank can have less GPIO pins:
    - [0-10] => 11 pins;
    - [2-7] => 6 pins.

Commit dbf928dd26 ("gpio: stm32f7: Add gpio bank holes management")
proposed a first implementation by not counting GPIO "inside" hole. GPIO
are not displaying correctly using gpio or pinmux command when GPIO holes
are located at the beginning of GPIO bank.

To simplify, consider that all GPIO have 16 GPIO and use the gpio_ranges
struct to indicate if a GPIO is mapped or not. GPIO uclass offers several
GPIO functions ("input", "output", "unused", "unknown" and "func"), use
"unknown" GPIO function to indicate that a GPIO is not mapped.

stm32_offset_to_index() is no more needed and removed.

This must be reflected using the "gpio" command to indicate to user
that a particular GPIO is not mapped (marked as "unknown") as shown below:

Example for a 16 pins GPIO bank with the [2-7] mapping (only 6 pins
mapped):
GPIOI0          : unknown
GPIOI1          : unknown
GPIOI2          : analog
GPIOI3          : analog
GPIOI4          : alt function 0 push-pull pull-down
GPIOI5          : alt function 0 push-pull pull-down
GPIOI6          : alt function 0 push-pull pull-down
GPIOI7          : analog
GPIOI8          : unknown
GPIOI9          : unknown
GPIOI10         : unknown
GPIOI11         : unknown
GPIOI12         : unknown
GPIOI13         : unknown
GPIOI14         : unknown
GPIOI15         : unknown

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10 13:54:48 +02:00
..
74x164_gpio.c
adi_gpio2.c
altera_pio.c
at91_gpio.c
atmel_pio4.c
axp_gpio.c
bcm2835_gpio.c
bcm6345_gpio.c
cortina_gpio.c
da8xx_gpio.c gpio: da8xx_gpio: Fix gpio name with address 2022-01-16 08:31:03 -05:00
da8xx_gpio.h
dwapb_gpio.c
gpio_slg7xl45106.c gpio: slg7xl45106: Update gpio desc flags from DT 2022-04-05 15:13:13 +02:00
gpio-aspeed.c gpio: aspeed: Fix incorrect offset of read back register. 2022-04-19 14:51:11 -04:00
gpio-fxl6408.c GPIO: fxl6408: Add support for FXL6408 GPIO expander 2022-02-05 13:38:39 +01:00
gpio-rcar.c
gpio-rza1.c
gpio-uclass.c gpio: Enable hogging support in SPL 2022-04-08 22:51:48 -04:00
gpio-uniphier.c
hi6220_gpio.c
hsdk-creg-gpio.c
imx_rgpio2p.c
intel_broadwell_gpio.c
intel_gpio.c
intel_ich6_gpio.c
iproc_gpio.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
Kconfig gpio: npcm: Add support for Nuvoton NPCM SoCs 2022-05-05 09:29:58 -04:00
kona_gpio.c
kw_gpio.c
lpc32xx_gpio.c
Makefile gpio: npcm: Add support for Nuvoton NPCM SoCs 2022-05-05 09:29:58 -04:00
max7320_gpio.c
mcp230xx_gpio.c
mpc8xxx_gpio.c
mpc83xx_gpio.c
mpc83xx_spisel_boot.c
mscc_sgpio.c
msm_gpio.c pinctrl: qcom: add pinctrl and gpio drivers for SDM845 SoC 2021-10-31 08:46:44 -04:00
mt7620_gpio.c
mt7621_gpio.c
mvebu_gpio.c
mvgpio.c
mvgpio.h
mxc_gpio.c
mxs_gpio.c
nmk_gpio.c
npcm_gpio.c gpio: npcm: Add support for Nuvoton NPCM SoCs 2022-05-05 09:29:58 -04:00
nx_gpio.c
octeon_gpio.c pci: Add mask parameter to dm_pci_map_bar() 2022-05-03 18:33:29 -04:00
omap_gpio.c
pca953x_gpio.c gpio: pca953x_gpio: add PCA957X support 2022-04-08 22:51:48 -04:00
pca953x.c
pca9698.c
pcf8575_gpio.c
pic32_gpio.c
pm8916_gpio.c pinctrl: qcom: add pinctrl and gpio drivers for SDM845 SoC 2021-10-31 08:46:44 -04:00
rk_gpio.c
s5p_gpio.c SoC: exynos: add support for exynos 78x0 2021-10-31 11:25:39 -04:00
sandbox_test.c
sandbox.c
sh_pfc.c
sifive-gpio.c gpio: sifive: Fix -Wint-to-pointer-cast warning 2021-10-20 10:59:09 +08:00
sl28cpld-gpio.c gpio: add sl28cpld driver 2022-02-28 11:59:35 +05:30
stm32_gpio_priv.h gpio: stm32_gpio: Rework GPIO hole management 2022-05-10 13:54:48 +02:00
stm32_gpio.c gpio: stm32_gpio: Rework GPIO hole management 2022-05-10 13:54:48 +02:00
sunxi_gpio.c sunxi: pinctrl: Create the driver skeleton 2022-04-04 23:23:50 +01:00
tca642x.c
tegra186_gpio_priv.h
tegra186_gpio.c
tegra_gpio.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
vybrid_gpio.c
xilinx_gpio.c
zynq_gpio.c
zynqmp_gpio_modepin.c zynqmp: gpio: Add support for zynqmp gpio modepin driver 2022-01-05 10:22:02 +01:00