android_kernel_xiaomi_sm7250/drivers/extcon
Stephan Gerhold 45a6c3fb4c extcon: sm5502: Reset registers during initialization
[ Upstream commit 6942635032cfd3e003e980d2dfa4e6323a3ce145 ]

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:35:11 +01:00
..
devres.c extcon: Correct description to improve the readability 2017-08-16 09:27:55 +09:00
extcon-adc-jack.c extcon: adc-jack: Fix platform_get_irq's error checking 2017-11-27 10:23:47 +09:00
extcon-arizona.c extcon: arizona: Disable mic detect if running when driver is removed 2019-05-31 06:46:23 -07:00
extcon-axp288.c extcon: axp288: Set USB role where necessary 2018-03-22 13:49:28 +01:00
extcon-gpio.c extcon: gpio: Convert to fully use GPIO descriptor 2018-03-21 13:58:09 +09:00
extcon-intel-cht-wc.c extcon: cht-wc: Return from default case to avoid warnings 2019-11-20 18:45:26 +01:00
extcon-intel-int3496.c extcon: int3496: Use proper GPIO include 2018-07-12 09:06:30 +09:00
extcon-max3355.c extcon: max3355: include mod_devicetable.h 2018-07-11 18:17:56 +02:00
extcon-max8997.c extcon: max8997: Fix lack of path setting in USB device mode 2019-12-13 08:51:15 +01:00
extcon-max14577.c extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set_path() 2017-10-23 14:10:26 +09:00
extcon-max77693.c extcon: max77693: Delete unneeded initialization in max77693_muic_set_path() 2017-11-27 10:23:47 +09:00
extcon-max77843.c extcon: max77843: Add support for SmartDock accessory 2017-10-24 09:48:54 +09:00
extcon-palmas.c extcon: palmas: Don't miss GPIO events during suspend/resume 2017-04-06 10:55:22 +09:00
extcon-qcom-spmi-misc.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
extcon-rt8973a.c extcon: Split out extcon header file for consumer and provider device 2017-10-23 14:07:58 +09:00
extcon-rt8973a.h extcon: rt8973a: Add Richtek RT8973A extcon driver 2014-09-22 11:43:08 +09:00
extcon-sm5502.c extcon: sm5502: Reset registers during initialization 2019-12-31 16:35:11 +01:00
extcon-sm5502.h extcon: sm5502: Reset registers during initialization 2019-12-31 16:35:11 +01:00
extcon-usb-gpio.c extcon: Split out extcon header file for consumer and provider device 2017-10-23 14:07:58 +09:00
extcon-usbc-cros-ec.c extcon: usbc-cros-ec: Switch to SPDX identifier. 2018-07-12 09:06:31 +09:00
extcon.c extcon: Release locking when sending the notification of connector state 2018-07-12 09:06:31 +09:00
extcon.h USB/PHY patches for 4.15-rc1 2017-11-13 21:14:07 -08:00
Kconfig extcon: axp288: Set USB role where necessary 2018-03-22 13:49:28 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00