From b6adca6689753bdbe798cd1e0a56f8a4df749445 Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Mon, 10 Feb 2020 13:14:36 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2047630 Reviewed-by: Paul Fagerburg --- board/mushu/board.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'board/mushu/board.c') diff --git a/board/mushu/board.c b/board/mushu/board.c index 27d1ab4002..4670c2bb0f 100644 --- a/board/mushu/board.c +++ b/board/mushu/board.c @@ -490,3 +490,10 @@ void board_overcurrent_event(int port, int is_overcurrented) /* Note that the level is inverted because the pin is active low. */ gpio_set_level(GPIO_USB_C_OC_ODL, !is_overcurrented); } + +bool board_is_convertible(void) +{ + const uint8_t sku = get_board_sku(); + + return (sku == 255); +} -- cgit v1.2.1