diff options
author | Stephen Boyd <stephen.boyd@linaro.org> | 2016-10-17 20:16:02 -0400 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2016-10-26 03:04:29 -0400 |
commit | 2925d366f450dc1db0ac88f2509a0eec0fef4226 (patch) | |
tree | 3a716c73567b80cf866d88ee0d8794d9b02e6e2a /drivers/extcon/extcon-qcom-spmi-misc.c | |
parent | 07d9a380680d1c0eb51ef87ff2eab5c994949e69 (diff) |
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>
Diffstat (limited to 'drivers/extcon/extcon-qcom-spmi-misc.c')
-rw-r--r-- | drivers/extcon/extcon-qcom-spmi-misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-qcom-spmi-misc.c b/drivers/extcon/extcon-qcom-spmi-misc.c index ca957a5f4291..b8cde096a808 100644 --- a/drivers/extcon/extcon-qcom-spmi-misc.c +++ b/drivers/extcon/extcon-qcom-spmi-misc.c | |||
@@ -51,7 +51,7 @@ static void qcom_usb_extcon_detect_cable(struct work_struct *work) | |||
51 | if (ret) | 51 | if (ret) |
52 | return; | 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 | static irqreturn_t qcom_usb_irq_handler(int irq, void *dev_id) | 57 | static irqreturn_t qcom_usb_irq_handler(int irq, void *dev_id) |