Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

extcon: qcom-spmi-misc: Sync the extcon state on interrupt

The driver was changed after submission to use the new style APIs
like extcon_set_state(). Unfortunately, that only sets the state,
and doesn't notify any consumers that the cable state has
changed. Use extcon_set_state_sync() here instead so that we
notify cable consumers of the state change. This fixes USB
host-device role switching on the db8074 platform.

Fixes: 38085c987f52 ("extcon: Add support for qcom SPMI PMIC USB id detection hardware")
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Stephen Boyd and committed by
Chanwoo Choi
2925d366 07d9a380

+1 -1
+1 -1
drivers/extcon/extcon-qcom-spmi-misc.c
··· 51 51 if (ret) 52 52 return; 53 53 54 - extcon_set_state(info->edev, EXTCON_USB_HOST, !id); 54 + extcon_set_state_sync(info->edev, EXTCON_USB_HOST, !id); 55 55 } 56 56 57 57 static irqreturn_t qcom_usb_irq_handler(int irq, void *dev_id)