diff options
author | Devin Lu <devin.lu@quantatw.com> | 2018-06-12 13:51:21 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-06-20 14:23:50 -0700 |
commit | c8323ec1ad9852bcf775934933c117214dd3f5d7 (patch) | |
tree | d3288593c0ea752a49bdb3b7ded18c9dfde0e198 /baseboard/grunt | |
parent | 5d825c5c9b9b805b2677b13a891a7edce0802e69 (diff) | |
download | chrome-ec-c8323ec1ad9852bcf775934933c117214dd3f5d7.tar.gz |
careena: Overwrite keyboard backlight support by SKUID
Allow overwrite the keyboard backlight support of ec feature
with different SKUID for careena.
BUG=b:110065836
BRANCH=none
TEST=Verify ectool inventory that showning Keyboard backlight
support by SKUID.
Verify keyboard backlight hotkey can up/down the britghness.
Change-Id: Icde99af1f0e4356c0788fd31a8575290c845d3d2
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/1096794
Reviewed-by: Edward Hill <ecgh@chromium.org>
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 |