diff options
author | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2020-02-10 13:14:36 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-18 19:27:10 +0000 |
commit | b6adca6689753bdbe798cd1e0a56f8a4df749445 (patch) | |
tree | ceebddf3a15ca0996745c6df67f60e6d9aa2097e /baseboard/hatch | |
parent | 980b7bc18f1a1e32bb24c3238d93558a02e5fe99 (diff) | |
download | chrome-ec-b6adca6689753bdbe798cd1e0a56f8a4df749445.tar.gz |
hatch: Add check for convertible SKUs in lid_angle_peripheral_enable
Check for a convertible SKU before turning off the keyboard in the
switch to tablet mode. See go/hatch-skus for the list.
BUG=b:125936966
BRANCH=firmware-hatch-12672.B
TEST=On Kohaku, artificially force SKU to both convertible and
non-convertible SKUs, switch to tablet mode, and then check whether
Alt-Volup-R reboots the EC.
Change-Id: Id29644c4e050705203b860324f14b1b87bc4ccf4
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2047630
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Diffstat (limited to 'baseboard/hatch')
-rw-r--r-- | baseboard/hatch/baseboard.c | 9 | ||||
-rw-r--r-- | baseboard/hatch/baseboard.h | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/baseboard/hatch/baseboard.c b/baseboard/hatch/baseboard.c index 8253f11239..0651ffdc7c 100644 --- a/baseboard/hatch/baseboard.c +++ b/baseboard/hatch/baseboard.c @@ -355,10 +355,11 @@ void baseboard_mst_enable_control(enum mst_source src, int level) #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); + if (board_is_convertible()) { + if (chipset_in_state(CHIPSET_STATE_ANY_OFF)) + enable = 0; + keyboard_scan_enable(enable, KB_SCAN_DISABLE_LID_ANGLE); + } } #endif diff --git a/baseboard/hatch/baseboard.h b/baseboard/hatch/baseboard.h index 200480e152..09ea0056a7 100644 --- a/baseboard/hatch/baseboard.h +++ b/baseboard/hatch/baseboard.h @@ -200,6 +200,7 @@ unsigned char get_board_sku(void); unsigned char get_board_id(void); void board_reset_pd_mcu(void); void baseboard_mst_enable_control(enum mst_source, int level); +bool board_is_convertible(void); /* Check with variant about battery presence. */ enum battery_present variant_battery_present(void); |