diff options
| author | Chen-Yu Tsai <wens@kernel.org> | 2026-02-24 17:24:18 +0800 |
|---|---|---|
| committer | Linus Walleij <linusw@kernel.org> | 2026-02-24 10:51:53 +0100 |
| commit | 01e10d0272b932f908b4f9b6609a10cb1f35fafe (patch) | |
| tree | 026118167967eacf9aed9da866030ccde67b52dc /include/linux/atomic | |
| parent | 45fe4592454368df24d18352be700ff40e7df0c0 (diff) | |
pinctrl: sunxi: Implement gpiochip::get_direction()
After commit 471e998c0e31 ("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 e623c4303ed1 ("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>
Diffstat (limited to 'include/linux/atomic')
0 files changed, 0 insertions, 0 deletions
