diff options
author | Devin Lu <devin.lu@quantatw.com> | 2019-07-29 11:03:36 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-30 04:36:29 +0000 |
commit | 85f9723351a7d69f6fe38279cc32a127d83a2956 (patch) | |
tree | 0d4ab23e8e54a493c1de8a357df64ec61427c641 | |
parent | 4fa8d039ed80aadce17184d304cdf99ac8153e72 (diff) | |
download | chrome-ec-85f9723351a7d69f6fe38279cc32a127d83a2956.tar.gz |
dorp: enable ec_feature kbbacklit by SKUID
Consider Dorp use the same firmware with Meep and only Dorp has kbbacklight
SKU. so we're only reporting Dorp kbbacklit SKU on ec_feature.
BUG=b:138177049, b:138413969
BRANCH=octopus
TEST=make sure ectool inventory has show keyboard backlight support
with Dorp kbbacklit SKU.
Change-Id: I952b48128669790d7018017e3fb550c73f256d28
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1723890
Reviewed-by: Marco Chen <marcochen@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Tested-by: Justin TerAvest <teravest@chromium.org>
(cherry picked from commit 2d50d3d5cb5c4c891e5281e9c48a87ff4361ada5)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1725372
Commit-Queue: Justin TerAvest <teravest@chromium.org>
-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 9420a74f40..fb704378a3 100644 --- a/board/meep/board.c +++ b/board/meep/board.c @@ -299,3 +299,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 14b9b2d376..41e6d23733 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 */ |