sdm660-common: init.qcom.usb.sh: Simplify ESOC check
Currently if targets support ESOC there would almost certainly only be a single instance of an external modem. Hence we can simplify the esoc_link check accordingly without needing to do a loop and grep. Choosing the external modem composition simply depends on whether esoc_name is present. Change-Id: Ib47e34fd31c3745a0c7b3568968f6f36681c98e7
This commit is contained in:
parent
14272dab4b
commit
6d21c523c7
1 changed files with 5 additions and 14 deletions
|
@ -42,20 +42,11 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check ESOC for external MDM
|
# Check ESOC for external modem
|
||||||
#
|
#
|
||||||
# Note: currently only a single MDM is supported
|
# Note: currently only a single MDM/SDX is supported
|
||||||
#
|
#
|
||||||
if [ -d /sys/bus/esoc/devices ]; then
|
esoc_name=`cat /sys/bus/esoc/devices/esoc0/esoc_name 2> /dev/null`
|
||||||
for f in /sys/bus/esoc/devices/*; do
|
|
||||||
if [ -d $f ]; then
|
|
||||||
if [ `grep -e "^MDM" -e "^SDX" $f/esoc_name` ]; then
|
|
||||||
esoc_link=`cat $f/esoc_link`
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
target=`getprop ro.board.platform`
|
target=`getprop ro.board.platform`
|
||||||
|
|
||||||
|
@ -78,9 +69,9 @@ miui_release=`getprop ro.fota.oem`
|
||||||
miui_debuggable=`getprop ro.debuggable`
|
miui_debuggable=`getprop ro.debuggable`
|
||||||
if [ "$(getprop persist.vendor.usb.config)" == "" -a \
|
if [ "$(getprop persist.vendor.usb.config)" == "" -a \
|
||||||
"$(getprop init.svc.vendor.usb-gadget-hal-1-0)" != "running" ]; then
|
"$(getprop init.svc.vendor.usb-gadget-hal-1-0)" != "running" ]; then
|
||||||
if [ "$esoc_link" != "" ]; then
|
if [ "$esoc_name" != "" ]; then
|
||||||
setprop persist.vendor.usb.config diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb
|
setprop persist.vendor.usb.config diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb
|
||||||
else
|
else
|
||||||
case "$(getprop ro.baseband)" in
|
case "$(getprop ro.baseband)" in
|
||||||
"apq")
|
"apq")
|
||||||
setprop persist.vendor.usb.config diag,adb
|
setprop persist.vendor.usb.config diag,adb
|
||||||
|
|
Loading…
Reference in a new issue