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
This commit is contained in:
Mayank Rana 2015-04-28 12:44:30 -07:00
parent 8c6cc36479
commit b7bca58ab3
1 changed files with 15 additions and 0 deletions

View File

@ -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
;;