diff options
author | Scott Collyer <scollyer@google.com> | 2019-02-12 17:20:23 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-02-27 13:43:44 -0800 |
commit | a9ec276b2d3417518a46db8f703b6e0a2756a9f9 (patch) | |
tree | 025a74adf679260935b3a9c0d7010c1262d8488c /baseboard | |
parent | 62e6e0ac57958e976fd7575febe0c8d2926a39bf (diff) | |
download | chrome-ec-a9ec276b2d3417518a46db8f703b6e0a2756a9f9.tar.gz |
hatch: Add support for BMA253 lid accel sensor and lid angle detection
This CL adds the config options required for the BMA253 lid accel
sensor. It also adds the configuration table, mutex, and rotation
matrix.
BUG=b:124337208
BRANCH=none
TEST=Verified the sensor readings using 'accelinfo on 10000' and the
numbers change on the desired axis when the sensor is moved. The signs
can't be verified yet because it's not properly mounted on P0.
Change-Id: I2943a82a91472d105d97dba76917f40817f5624e
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1468865
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Tested-by: Zack Yang <zack_yang@compal.corp-partner.google.com>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r-- | baseboard/hatch/baseboard.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/baseboard/hatch/baseboard.c b/baseboard/hatch/baseboard.c index f1932989f2..ad89d52284 100644 --- a/baseboard/hatch/baseboard.c +++ b/baseboard/hatch/baseboard.c @@ -363,3 +363,14 @@ void baseboard_mst_enable_control(enum mst_source src, int level) gpio_set_level(GPIO_EN_MST, mst_input_levels ? 1 : 0); } + +/* Enable or disable input devices, based on chipset state */ +#ifndef TEST_BUILD +void lid_angle_peripheral_enable(int enable) +{ + /* TODO(b/125936966): Need to add SKU dependency for convertibles */ + if (chipset_in_state(CHIPSET_STATE_ANY_OFF)) + enable = 0; + keyboard_scan_enable(enable, KB_SCAN_DISABLE_LID_ANGLE); +} +#endif |