diff options
author | Amit Pundir <amit.pundir@linaro.org> | 2021-07-22 22:55:10 +0530 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2021-07-30 14:09:12 +0530 |
commit | 242bcef2b15ad0cf1c879871bd65f6e9ce344eb4 (patch) | |
tree | a75f7f62690fe1b608bb24525dbb8bd2b6b2e1b6 /qcom/set_udc.sh | |
parent | 95188ca30c6c77b0b9db73e70f4cea83bb862924 (diff) |
init.common.usb.rc: Do not hardcode sys.usb.controller property
Upstream commit eb9b7bfd5954 ("arm64: dts: qcom: Harmonize DWC
USB3 DT nodes name") (v5.14-rc1) changed the DTS USB node names,
breaking the sys.usb.controller property hardcoded in the
platfrom specific init.usb.common.rc
This script will get rid of the static/hardcoded proprty name
and set the property to the available on-board USB controller
from /sys/class/udc instead.
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Change-Id: I1255cd9a3456510d93437989e7e378d9e6bc0c8b
Diffstat (limited to 'qcom/set_udc.sh')
-rwxr-xr-x | qcom/set_udc.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/qcom/set_udc.sh b/qcom/set_udc.sh new file mode 100755 index 0000000..571c25d --- /dev/null +++ b/qcom/set_udc.sh @@ -0,0 +1,17 @@ +#! /vendor/bin/sh +# Grep and set the vendor.usb.controller property from +# /sys/class/udc at the boot time. +# +# Upstream commit eb9b7bfd5954 ("arm64: dts: qcom: Harmonize DWC +# USB3 DT nodes name") (v5.14-rc1) changed the DTS USB node names, +# breaking the sys.usb.controller property hardcoded in the +# platform specific init.usb.common.rc +# +# This script will get rid of the static/hardcoded property name +# which we set in init.<hw>.usb.rc and set it to the available +# on-board USB controller from /sys/class/udc instead. + +# Searching for db845c's DWC3 UDC explicitly +UDC_ADDRESS=a600000 +UDC=`/vendor/bin/ls /sys/class/udc/ | /vendor/bin/grep $UDC_ADDRESS` +setprop vendor.usb.controller $UDC |