Rajat Jain has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40030 )
Change subject: ec/google/chromeec: New host command EC_CMD_GET_KEYBD_TOP_ROW_LAYOUT ......................................................................
ec/google/chromeec: New host command EC_CMD_GET_KEYBD_TOP_ROW_LAYOUT
Add commmand to query the EC for the keyboard's top row layout. Also add supporting data structures for the exchange.
Signed-off-by: Rajat Jain rajatja@google.com Change-Id: I26aff6dd0e701e0cecb3b66bc54c5a23688f0109 --- M src/ec/google/chromeec/ec_commands.h 1 file changed, 72 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/40030/1
diff --git a/src/ec/google/chromeec/ec_commands.h b/src/ec/google/chromeec/ec_commands.h index 7b5a067..7c0d6bc 100644 --- a/src/ec/google/chromeec/ec_commands.h +++ b/src/ec/google/chromeec/ec_commands.h @@ -2972,6 +2972,78 @@ } __ec_align1;
/*****************************************************************************/ +/* Get the Keyboard Top Row Layout */ +#define EC_CMD_GET_KEYBD_TOP_ROW_LAYOUT 0x002E + +/* Possible values for the top row keys */ +enum top_key { + TK_ABSENT = 0, + TK_F1, + TK_F2, + TK_F3, + TK_F4, + TK_F5, + TK_F6, + TK_F7, + TK_F8, + TK_F9, + TK_F10, + TK_F11, + TK_F12, + TK_F13, + TK_F14, + TK_F15, + TK_BACK, + TK_FORWARD, + TK_REFRESH, + TK_FULLSCREEN, + TK_OVERVIEW, + TK_BRIGHTNESS_DOWN, + TK_BRIGHTNESS_UP, + TK_VOL_MUTE, + TK_VOL_DOWN, + TK_VOL_UP, + TK_SNIP, + TK_PRIVACY_SCRN_TOGGLE, + TK_KBD_BKLIGHT_DOWN, + TK_KBD_BKLIGHT_UP, + TK_PLAY_PAUSE, + TK_NEXT_TRACK, + TK_PREV_TRACK, +}; + +/* Maximum number of top row keys, excluding Esc and Screenlock keys */ +#define MAX_TOP_ROW_KEYS 15 + +struct top_row_layout { + + /* + * Number of top row keys, excluding Esc and Screenlock. + * Set this to 0 to disable all Vivaldi keyboard code + * (i.e. not expose any tables to the kernel). + */ + uint8_t num_top_row_keys; + + /* + * The action keys in the top row, in order from left to right. + * The values are filled from enum top_key. Esc and Screenlock + * keys are not considered part of top row keys. + */ + uint8_t action_keys[MAX_TOP_ROW_KEYS]; + + /* + * Is the keyboard capable of sending function keys *in addition to * + * action keys. This is possible for e.g. if the keyboard has a + * dedicated Fn key. + */ + uint8_t can_send_function_keys; +}; + +struct ec_response_top_row_layout { + struct top_row_layout top_row; +}; + +/*****************************************************************************/ /* USB charging control commands */
/* Set USB port charging mode */