]> git.baikalelectronics.ru Git - kernel.git/commit
Input: cros-ec-keyb - allow skipping keyboard registration
authorStephen Boyd <swboyd@chromium.org>
Mon, 16 May 2022 20:29:58 +0000 (13:29 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 17 May 2022 18:59:26 +0000 (11:59 -0700)
commit767d212b293762e1e45b551e9c9f4d2ce06d4dba
treed2696d374e40592aa728c93057d1ed2b8f3f1a98
parent3eb05d02a466f398ad6881a7005a3b42bb02486a
Input: cros-ec-keyb - allow skipping keyboard registration

If the device is a detachable (and therefore lacks full keyboard), we may
still want to load this driver because the device might have some other
buttons or switches (e.g. volume and power buttons or a tablet mode
switch). In such case we do not want to register the "main" keyboard device
to allow userspace detect when the detachable keyboard is disconnected and
adjust the system behavior for the tablet mode.

Originally it was suggested to simply skip keyboard registration if row and
columns properties didn't exist, but that approach did not convey the
intent strongly enough and also had a slight problem for migrating existing
DTBs without updating the kernel first, so it was decided to introduce new
google,cros-ec-keyb-switches to explicitly mark devices that only have
axillary buttons and switches.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20220516183452.942008-3-swboyd@chromium.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/cros_ec_keyb.c