From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Lee Jones <lee.jones@linaro.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Gwendal Grignou <gwendal@chromium.org>,
Enric Balletbo Serra <enric.balletbo@collabora.com>
Subject: [PATCH] input: cros_ec_keyb: Add Tablet Mode switch.
Date: Fri, 27 Jan 2017 11:52:35 +0100 [thread overview]
Message-ID: <20170127105235.4727-1-enric.balletbo@collabora.com> (raw)
From: Gwendal Grignou <gwendal@chromium.org>
Add switch to report tablet mode.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Enric Balletbo Serra <enric.balletbo@collabora.com>
---
I should be included this patch in the following patch series but I missed the
patch and found later. Though it can be applied separetely.
- [PATCH 1/2] mfd: cros-ec: Update cros_ec_commands.h for buttons and switches
- [PATCH 2/2] input: cros_ec_keyb: Add non-matrix buttons and switches
drivers/input/keyboard/cros_ec_keyb.c | 5 +++++
include/linux/mfd/cros_ec_commands.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index ad74ebc..604c7ad 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 a01dde4..e793e9f 100644
--- a/include/linux/mfd/cros_ec_commands.h
+++ b/include/linux/mfd/cros_ec_commands.h
@@ -2094,6 +2094,7 @@ struct ec_response_get_next_event {
/* Switches */
#define EC_MKBP_LID_OPEN 0
+#define EC_MKBP_TABLET_MODE 1
/*****************************************************************************/
/* Temperature sensor commands */
--
2.9.3
next reply other threads:[~2017-01-27 10:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 10:52 Enric Balletbo i Serra [this message]
2017-02-01 17:54 ` [PATCH] input: cros_ec_keyb: Add Tablet Mode switch Dmitry Torokhov
2017-02-08 11:39 ` [GIT PULL] Immutable branch between MFD and Input due for the v4.11 merge window Lee Jones
2017-02-10 9:18 ` Enric Balletbo i Serra
2017-02-13 9:28 ` [GIT PULL] Subsequent immutable " Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170127105235.4727-1-enric.balletbo@collabora.com \
--to=enric.balletbo@collabora.com \
--cc=dmitry.torokhov@gmail.com \
--cc=gwendal@chromium.org \
--cc=lee.jones@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).