Re: [PATCH] Input: cros_ec_keyb: add support for base attached event

From: Dmitry Torokhov
Date: Thu Jan 18 2024 - 12:56:00 EST


Hi Ting,

On Thu, Jan 18, 2024 at 04:52:43PM +0800, Ting Shen wrote:
> This CL maps ChromeOS EC's BASE_ATTACHED event to SW_DOCK,

As far as I know none of the Chrome OS devices support classic docking
station (not talking about the new USB-C/TB ones).

> to allow userspace detect that a keyboard is attached to the
> detachable device.

Are we planning to have detachable keyboard that is not USB?

EC_MKBP_BASE_ATTACHED is processed by hid-google-hammer driver and,
together with the USB connector state, is used to form SW_TABLET_MODE.
The reason just the USB state was not enough is because the keyboard
could be attached to the lid "other way around" to be used as a stand.
In that configuration USB connection was not active. However userspace
still needed to know about this to activate tablet version of the UI.

Please provide more information why you want this to be exposed via
cros_ec_keyb driver.

Thanks.

--
Dmitry