Merge "init: Improve check for sensors core presence"
This commit is contained in:
commit
9483e4e9e4
|
@ -1,5 +1,5 @@
|
||||||
#!/system/bin/sh
|
#!/system/bin/sh
|
||||||
# Copyright (c) 2009-2012, The Linux Foundation. All rights reserved.
|
# Copyright (c) 2009-2013, The Linux Foundation. All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions are met:
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -33,6 +33,7 @@ platformid=`cat /sys/devices/system/soc/soc0/id`
|
||||||
#
|
#
|
||||||
start_sensors()
|
start_sensors()
|
||||||
{
|
{
|
||||||
|
if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then
|
||||||
mkdir -p /data/system/sensors
|
mkdir -p /data/system/sensors
|
||||||
touch /data/system/sensors/settings
|
touch /data/system/sensors/settings
|
||||||
chmod 775 /data/system/sensors
|
chmod 775 /data/system/sensors
|
||||||
|
@ -48,6 +49,7 @@ start_sensors()
|
||||||
echo 1 > /data/system/sensors/settings
|
echo 1 > /data/system/sensors/settings
|
||||||
fi
|
fi
|
||||||
start sensors
|
start sensors
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
start_battery_monitor()
|
start_battery_monitor()
|
||||||
|
@ -102,6 +104,8 @@ case "$target" in
|
||||||
fi
|
fi
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
start_sensors
|
||||||
|
|
||||||
case "$target" in
|
case "$target" in
|
||||||
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
|
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
|
||||||
value=`cat /sys/devices/system/soc/soc0/hw_platform`
|
value=`cat /sys/devices/system/soc/soc0/hw_platform`
|
||||||
|
@ -114,14 +118,10 @@ case "$target" in
|
||||||
platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
|
platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
|
||||||
case "$platformvalue" in
|
case "$platformvalue" in
|
||||||
"Fluid")
|
"Fluid")
|
||||||
start_sensors
|
|
||||||
start profiler_daemon;;
|
start profiler_daemon;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
"msm8960")
|
"msm8960")
|
||||||
if [ "$platformid" != "116" ] && [ "$platformid" != "142" ]; then
|
|
||||||
start_sensors
|
|
||||||
fi
|
|
||||||
case "$baseband" in
|
case "$baseband" in
|
||||||
"msm")
|
"msm")
|
||||||
start_battery_monitor;;
|
start_battery_monitor;;
|
||||||
|
@ -135,7 +135,4 @@ case "$target" in
|
||||||
start profiler_daemon;;
|
start profiler_daemon;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
"msm8974")
|
|
||||||
start_sensors
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue