Merge "init: Improve check for sensors core presence"
This commit is contained in:
commit
9483e4e9e4
|
@ -1,5 +1,5 @@
|
|||
#!/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
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
|
@ -33,6 +33,7 @@ platformid=`cat /sys/devices/system/soc/soc0/id`
|
|||
#
|
||||
start_sensors()
|
||||
{
|
||||
if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then
|
||||
mkdir -p /data/system/sensors
|
||||
touch /data/system/sensors/settings
|
||||
chmod 775 /data/system/sensors
|
||||
|
@ -48,6 +49,7 @@ start_sensors()
|
|||
echo 1 > /data/system/sensors/settings
|
||||
fi
|
||||
start sensors
|
||||
fi
|
||||
}
|
||||
|
||||
start_battery_monitor()
|
||||
|
@ -102,6 +104,8 @@ case "$target" in
|
|||
fi
|
||||
esac
|
||||
|
||||
start_sensors
|
||||
|
||||
case "$target" in
|
||||
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
|
||||
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`
|
||||
case "$platformvalue" in
|
||||
"Fluid")
|
||||
start_sensors
|
||||
start profiler_daemon;;
|
||||
esac
|
||||
;;
|
||||
"msm8960")
|
||||
if [ "$platformid" != "116" ] && [ "$platformid" != "142" ]; then
|
||||
start_sensors
|
||||
fi
|
||||
case "$baseband" in
|
||||
"msm")
|
||||
start_battery_monitor;;
|
||||
|
@ -135,7 +135,4 @@ case "$target" in
|
|||
start profiler_daemon;;
|
||||
esac
|
||||
;;
|
||||
"msm8974")
|
||||
start_sensors
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue