Skip to content

Commit 8aaec11

Browse files
joewu (吳仲振)dtor
authored andcommitted
Input: cros_ec_keyb - add 3 buttons for monitor function
Add 3 extra buttons: 'brightness up', 'brightness down' and 'screen lock' to support monitor manipulating function. Signed-off-by: Joe Wu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent b08134e commit 8aaec11

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

drivers/input/keyboard/cros_ec_keyb.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,21 @@ static const struct cros_ec_bs_map cros_ec_keyb_bs[] = {
100100
.code = KEY_VOLUMEDOWN,
101101
.bit = EC_MKBP_VOL_DOWN,
102102
},
103+
{
104+
.ev_type = EV_KEY,
105+
.code = KEY_BRIGHTNESSUP,
106+
.bit = EC_MKBP_BRI_UP,
107+
},
108+
{
109+
.ev_type = EV_KEY,
110+
.code = KEY_BRIGHTNESSDOWN,
111+
.bit = EC_MKBP_BRI_DOWN,
112+
},
113+
{
114+
.ev_type = EV_KEY,
115+
.code = KEY_SCREENLOCK,
116+
.bit = EC_MKBP_SCREEN_LOCK,
117+
},
103118

104119
/* Switches */
105120
{

include/linux/platform_data/cros_ec_commands.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3471,6 +3471,9 @@ struct ec_response_get_next_event_v1 {
34713471
#define EC_MKBP_VOL_UP 1
34723472
#define EC_MKBP_VOL_DOWN 2
34733473
#define EC_MKBP_RECOVERY 3
3474+
#define EC_MKBP_BRI_UP 4
3475+
#define EC_MKBP_BRI_DOWN 5
3476+
#define EC_MKBP_SCREEN_LOCK 6
34743477

34753478
/* Switches */
34763479
#define EC_MKBP_LID_OPEN 0

0 commit comments

Comments
 (0)