From 13a1764e9d23aeb20a819ca479440ce006b10cd1 Mon Sep 17 00:00:00 2001 From: Devin Lu Date: Fri, 13 Dec 2019 17:02:36 +0800 Subject: jinlon: remove identifying SKUs for kbbacklit and convertible. Jinlon is all convertible SKUs and has kbbacklit. This patch remove identifying SKUs for kbbacklit and convertible. BUG=b:145688887 BRANCH=hatch TEST=make buildall -j Change-Id: I15a0ba9017a5a924c90625d85f9714afd03ab355 Signed-off-by: Devin Lu Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1966816 Reviewed-by: Paul Fagerburg --- board/jinlon/board.c | 49 +++---------------------------------------------- board/jinlon/board.h | 1 - 2 files changed, 3 insertions(+), 47 deletions(-) (limited to 'board/jinlon') diff --git a/board/jinlon/board.c b/board/jinlon/board.c index 797900ab1e..a5617b017c 100644 --- a/board/jinlon/board.c +++ b/board/jinlon/board.c @@ -380,34 +380,11 @@ static void setup_fans(void) thermal_params[TEMP_SENSOR_2] = thermal_b; } -/* - * Returns true for boards that are convertible into tablet mode, and - * false for clamshells. - */ -static bool board_is_convertible(void) -{ - uint8_t sku_id = get_board_sku(); - - /* - * Dragonair (SKU 21 ,22 and 23) is a convertible. Dratini is not. - * Unprovisioned SKU 255. - */ - return sku_id == 21 || sku_id == 22 || sku_id == 23 || sku_id == 255; -} - static void board_update_sensor_config_from_sku(void) { - if (board_is_convertible()) { - motion_sensor_count = ARRAY_SIZE(motion_sensors); - /* Enable gpio interrupt for base accelgyro sensor */ - gpio_enable_interrupt(GPIO_BASE_SIXAXIS_INT_L); - } else { - motion_sensor_count = 0; - gmr_tablet_switch_disable(); - /* Base accel is not stuffed, don't allow line to float */ - gpio_set_flags(GPIO_BASE_SIXAXIS_INT_L, - GPIO_INPUT | GPIO_PULL_DOWN); - } + motion_sensor_count = ARRAY_SIZE(motion_sensors); + /* Enable gpio interrupt for base accelgyro sensor */ + gpio_enable_interrupt(GPIO_BASE_SIXAXIS_INT_L); } static void board_init(void) @@ -431,26 +408,6 @@ void board_overcurrent_event(int port, int is_overcurrented) gpio_set_level(GPIO_USB_C_OC_ODL, !is_overcurrented); } -bool board_has_kb_backlight(void) -{ - uint8_t sku_id = get_board_sku(); - /* - * SKUs have keyboard backlight. - * Dratini: 2, 3 - * Dragonair: 22 - * Unprovisioned: 255 - */ - return sku_id == 2 || sku_id == 3 || sku_id == 22 || sku_id == 255; -} - -__override uint32_t board_override_feature_flags0(uint32_t flags0) -{ - if (board_has_kb_backlight()) - return flags0; - else - return (flags0 & ~EC_FEATURE_MASK_0(EC_FEATURE_PWM_KEYB)); -} - #ifdef CONFIG_KEYBOARD_FACTORY_TEST /* * Map keyboard connector pins to EC GPIO pins for factory test. diff --git a/board/jinlon/board.h b/board/jinlon/board.h index 1cfb471bc3..1191af05c3 100644 --- a/board/jinlon/board.h +++ b/board/jinlon/board.h @@ -37,7 +37,6 @@ /* BMA253 Lid accel */ #define CONFIG_ACCEL_BMA255 #define CONFIG_ACCEL_FORCE_MODE_MASK BIT(LID_ACCEL) -#define CONFIG_DYNAMIC_MOTION_SENSOR_COUNT #define CONFIG_LID_ANGLE #define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL #define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL -- cgit v1.2.1