Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84271fc8 authored by Mayank Rana's avatar Mayank Rana
Browse files

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: default avatarMayank Rana <mrana@codeaurora.org>
parent ef3068bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment