phy-msm-usb: Add mutex for protecting msm_otg_reset

While booting up with charger connected, there is a chance
that msm_otg_reset getting called two times from two paths,
one from apsd re-run and another as part of udc_bind. This
could create a race condition leading to clocks being not
enabled while accessing registers causing to NOC error.

Fix this by introducing mutex lock in msm_otg_reset for
protecting both the thread's execution.

Change-Id: Ie20eded91bbe37f1ed672b7b926f6e5f31fb0235
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
2 files changed