]> git.hungrycats.org Git - linux/commit
pinctrl: armada-37xx: fix control of pins 32 and up
authorPatrick Williams <alpawi@amazon.com>
Tue, 1 Oct 2019 15:46:31 +0000 (10:46 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2019 08:22:42 +0000 (09:22 +0100)
commit094c0d824044fa8d5516931d7462e9cce69e2402
tree684d7ab4d00e1da3f1d9007407339582deba2d4e
parent40a493c71e460f9dad2c9d718709f4cc33b81038
pinctrl: armada-37xx: fix control of pins 32 and up

commit 20504fa1d2ffd5d03cdd9dc9c9dd4ed4579b97ef upstream.

The 37xx configuration registers are only 32 bits long, so
pins 32-35 spill over into the next register.  The calculation
for the register address was done, but the bitmask was not, so
any configuration to pin 32 or above resulted in a bitmask that
overflowed and performed no action.

Fix the register / offset calculation to also adjust the offset.

Fixes: 5715092a458c ("pinctrl: armada-37xx: Add gpio support")
Signed-off-by: Patrick Williams <alpawi@amazon.com>
Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191001154634.96165-1-alpawi@amazon.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