diff options
author | Divya Sasidharan <divya.s.sasidharan@intel.com> | 2018-05-01 14:24:18 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-17 19:34:53 -0700 |
commit | 160f62a60a8c36474c77fff1afa15a002f942a83 (patch) | |
tree | 07622ca93d5c6cf31cd1847977b788b74941a256 /board/yorp/board.c | |
parent | ae6d7a30c333308a5aebdfc0b7dc012a2a50324a (diff) | |
download | chrome-ec-160f62a60a8c36474c77fff1afa15a002f942a83.tar.gz |
yorp: Enable tablet mode
Enables tablet mode to change screen rotation with
respect to portrait / landscape mode.
BUG=b:78898771
BRANCH=None
TEST=make buildall -j
Change-Id: Ib959daee5b2dfa24b0a31e6bbf91f238d251abd0
Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/1038605
Commit-Ready: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Tested-by: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/yorp/board.c')
-rw-r--r-- | board/yorp/board.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/board/yorp/board.c b/board/yorp/board.c index 2606bdb1a3..2b062171cd 100644 --- a/board/yorp/board.c +++ b/board/yorp/board.c @@ -31,6 +31,7 @@ #include "power_button.h" #include "switch.h" #include "system.h" +#include "tablet_mode.h" #include "temp_sensor.h" #include "thermistor.h" #include "tcpci.h" @@ -305,6 +306,14 @@ const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); /* This callback disables keyboard when convertibles are fully open */ void lid_angle_peripheral_enable(int enable) { + /* + * If the lid is in tablet position via other sensors, + * ignore the lid angle, which might be faulty then + * disable keyboard. + */ + if (tablet_get_mode()) + enable = 0; + keyboard_scan_enable(enable, KB_SCAN_DISABLE_LID_ANGLE); } #endif |