OSDN Git Service

init.sh: add quirks for Lenovo IdeaPad D330
authorChih-Wei Huang <cwhuang@linux.org.tw>
Sun, 12 Apr 2020 13:32:21 +0000 (21:32 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Sun, 12 Apr 2020 13:32:21 +0000 (21:32 +0800)
Tested-by: Ashutosh prusty <ashutoshprusty29@gmail.com>
init.sh

diff --git a/init.sh b/init.sh
index 32a83a4..d2c52ad 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -131,11 +131,15 @@ function init_hal_bluetooth()
 
 function init_hal_camera()
 {
-       case "$PRODUCT" in
-               e-tab*Pro)
+       case "$UEVENT" in
+               *e-tabPro*)
                        set_prop_if_empty hal.camera.0 0,270
                        set_prop_if_empty hal.camera.2 1,90
                        ;;
+               *LenovoideapadD330*)
+                       set_prop_if_empty hal.camera.0 0,90
+                       set_prop_if_empty hal.camera.2 1,90
+                       ;;
                *)
                        ;;
        esac
@@ -298,6 +302,10 @@ function init_hal_sensors()
                        modprobe hdaps
                        hal_sensors=hdaps
                        ;;
+               *LenovoideapadD330*)
+                       set_property ro.iio.accel.quirks no-trig
+                       set_property ro.iio.accel.order 102
+                       ;&
                *LINX1010B*)
                        set_property ro.iio.accel.x.opt_scale -1
                        set_property ro.iio.accel.z.opt_scale -1