]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31
authorGabor Juhos <j4g8y7@gmail.com>
Wed, 14 May 2025 19:18:32 +0000 (21:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Jun 2025 11:15:56 +0000 (07:15 -0400)
commit5c512eb41b1d96aa47bf28f5af6ff6b5b521ee1f
tree771752fb3066dbc69c9ab47201a5aebe8d7f374c
parentaa3679d9f34f2e153003b00eb424d9ce629cafc0
pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31

commit 947c93eb29c2a581c0b0b6d5f21af3c2b7ff6d25 upstream.

The controller has two consecutive OUTPUT_VAL registers and both
holds output value for 32 GPIOs. Due to a missing adjustment, the
current code always uses the first register while setting the
output value whereas it should use the second one for GPIOs > 31.

Add the missing armada_37xx_update_reg() call to adjust the register
according to the 'offset' parameter of the function to fix the issue.

Cc: stable@vger.kernel.org
Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior")
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-1-07e9ac1ab737@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c