]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pinctrl: armada-37xx: set GPIO output value before setting direction
authorGabor Juhos <j4g8y7@gmail.com>
Wed, 14 May 2025 19:18:33 +0000 (21:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Jun 2025 11:15:56 +0000 (07:15 -0400)
commitc8d01b8d843216beee6dec07c54dc20fb60d6c6a
tree6e26ec2f916be3e93ad86e2d2fe6e6874946a6fa
parent5c512eb41b1d96aa47bf28f5af6ff6b5b521ee1f
pinctrl: armada-37xx: set GPIO output value before setting direction

commit e6ebd4942981f8ad37189bbb36a3c8495e21ef4c upstream.

Changing the direction before updating the output value in the
OUTPUT_VAL register may result in a glitch on the output line
if the previous value in the OUTPUT_VAL register is different
from the one we want to set.

In order to avoid that, update the output value before changing
the direction.

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-2-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