]> 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:07:35 +0000 (11:07 +0100)
commit155c3407eceb9bf1c4c3571d3846ce3b46732d0a
tree6938b62938679faf9917934bcb5bc3e32d08d706
parent9324127b07dde8529222dc19233aa57ec810856c
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