dwc3-msm: Use resume_work() with USB VBUS state notification
USB VBUS state is updated using USB power supply present callback
i.e. dwc3_msm_power_set_property_usb() API. On some platform or
customized board design, USB VBUS state is detected using gpio
without any PMIC hardware and software. There is race condition
seen where gpio detect driver updates initial VBUS state from its
probe() and later on receiving VBUS interrupt i.e. from interrupt
context (i.e. gpio_usbdetect_vbus_irq()). If VBUS state is updated
from interrupt context before sm_work() runs (scheduled due to gpio
detect driver's probe() context), then USB driver is calling
(i.e. dwc3_msm_power_set_property_usb() API) dwc3_ext_event_notify()
instead of scheduling sm_work(). This results into trying to
flush sm_work() from interrupt context. Fix this issue by always
queueing resume_work() on receiving USB VBUS state notification.
Change-Id: Ib2d6bc2051c8bc60a69263e7abfce1fd7c6c4347
Signed-off-by:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment