]> www.infradead.org Git - users/hch/misc.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)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 15 Apr 2025 07:17:39 +0000 (09:17 +0200)
commit3ede3f8b4b4b399b0ca41e44959f80d5cf84fc98
tree5933a3ed0cba7cc346746425b6ce80f424d7374b
parenta63cafe241d2359ed364f3b04e09bafcbada22cc
pinctrl: mcp23s08: Reset all pins to input at probe

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>
drivers/pinctrl/pinctrl-mcp23s08.c