init.recovery.qcom.rc: Use direct path to set USB peripheral mode

On GKI 2.0 kernels using ADSP PMIC for USB cable detection the
/sys/class/udc/${ro.boot.usbcontroller} does not exist until the
controller is put into peripheral mode. This presents a chicken-
and-egg scenario in which we cannot use this path to locate its
device parent in order to write the mode setting.

Instead, derive the sysfs path using the "ro.boot.usb.dwc3_msm"
property containing the USB parent device name, if present.
Otherwise fall back to the hardcoded "a600000.ssusb" device
that's common to many existing QC platforms.

Change-Id: Id46b435b0739a25c8719a52b13c9f7343242d92d
(cherry picked from commit 046db0c5e68be72d2a726f16a7b0b1ae61f58f99)
1 file changed