diff options
Diffstat (limited to 'board/kindred/board.c')
-rw-r--r-- | board/kindred/board.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/board/kindred/board.c b/board/kindred/board.c index 7923a318bd..266120259a 100644 --- a/board/kindred/board.c +++ b/board/kindred/board.c @@ -29,6 +29,7 @@ #include "power_button.h" #include "pwm.h" #include "pwm_chip.h" +#include "stdbool.h" #include "spi.h" #include "switch.h" #include "system.h" @@ -408,3 +409,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_ODL, !is_overcurrented); } + +bool board_has_kb_backlight(void) +{ + uint8_t sku_id = get_board_sku(); + /* SKU ID of Kled: 1,2,3,4 */ + return (sku_id >= 1) && (sku_id <= 4); +} + +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)); +} + +uint32_t board_override_feature_flags1(uint32_t flags1) +{ + return flags1; +} |