From b7bca58ab301143726f364d86cbc67a0ac522196 Mon Sep 17 00:00:00 2001 From: Mayank Rana Date: Tue, 28 Apr 2015 12:44:30 -0700 Subject: [PATCH] init.qcom.usb: Set default MSM8996 composition Set the default USB composition for MSM8996 as below: For msm8996 v1.0: "diag,adb" For msm8996 v2.0 and above: "diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,adb" Change-Id: Ide70eec2e6a266eb5d9f52957a8c698712fc575d --- rootdir/etc/init.qcom.usb.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/rootdir/etc/init.qcom.usb.sh b/rootdir/etc/init.qcom.usb.sh index e9ca07cd..d8e744ea 100644 --- a/rootdir/etc/init.qcom.usb.sh +++ b/rootdir/etc/init.qcom.usb.sh @@ -37,6 +37,13 @@ else soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null fi +# Get hardware revision +if [ -f /sys/devices/soc0/revision ]; then + soc_revision=`cat /sys/devices/soc0/revision` 2> /dev/null +else + soc_revision=`cat /sys/devices/system/soc/soc0/revision` 2> /dev/null +fi + # # Allow persistent usb charging disabling # User needs to set usb charging disabled in persist.usb.chgdisabled @@ -135,6 +142,14 @@ case "$usb_config" in setprop persist.sys.usb.config diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,adb fi ;; + "msm8996") + if [ "$soc_revision" == "1.0" -o "$soc_hwplatform" == "Dragon" ] + then + setprop persist.sys.usb.config diag,adb + else + setprop persist.sys.usb.config diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,adb + fi + ;; "msm8909") setprop persist.sys.usb.config diag,serial_smd,rmnet_qti_bam,adb ;;