提交 2925d366 编写于 作者: S Stephen Boyd 提交者: Chanwoo Choi

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: 38085c98 ("extcon: Add support for qcom SPMI PMIC USB id detection hardware")
Signed-off-by: NStephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
上级 07d9a380
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册