linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: cros_ec_keyb: add support for base attached event
@ 2024-01-18  8:52 Ting Shen
  2024-01-18 10:01 ` Fei Shao
  2024-01-18 17:55 ` Dmitry Torokhov
  0 siblings, 2 replies; 4+ messages in thread
From: Ting Shen @ 2024-01-18  8:52 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

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-19  8:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-18  8:52 [PATCH] Input: cros_ec_keyb: add support for base attached event Ting Shen
2024-01-18 10:01 ` 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

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).