qcom: Cleanup init.qcom.usb.sh

Drop code relevant for unsupported targets and
define default usb compositions so that we don't
need to change this file for every new target.

Change-Id: Ib6ae26f9ffeb8b68e7703296fbea8372d17b1a64
This commit is contained in:
Manu Gautam 2013-09-11 13:43:16 +05:30
parent b7978baa0e
commit a1e67e44d1
1 changed files with 18 additions and 38 deletions

View File

@ -88,43 +88,23 @@ echo 1 > /sys/class/android_usb/f_mass_storage/lun/nofua
usb_config=`getprop persist.sys.usb.config`
case "$usb_config" in
"" | "adb") #USB persist config not set, select default configuration
case $target in
"msm8960" | "msm8974" | "msm8226" | "msm8610" | "apq8084")
case "$baseband" in
"mdm")
setprop persist.sys.usb.config diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
;;
"sglte")
setprop persist.sys.usb.config diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage,adb
;;
"dsda" | "sglte2")
setprop persist.sys.usb.config diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage,adb
;;
"dsda2")
setprop persist.sys.usb.config diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage,adb
;;
*)
setprop persist.sys.usb.config diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
;;
esac
;;
"msm7627a")
setprop persist.sys.usb.config diag,serial_smd,serial_tty,rmnet_smd,mass_storage,adb
;;
* )
case "$baseband" in
"svlte2a")
setprop persist.sys.usb.config diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage,adb
;;
"csfb")
setprop persist.sys.usb.config diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage,adb
;;
*)
setprop persist.sys.usb.config diag,serial_tty,serial_tty,rmnet_smd,mass_storage,adb
;;
esac
;;
esac
case "$baseband" in
"mdm")
setprop persist.sys.usb.config diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
;;
"sglte")
setprop persist.sys.usb.config diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage,adb
;;
"dsda" | "sglte2")
setprop persist.sys.usb.config diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage,adb
;;
"dsda2")
setprop persist.sys.usb.config diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage,adb
;;
*)
setprop persist.sys.usb.config diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
;;
esac
;;
* ) ;; #USB persist config exists, do nothing
esac
@ -136,7 +116,7 @@ target=`getprop ro.product.device`
cdromname="/system/etc/cdrom_install.iso"
cdromenable=`getprop persist.service.cdrom.enable`
case "$target" in
"msm7627a" | "msm8226" | "msm8610")
"msm8226" | "msm8610")
case "$cdromenable" in
0)
echo "" > /sys/class/android_usb/android0/f_mass_storage/lun0/file