]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pinctrl: mcp23s08: Reset all pins to input at probe
authorMike Looijmans <mike.looijmans@topic.nl>
Fri, 14 Mar 2025 15:17:45 +0000 (16:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:32 +0000 (11:05 +0100)
commiteb295874a43c584532c331f18c4e42b5e68afa09
treec938f8473595325bbe9594e3624d10983ed41119
parent56ce76e8d406cc72b89aee7931df5cf3f18db49d
pinctrl: mcp23s08: Reset all pins to input at probe

[ Upstream commit 3ede3f8b4b4b399b0ca41e44959f80d5cf84fc98 ]

At startup, the driver just assumes that all registers have their
default values. But after a soft reset, the chip will just be in the
state it was, and some pins may have been configured as outputs. Any
modification of the output register will cause these pins to be driven
low, which leads to unexpected/unwanted effects. To prevent this from
happening, set the chip's IO configuration register to a known safe
mode (all inputs) before toggling any other bits.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Link: https://lore.kernel.org/20250314151803.28903-1-mike.looijmans@topic.nl
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/pinctrl-mcp23s08.c