sdm845-common: recovery: Wait for dwc3 probe then set peripheral mode

Recovery fails to enumerate in USB and device reboots back to full Android
due to race between DWC3 driver probe and recovery init script. Wait for
DWC3 driver to get probed before writing the USB controller mode as
peripheral to avoid the race condition.

Change-Id: Ie3891992836852bb4f99a1d5a7d1237e40a3e69e
This commit is contained in:
Ronak Vijay Raheja 2021-05-26 13:32:32 -07:00 committed by Bruno Martins
parent 9d3dbae79b
commit 9892b43ad4

View File

@ -31,6 +31,7 @@ on init
on property:ro.boot.usbcontroller=*
setprop sys.usb.controller ${ro.boot.usbcontroller}
wait /sys/bus/platform/devices/${ro.boot.usb.dwc3_msm:-a600000.ssusb}/mode
write /sys/bus/platform/devices/${ro.boot.usb.dwc3_msm:-a600000.ssusb}/mode peripheral
on fs