linux-stable/drivers/extcon
Stephan Gerhold 5f5fdf612e extcon: sm5502: Reset registers during initialization
[ Upstream commit 6942635032 ]

On some devices (e.g. Samsung Galaxy A5 (2015)), the bootloader
seems to keep interrupts enabled for SM5502 when booting Linux.
Changing the cable state (i.e. plugging in a cable) - until the driver
is loaded - will therefore produce an interrupt that is never read.

In this situation, the cable state will be stuck forever on the
initial state because SM5502 stops sending interrupts.
This can be avoided by clearing those pending interrupts after
the driver has been loaded.

One way to do this is to reset all registers to default state
by writing to SM5502_REG_RESET. This ensures that we start from
a clean state, with all interrupts disabled.

Suggested-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-31 16:44:04 +01:00
..
devres.c
extcon-adc-jack.c
extcon-arizona.c
extcon-axp288.c
extcon-fsa9480.c
extcon-gpio.c
extcon-intel-cht-wc.c
extcon-intel-int3496.c
extcon-intel-mrfld.c
extcon-intel.h
extcon-max3355.c
extcon-max8997.c
extcon-max14577.c
extcon-max77693.c
extcon-max77843.c
extcon-palmas.c
extcon-ptn5150.c
extcon-qcom-spmi-misc.c
extcon-rt8973a.c
extcon-rt8973a.h
extcon-sm5502.c
extcon-sm5502.h
extcon-usb-gpio.c
extcon-usbc-cros-ec.c
extcon.c
extcon.h
Kconfig
Makefile