pinctrl-sunxi: sunxi_pinctrl_gpio_direction_in/output: use correct offset
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 26 Jan 2022 11:02:04 +0000 (12:02 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 31 Jan 2022 22:25:29 +0000 (14:25 -0800)
commit3c5412cdec9f6e417e7757974040e461df4a7238
tree7d86ab213d6f1bcc1fcffa067d14c3c8366be8ba
parent26291c54e111ff6ba87a164d85d4a4e134b7315c
pinctrl-sunxi: sunxi_pinctrl_gpio_direction_in/output: use correct offset

The commit that sets the direction directly without calling
pinctrl_gpio_direction(), forgot to add chip->base to the offset when
calling sunxi_pmx_gpio_set_direction().

This caused failures for various Allwinner boards which have two
GPIO blocks.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: 5kft <5kft@5kft.org>
Suggested-by: 5kft <5kft@5kft.org>
Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Fixes: 8df89a7cbc63 (pinctrl-sunxi: don't call pinctrl_gpio_direction())
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Tested-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/0f536cd8-01db-5d16-2cec-ec6d19409a49@xs4all.nl
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/pinctrl/sunxi/pinctrl-sunxi.c