linux/drivers/pinctrl
Bartosz Golaszewski 75f87f5d04 pinctrl: bcm2835: don't -EINVAL on alternate funcs from get_direction()
Since commit 9d846b1aeb ("gpiolib: check the return value of
gpio_chip::get_direction()") we check the return value of the
get_direction() callback as per its API contract. This driver returns
-EINVAL if the pin in question is set to one of the alternative
(non-GPIO) functions. This isn't really an error that should be
communicated to GPIOLIB so default to returning the "safe" value of
INPUT in this case. The GPIO subsystem does not have the notion of
"unknown" direction.

Fixes: 9d846b1aeb ("gpiolib: check the return value of gpio_chip::get_direction()")
Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lore.kernel.org/all/Z7VFB1nST6lbmBIo@finisterre.sirena.org.uk/
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/20250219102750.38519-1-brgl@bgdev.pl
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-03-04 08:52:34 +01:00
..
actions
aspeed pinctrl: aspeed-g6: Support drive-strength for GPIOF/G 2024-10-28 13:58:43 +01:00
bcm pinctrl: bcm2835: don't -EINVAL on alternate funcs from get_direction() 2025-03-04 08:52:34 +01:00
berlin
cirrus pinctrl: Use str_enable_disable-like helpers 2025-01-15 12:52:26 +01:00
freescale pinctrl: Use of_property_present() for non-boolean properties 2024-11-08 09:02:15 +01:00
intel module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
mediatek pinctrl: mediatek: Drop mtk_pinconf_bias_set_pd() 2025-01-08 22:52:44 +01:00
meson pinctrl: Add driver support for Amlogic SoCs 2025-02-28 00:03:18 +01:00
mvebu Fix a potential abuse of seq_printf() format string in drivers 2024-11-22 15:31:35 +01:00
nomadik pinctrl: Use str_enable_disable-like helpers 2025-01-15 12:52:26 +01:00
nuvoton pinctrl: wpcm450: Switch to use for_each_gpiochip_node() helper 2025-02-28 00:29:48 +01:00
nxp pinctrl: s32: add missing pins definitions 2024-10-09 18:16:56 +02:00
pxa
qcom pinctrl: qcom: Add test case for TLMM interrupt handling 2025-02-28 09:41:14 +01:00
realtek
renesas pinctrl: renesas: rzg2l: Suppress binding attributes 2025-02-20 17:33:08 +01:00
samsung pinctrl: Use str_enable_disable-like helpers 2025-01-15 12:52:26 +01:00
sophgo pinctrl: sophgo: add support for SG2044 SoC 2025-02-27 23:56:18 +01:00
spacemit pinctrl: spacemit: fix double free of map 2024-10-28 13:54:04 +01:00
spear
sprd pinctrl: Switch back to struct platform_driver::remove() 2024-10-11 21:45:47 +02:00
starfive
stm32 pinctrl: Use str_enable_disable-like helpers 2025-01-15 12:52:26 +01:00
sunplus
sunxi pinctrl: sunxi: add missed lvds pins for a100/a133 2025-01-13 15:29:23 +01:00
tegra pinctrl-tegra: Add config property GPIO mode 2025-02-28 09:37:25 +01:00
ti
uniphier
visconti
vt8500
Kconfig pinctrl: spacemit: add support for SpacemiT K1 SoC 2024-10-19 20:15:12 +02:00
Makefile pinctrl: spacemit: add support for SpacemiT K1 SoC 2024-10-19 20:15:12 +02:00
core.c pinctrl: Fix the clean up on pinconf_apply_setting failure 2024-12-27 17:07:56 +01:00
core.h pinmux: Use sequential access to access desc->pinmux data 2024-10-23 11:59:23 +02:00
devicetree.c pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map 2025-02-17 00:16:01 +01:00
devicetree.h
pinconf-generic.c Merge branch 'ib-amlogic-a4' into devel 2025-02-28 00:03:55 +01:00
pinconf.c
pinconf.h pinctrl: pinconf-generic: Add API for pinmux propertity in DTS file 2025-02-28 00:03:17 +01:00
pinctrl-amd.c pinctrl: Use str_enable_disable-like helpers 2025-01-15 12:52:26 +01:00
pinctrl-amd.h pinctrl: amd: Take suspend type into consideration which pins are non-wake 2025-01-14 14:33:59 +01:00
pinctrl-apple-gpio.c pinctrl: apple: check devm_kasprintf() returned value 2024-10-01 14:03:34 +02:00
pinctrl-artpec6.c pinctrl: Switch back to struct platform_driver::remove() 2024-10-11 21:45:47 +02:00
pinctrl-as3722.c
pinctrl-at91-pio4.c
pinctrl-at91.c
pinctrl-at91.h
pinctrl-aw9523.c pinctrl: aw9523: fix kerneldoc for _aw9523_gpio_get_multiple() 2024-10-10 21:35:46 +02:00
pinctrl-axp209.c
pinctrl-bm1880.c
pinctrl-cy8c95x0.c pinctrl: cy8c95x0: Fix comment style 2025-02-17 00:17:26 +01:00
pinctrl-da850-pupd.c
pinctrl-da9062.c
pinctrl-digicolor.c
pinctrl-ep93xx.c
pinctrl-equilibrium.c
pinctrl-equilibrium.h
pinctrl-eyeq5.c
pinctrl-falcon.c
pinctrl-gemini.c pinctrl: Use str_enable_disable-like helpers 2025-01-15 12:52:26 +01:00
pinctrl-ingenic.c pinctrl: ingenic: Replace seq_printf() by seq_puts() 2024-12-17 15:05:43 +01:00
pinctrl-k210.c pinctrl: k210: Undef K210_PC_DEFAULT 2024-11-18 23:51:05 +01:00
pinctrl-k230.c pinctrl: k230: Drop unused code 2024-10-04 09:46:27 +02:00
pinctrl-keembay.c
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-loongson2.c
pinctrl-lpc18xx.c
pinctrl-max77620.c
pinctrl-mcp23s08.c pinctrl: mcp23s08: Get rid of spurious level interrupts 2025-02-17 00:16:02 +01:00
pinctrl-mcp23s08.h
pinctrl-mcp23s08_i2c.c
pinctrl-mcp23s08_spi.c
pinctrl-microchip-sgpio.c
pinctrl-mlxbf3.c
pinctrl-ocelot.c pinctrl: ocelot: Constify some structures 2024-12-20 13:48:31 +01:00
pinctrl-palmas.c
pinctrl-pef2256.c
pinctrl-pic32.c
pinctrl-pic32.h
pinctrl-pistachio.c pinctrl: pistachio: Remove dead code in pistachio_gpio_register() 2025-02-17 00:16:01 +01:00
pinctrl-rk805.c
pinctrl-rockchip.c pinctrl: rockchip: Add support for RK3528 2025-03-04 08:50:05 +01:00
pinctrl-rockchip.h pinctrl: rockchip: Add support for RK3528 2025-03-04 08:50:05 +01:00
pinctrl-scmi.c
pinctrl-single.c pinctrl: single: add marvell,pxa1908-padconf compatible 2024-11-08 09:32:21 +01:00
pinctrl-st.c
pinctrl-stmfx.c pinctrl: Use str_enable_disable-like helpers 2025-01-15 12:52:26 +01:00
pinctrl-sx150x.c Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
pinctrl-tb10x.c pinctrl: Switch back to struct platform_driver::remove() 2024-10-11 21:45:47 +02:00
pinctrl-th1520.c pinctrl: th1520: Fix potential null pointer dereference on func 2024-10-16 21:30:18 +02:00
pinctrl-tps6594.c
pinctrl-utils.c
pinctrl-utils.h
pinctrl-xway.c pinctrl: Use of_property_present() for non-boolean properties 2024-11-08 09:02:15 +01:00
pinctrl-zynq.c
pinctrl-zynqmp.c pinctrl: zynqmp: drop excess struct member description 2024-10-10 21:48:11 +02:00
pinmux.c pinmux: Use sequential access to access desc->pinmux data 2024-10-23 11:59:23 +02:00
pinmux.h