]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0
authorArtur Weber <aweber.kernel@gmail.com>
Thu, 6 Feb 2025 17:46:00 +0000 (18:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 13:01:20 +0000 (14:01 +0100)
commitc7bee225dda48a48943473a1e5e3a73f968a0b0e
tree49a168d94f01e24b4ff3efe2554d2a5255da6f6c
parent19a6d7c28278247e2433cfd7860fb0ea36aee2cd
gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0

[ Upstream commit de1d0d160f64ee76df1d364d521b2faf465a091c ]

The GPIO lock/unlock functions clear/write a bit to the relevant
register for each bank. However, due to an oversight the bit that
was being written was based on the total GPIO number, not the index
of the GPIO within the relevant bank, causing it to fail for any
GPIO above 32 (thus any GPIO for banks above bank 0).

Fix lock/unlock for these banks by using the correct bit.

Fixes: bdb93c03c550 ("gpio: bcm281xx: Centralize register locking")
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250206-kona-gpio-fixes-v2-1-409135eab780@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpio/gpio-bcm-kona.c