summaryrefslogtreecommitdiff
path: root/baseboard/volteer/cbi_ec_fw_config.h
diff options
context:
space:
mode:
authorZhuohao Lee <zhuohao@chromium.org>2020-09-08 19:27:39 +0800
committerCommit Bot <commit-bot@chromium.org>2020-09-22 15:59:22 +0000
commitebc46d5c4346872860755175033cccd43ca1d924 (patch)
treeb191fb345dc385c67cd8db31f3e92f1ff7fa6d9c /baseboard/volteer/cbi_ec_fw_config.h
parentc414ce49403052368a4743521018f39f1461ec00 (diff)
downloadchrome-ec-ebc46d5c4346872860755175033cccd43ca1d924.tar.gz
volteer: encode the keyboard backlight and numeric pad to fw_config
In order to support the keyboard backlight and numeric pad switching, we need to encode the keyboard backlight and numeric pad feature to the fw_config. BUG=b:166707536 BRANCH=None TEST=flash the ec.bin to the DUT and checked the keyboard function. Change-Id: I2f85377acd85a0dae635d7bf4fe36c47ce01e9d7 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2397933 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'baseboard/volteer/cbi_ec_fw_config.h')
-rw-r--r--baseboard/volteer/cbi_ec_fw_config.h43
1 files changed, 35 insertions, 8 deletions
diff --git a/baseboard/volteer/cbi_ec_fw_config.h b/baseboard/volteer/cbi_ec_fw_config.h
index 9669fdf413..5b97f778ec 100644
--- a/baseboard/volteer/cbi_ec_fw_config.h
+++ b/baseboard/volteer/cbi_ec_fw_config.h
@@ -33,16 +33,27 @@ enum ec_cfg_tabletmode_type {
TABLETMODE_ENABLED = 1,
};
+enum ec_cfg_keyboard_backlight_type {
+ KEYBOARD_BACKLIGHT_DISABLED = 0,
+ KEYBOARD_BACKLIGHT_ENABLED = 1
+};
+
+enum ec_cfg_numeric_pad_type {
+ NUMERIC_PAD_DISABLED = 0,
+ NUMERIC_PAD_ENABLED = 1
+};
+
union volteer_cbi_fw_config {
struct {
- enum ec_cfg_usb_db_type usb_db : 4;
- uint32_t thermal : 4;
- uint32_t audio : 3;
- enum ec_cfg_tabletmode_type tabletmode : 1;
- uint32_t lte_db : 2;
- uint32_t reserved_1 : 2;
- uint32_t sd_db : 4;
- uint32_t reserved_2 : 12;
+ enum ec_cfg_usb_db_type usb_db : 4;
+ uint32_t thermal : 4;
+ uint32_t audio : 3;
+ enum ec_cfg_tabletmode_type tabletmode : 1;
+ uint32_t lte_db : 2;
+ enum ec_cfg_keyboard_backlight_type kb_bl : 1;
+ enum ec_cfg_numeric_pad_type num_pad : 1;
+ uint32_t sd_db : 4;
+ uint32_t reserved_2 : 12;
};
uint32_t raw_value;
};
@@ -81,4 +92,20 @@ enum ec_cfg_usb_db_type ec_cfg_usb_db_type(void);
*/
bool ec_cfg_has_tabletmode(void);
+/**
+ * Check if the FW_CONFIG has enabled keyboard backlight.
+ *
+ * @return true if board supports keyboard backlight, false if the board
+ * doesn't support it.
+ */
+bool ec_cfg_has_keyboard_backlight(void);
+
+/**
+ * Check if the FW_CONFIG has enabled numeric pad.
+ *
+ * @return true if board supports numeric pad, false if the board
+ * doesn't support it.
+ */
+bool ec_cfg_has_numeric_pad(void);
+
#endif /* __VOLTEER_CBI_EC_FW_CONFIG_H_ */