mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
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>
This commit is contained in:
@@ -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) */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -164,3 +164,10 @@ static void enable_peripherals(void)
|
||||
lid_angle_peripheral_enable(1);
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_RESUME, enable_peripherals, HOOK_PRIO_DEFAULT);
|
||||
|
||||
/* Board level callback was not linked in test build, implement it here. */
|
||||
#ifdef TEST_BUILD
|
||||
void lid_angle_peripheral_enable(int enable)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user