Skip to content

Commit

Permalink
input: cros_ec_keyb: Add Tablet Mode switch
Browse files Browse the repository at this point in the history
Add switch to report tablet mode.

Signed-off-by: Gwendal Grignou <[email protected]>
Signed-off-by: Enric Balletbo Serra <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
  • Loading branch information
gwendalcr authored and Lee Jones committed Feb 13, 2017
1 parent cdd7950 commit 6ccc3a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/input/keyboard/cros_ec_keyb.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ static const struct cros_ec_bs_map cros_ec_keyb_bs[] = {
.bit = EC_MKBP_LID_OPEN,
.inverted = true,
},
{
.ev_type = EV_SW,
.code = SW_TABLET_MODE,
.bit = EC_MKBP_TABLET_MODE,
},
};

/*
Expand Down
1 change: 1 addition & 0 deletions include/linux/mfd/cros_ec_commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -2068,6 +2068,7 @@ struct ec_response_get_next_event {

/* Switches */
#define EC_MKBP_LID_OPEN 0
#define EC_MKBP_TABLET_MODE 1

/*****************************************************************************/
/* Temperature sensor commands */
Expand Down

0 comments on commit 6ccc3a3

Please sign in to comment.