summaryrefslogtreecommitdiff
path: root/board/oak
diff options
context:
space:
mode:
authorRong Chang <rongchang@chromium.org>2016-02-22 19:11:05 +0800
committerchrome-bot <chrome-bot@chromium.org>2016-03-02 13:39:47 -0800
commit6877eee247250cb0e962ef8ddf1544aba4b75e6b (patch)
tree1f84401d0ff5c9b0e3f2f9c0a891f218930342cd /board/oak
parentec32233219a125c4b70146bb096a1ac972c40542 (diff)
downloadchrome-ec-6877eee247250cb0e962ef8ddf1544aba4b75e6b.tar.gz
oak: enable lid angle update
This change enables lid angle update that turns off keyboard scan in tablet mode. BRANCH=none BUG=chrome-os-partner:49114 TEST=make BOARD=oak runtests make BOARD=oak -j && make BOARD=oak_pd -j load on oak and boot to vt2 console. flip lid to disable range, type keyboard and check. Signed-off-by: Rong Chang <rongchang@chromium.org> Change-Id: Ibd2f0d6ae33a95380c9fc52a7568166a04c119e9 Reviewed-on: https://chromium-review.googlesource.com/328884 Reviewed-by: Wei-Ning Huang <wnhuang@chromium.org>
Diffstat (limited to 'board/oak')
-rw-r--r--board/oak/board.c6
-rw-r--r--board/oak/board.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/board/oak/board.c b/board/oak/board.c
index d2ac75d20b..6c1f9ff571 100644
--- a/board/oak/board.c
+++ b/board/oak/board.c
@@ -27,6 +27,7 @@
#include "host_command.h"
#include "i2c.h"
#include "keyboard_raw.h"
+#include "keyboard_scan.h"
#include "lid_switch.h"
#include "math_util.h"
#include "motion_lid.h"
@@ -748,4 +749,9 @@ struct motion_sensor_t motion_sensors[] = {
},
};
const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);
+
+void lid_angle_peripheral_enable(int enable)
+{
+ keyboard_scan_enable(enable, KB_SCAN_DISABLE_LID_ANGLE);
+}
#endif /* defined(HAS_TASK_MOTIONSENSE) */
diff --git a/board/oak/board.h b/board/oak/board.h
index 46072eb001..b657b1b257 100644
--- a/board/oak/board.h
+++ b/board/oak/board.h
@@ -79,6 +79,7 @@
#define CONFIG_LID_ANGLE
#define CONFIG_LID_ANGLE_SENSOR_BASE 0
#define CONFIG_LID_ANGLE_SENSOR_LID 2
+#define CONFIG_LID_ANGLE_UPDATE
#define CONFIG_LID_SWITCH
#define CONFIG_LOW_POWER_IDLE
#define CONFIG_MKBP_EVENT