From: Ting Shen <phoenixshen@chromium.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: fshao@chromium.org, "Ting Shen" <phoenixshen@google.com>,
"Benson Leung" <bleung@chromium.org>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Guenter Roeck" <groeck@chromium.org>,
"Tzung-Bi Shih" <tzungbi@kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
chrome-platform@lists.linux.dev, "joewu (吳仲振)" <joewu@msi.com>,
linux-input@vger.kernel.org
Subject: [PATCH] Input: cros_ec_keyb: add support for base attached event
Date: Thu, 18 Jan 2024 16:52:43 +0800 [thread overview]
Message-ID: <20240118085310.1139545-1-phoenixshen@google.com> (raw)
This CL maps ChromeOS EC's BASE_ATTACHED event to SW_DOCK,
to allow userspace detect that a keyboard is attached to the
detachable device.
Signed-off-by: Ting Shen <phoenixshen@google.com>
---
drivers/input/keyboard/cros_ec_keyb.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 30678a34cf647..d2e0d89d4ffdf 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -128,6 +128,11 @@ static const struct cros_ec_bs_map cros_ec_keyb_bs[] = {
.code = SW_TABLET_MODE,
.bit = EC_MKBP_TABLET_MODE,
},
+ {
+ .ev_type = EV_SW,
+ .code = SW_DOCK,
+ .bit = EC_MKBP_BASE_ATTACHED,
+ },
};
/*
--
2.43.0.381.gb435a96ce8-goog
next reply other threads:[~2024-01-18 8:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 8:52 Ting Shen [this message]
2024-01-18 10:01 ` [PATCH] Input: cros_ec_keyb: add support for base attached event Fei Shao
2024-01-18 17:55 ` Dmitry Torokhov
[not found] ` <CAM106_uNOrpiovEuuyr2yUGXFpQqAiE_GQRFh2_j7v58cEvWbw@mail.gmail.com>
2024-01-19 8:13 ` Dmitry Torokhov
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=20240118085310.1139545-1-phoenixshen@google.com \
--to=phoenixshen@chromium.org \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=dmitry.torokhov@gmail.com \
--cc=fshao@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=groeck@chromium.org \
--cc=joewu@msi.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phoenixshen@google.com \
--cc=tzungbi@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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