X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=init.sh;h=8758717d3fba3181ae1733d6c21e8dfa5eaf6dce;hb=c52664a918fb4337c2f6580fd571b2df30a3485d;hp=906f081096499b22a57f79bd0271efd5121ebf7a;hpb=ca0e593588254da9de33923a70d4e9f737f01976;p=android-x86%2Fdevice-generic-common.git diff --git a/init.sh b/init.sh index 906f081..8758717 100644 --- a/init.sh +++ b/init.sh @@ -20,6 +20,7 @@ function init_misc() case "$PRODUCT" in T10*TA) + modprobe ak8975 ;; *) ;; @@ -206,11 +207,9 @@ function init_hal_sensors() # has sensor-hub? for i in /sys/bus/iio/devices/iio:device?; do - if [ -e $i/in_accel_scale ]; then - busybox chown -R 1000.1000 /sys/bus/iio/devices/iio:device?/ - hal_sensors=hsb - break - fi + busybox chown -R 1000.1000 /sys/bus/iio/devices/iio:device?/ + lsmod | grep -q hid_sensor_accel_3d && hal_sensors=hsb || hal_sensors=iio + break done set_property ro.hardware.sensors $hal_sensors