linux/drivers/pinctrl/sunxi
Chen-Yu Tsai 01e10d0272 pinctrl: sunxi: Implement gpiochip::get_direction()
After commit 471e998c0e ("gpiolib: remove redundant callback check"),
a warning will be printed if the gpio driver does not implement this
callback. The warning was added in commit e623c4303e ("gpiolib:
sanitize the return value of gpio_chip::get_direction()"), but was
masked by the "redundant" check.

The warning can be triggered by any action that calls the callback,
such as dumping the GPIO state from /sys/kernel/debug/gpio.

Implement it for the sunxi driver. This is simply a matter of reading
out the mux value from the registers, then checking if it is one of
the GPIO functions and which direction it is.

Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-24 10:51:53 +01:00
..
Kconfig pinctrl: sunxi: Add support for the secondary A523 GPIO ports 2025-03-13 14:48:57 +01:00
Makefile pinctrl: sunxi: Add support for the secondary A523 GPIO ports 2025-03-13 14:48:57 +01:00
pinctrl-sun4i-a10.c pinctrl: sunxi: refactor pinctrl variants into flags 2025-03-13 14:48:55 +01:00
pinctrl-sun5i.c pinctrl: sunxi: refactor pinctrl variants into flags 2025-03-13 14:48:55 +01:00
pinctrl-sun6i-a31-r.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun6i-a31.c pinctrl: sunxi: refactor pinctrl variants into flags 2025-03-13 14:48:55 +01:00
pinctrl-sun8i-a23-r.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun8i-a23.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun8i-a33.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun8i-a83t-r.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun8i-a83t.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun8i-h3-r.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun8i-h3.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun8i-v3s.c pinctrl: sunxi: v3s: Fix wrong comment about UART2 pinmux 2025-07-04 10:00:35 +02:00
pinctrl-sun9i-a80-r.c pinctrl: sunxi: sun9i-a80-r: drop driver owner assignment 2024-04-04 13:39:47 +02:00
pinctrl-sun9i-a80.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun20i-d1.c pinctrl: sunxi: refactor pinctrl variants into flags 2025-03-13 14:48:55 +01:00
pinctrl-sun50i-a64-r.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun50i-a64.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun50i-a100-r.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun50i-a100.c pinctrl: sunxi: add missed lvds pins for a100/a133 2025-01-13 15:29:23 +01:00
pinctrl-sun50i-h5.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun50i-h6-r.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun50i-h6.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun50i-h616-r.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sun50i-h616.c pinctrl: sunxi: h616: add extra gpio banks 2023-09-25 15:26:33 +02:00
pinctrl-sun55i-a523-r.c pinctrl: sunxi: Add support for the secondary A523 GPIO ports 2025-03-13 14:48:57 +01:00
pinctrl-sun55i-a523.c pinctrl: sunxi: Add support for the Allwinner A523 2025-03-13 14:48:57 +01:00
pinctrl-suniv-f1c100s.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-sunxi-dt.c pinctrl: Simplify printks with pOF format 2025-09-12 14:19:31 +02:00
pinctrl-sunxi.c pinctrl: sunxi: Implement gpiochip::get_direction() 2026-02-24 10:51:53 +01:00
pinctrl-sunxi.h pinctrl: sunxi: allow reading mux values from DT 2025-03-13 14:48:57 +01:00