* [PATCH v2] Input: cros_ec_keyb: add support for base attached event
@ 2024-01-19 7:48 Ting Shen
2024-01-19 8:15 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Ting Shen @ 2024-01-19 7:48 UTC (permalink / raw)
To: LKML
Cc: fshao, Ting Shen, Benson Leung, Dmitry Torokhov,
Greg Kroah-Hartman, Guenter Roeck, Tzung-Bi Shih,
Uwe Kleine-König, chrome-platform,
joewu (吳仲振), linux-input
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] Input: cros_ec_keyb: add support for base attached event
2024-01-19 7:48 [PATCH v2] Input: cros_ec_keyb: add support for base attached event Ting Shen
@ 2024-01-19 8:15 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2024-01-19 8:15 UTC (permalink / raw)
To: Ting Shen
Cc: LKML, fshao, Ting Shen, Benson Leung, Greg Kroah-Hartman,
Guenter Roeck, Tzung-Bi Shih, Uwe Kleine-König,
chrome-platform, joewu (吳仲振), linux-input
On Fri, Jan 19, 2024 at 03:48:17PM +0800, Ting Shen wrote:
> 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.
I think emitting an uevent on attachment might make more sense here,
SW_DOCK is to signal attachment of a legacy docking station.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-19 8:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-19 7:48 [PATCH v2] Input: cros_ec_keyb: add support for base attached event Ting Shen
2024-01-19 8:15 ` Dmitry Torokhov
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).