summaryrefslogtreecommitdiff
path: root/board/banshee/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/banshee/keyboard.c')
-rw-r--r--board/banshee/keyboard.c54
1 files changed, 53 insertions, 1 deletions
diff --git a/board/banshee/keyboard.c b/board/banshee/keyboard.c
index 0dd1b709c9..3bea4aeb40 100644
--- a/board/banshee/keyboard.c
+++ b/board/banshee/keyboard.c
@@ -4,7 +4,7 @@
*/
#include "common.h"
-
+#include "ec_commands.h"
#include "keyboard_scan.h"
#include "timer.h"
@@ -24,3 +24,55 @@ __override struct keyboard_scan_config keyscan_config = {
0xff, 0xef /* full set */
},
};
+
+static const struct ec_response_keybd_config banshee_kb = {
+ .num_top_row_keys = 12,
+ .action_keys = {
+ TK_BACK, /* T1 */
+ TK_FORWARD, /* T2 */
+ TK_REFRESH, /* T3 */
+ TK_FULLSCREEN, /* T4 */
+ TK_OVERVIEW, /* T5 */
+ TK_SNAPSHOT, /* T6 */
+ TK_BRIGHTNESS_DOWN, /* T7 */
+ TK_BRIGHTNESS_UP, /* T8 */
+ TK_PLAY_PAUSE, /* T9 */
+ TK_VOL_MUTE, /* T10 */
+ TK_VOL_DOWN, /* T11 */
+ TK_VOL_UP, /* T12 */
+ },
+ .capabilities = KEYBD_CAP_SCRNLOCK_KEY,
+};
+
+__override const struct ec_response_keybd_config
+*board_vivaldi_keybd_config(void)
+{
+ return &banshee_kb;
+}
+
+/*
+ * Row Column info for Top row keys T1 - T15.
+ * on banshee keyboard Row Column is customization
+ * need define row col to mapping matrix layout.
+ */
+__override const struct key {
+ uint8_t row;
+ uint8_t col;
+} vivaldi_keys[] = {
+ {.row = 3, .col = 5}, /* T1 */
+ {.row = 2, .col = 5}, /* T2 */
+ {.row = 6, .col = 4}, /* T3 */
+ {.row = 3, .col = 4}, /* T4 */
+ {.row = 4, .col = 10}, /* T5 */
+ {.row = 3, .col = 10}, /* T6 */
+ {.row = 2, .col = 10}, /* T7 */
+ {.row = 1, .col = 15}, /* T8 */
+ {.row = 3, .col = 11}, /* T9 */
+ {.row = 4, .col = 8}, /* T10 */
+ {.row = 6, .col = 8}, /* T11 */
+ {.row = 3, .col = 13}, /* T12 */
+ {.row = 3, .col = 5}, /* T13 */
+ {.row = 0, .col = 9}, /* T14 */
+ {.row = 0, .col = 11}, /* T15 */
+};
+BUILD_ASSERT(ARRAY_SIZE(vivaldi_keys) == MAX_TOP_ROW_KEYS);