Skip to content

Commit

Permalink
extcon: qcom-spmi-misc: Sync the extcon state on interrupt
Browse files Browse the repository at this point in the history
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: 38085c9 ("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>
  • Loading branch information
Stephen Boyd authored and Chanwoo Choi committed Oct 26, 2016
1 parent 07d9a38 commit 2925d36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/extcon/extcon-qcom-spmi-misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static void qcom_usb_extcon_detect_cable(struct work_struct *work)
if (ret)
return;

extcon_set_state(info->edev, EXTCON_USB_HOST, !id);
extcon_set_state_sync(info->edev, EXTCON_USB_HOST, !id);
}

static irqreturn_t qcom_usb_irq_handler(int irq, void *dev_id)
Expand Down

0 comments on commit 2925d36

Please sign in to comment.