diff options
Diffstat (limited to 'baseboard/grunt')
-rw-r--r-- | baseboard/grunt/baseboard.c | 21 | ||||
-rw-r--r-- | baseboard/grunt/baseboard.h | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/baseboard/grunt/baseboard.c b/baseboard/grunt/baseboard.c index c512e0c53b..f2251639f4 100644 --- a/baseboard/grunt/baseboard.c +++ b/baseboard/grunt/baseboard.c @@ -489,3 +489,24 @@ int board_is_lid_angle_tablet_mode(void) { return board_is_convertible(); } + +uint32_t board_override_feature_flags0(uint32_t flags0) +{ + uint32_t sku = system_get_sku_id(); + + /* + * We always compile in backlight support for grunt baseboard, + * but only some models come with the hardware. Therefore, + * check if the current device is one of them and return + * the default value - with backlight here. + */ + if (sku == 16 || sku == 17 || sku == 20 || sku == 21) + return (flags0 & ~EC_FEATURE_MASK_0(EC_FEATURE_PWM_KEYB)); + else + return flags0; +} + +uint32_t board_override_feature_flags1(uint32_t flags1) +{ + return flags1; +} diff --git a/baseboard/grunt/baseboard.h b/baseboard/grunt/baseboard.h index a86994d4a0..a3feb00aaa 100644 --- a/baseboard/grunt/baseboard.h +++ b/baseboard/grunt/baseboard.h @@ -30,6 +30,7 @@ #define CONFIG_BACKLIGHT_LID #define CONFIG_BACKLIGHT_LID_ACTIVE_LOW #define CONFIG_BOARD_VERSION_GPIO +#define CONFIG_EC_FEATURE_BOARD_OVERRIDE #define CONFIG_HIBERNATE_PSL #define CONFIG_HOSTCMD_LPC #define CONFIG_HOSTCMD_SKUID |