From: Gwendal Grignou Date: Fri, 27 Jan 2017 10:52:35 +0000 (+0100) Subject: input: cros_ec_keyb: Add Tablet Mode switch X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6ccc3a33810e8ec09936fa990c13370d9f61606f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git input: cros_ec_keyb: Add Tablet Mode switch Add switch to report tablet mode. Signed-off-by: Gwendal Grignou Signed-off-by: Enric Balletbo Serra Signed-off-by: Lee Jones --- diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c index ad74ebce0cdd..604c7ade8df2 100644 --- a/drivers/input/keyboard/cros_ec_keyb.c +++ b/drivers/input/keyboard/cros_ec_keyb.c @@ -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, + }, }; /* diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h index 004dcf3560fb..da1c188562bc 100644 --- a/include/linux/mfd/cros_ec_commands.h +++ b/include/linux/mfd/cros_ec_commands.h @@ -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 */