diff options
-rw-r--r-- | board/meep/board.c | 20 | ||||
-rw-r--r-- | board/meep/board.h | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/board/meep/board.c b/board/meep/board.c index e09db291ee..6c17681eeb 100644 --- a/board/meep/board.c +++ b/board/meep/board.c @@ -303,3 +303,23 @@ 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, !is_overcurrented); } + +uint32_t board_override_feature_flags0(uint32_t flags0) +{ + /* + * We always compile in backlight support for Meep/Dorp, but only some + * SKUs come with the hardware. Therefore, check if the current + * device is one of them and return the default value - with backlight + * here. + */ + if (sku_id == 34 || sku_id == 36) + return flags0; + + /* Report that there is no keyboard backlight */ + return (flags0 &= ~EC_FEATURE_MASK_0(EC_FEATURE_PWM_KEYB)); +} + +uint32_t board_override_feature_flags1(uint32_t flags1) +{ + return flags1; +} diff --git a/board/meep/board.h b/board/meep/board.h index 979799d458..73df290d8b 100644 --- a/board/meep/board.h +++ b/board/meep/board.h @@ -24,6 +24,8 @@ #define CONFIG_LED_COMMON #define CONFIG_LED_POWER_LED +#define CONFIG_EC_FEATURE_BOARD_OVERRIDE + /* Sensors */ #define CONFIG_ACCEL_KX022 /* Lid accel */ #define CONFIG_ACCELGYRO_LSM6DSM /* Base accel */ |