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 v2] Input: cros_ec_keyb: add support for base attached event
Date: Fri, 19 Jan 2024 15:48:17 +0800 [thread overview]
Message-ID: <20240119074831.2979671-1-phoenixshen@google.com> (raw)
There is a new type of ChromeOS detachable keyboard that talks to
the host via CrOS EC host command interface, rather than the USB
interface.
To trigger the firmware update daemon (hammerd) on this keyboard, a
signal is required to replace the typical USB hotplug event. This patch
addresses this by mapping the EC's BASE_ATTACHED event to SW_DOCK.
Signed-off-by: Ting Shen <phoenixshen@google.com>
---
Changes in v2:
- update commit message
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.429.g432eaa2c6b-goog
next reply other threads:[~2024-01-19 7:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 7:48 Ting Shen [this message]
2024-01-19 8:15 ` [PATCH v2] Input: cros_ec_keyb: add support for base attached event 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=20240119074831.2979671-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.