FROMGIT: dt-bindings: google,cros-ec-keyb: Introduce switches only compatible

If the ChromeOS board is a detachable, this cros-ec-keyb device won't
have a matrix keyboard but it may have some button switches, e.g. volume
buttons and power buttons. The driver still registers a keyboard though
and that leads to userspace confusion around where the keyboard is.

We tried to work around this by only registering the keyboard device when
rows/columns properties were specified for the device, but that led to
another problem where removing the rows/columns properties breaks the
existing binding. Technically before that commit the rows/columns
properties were required, otherwise the driver would fail to probe.
Removing the properties from devicetrees makes the driver fail to probe
unless the corresponding driver patch is present. Furthermore, this makes
requiring matrix keyboard properties for devices that really have a
keyboard impossible because the compatible drives the schema and now the
properties are optional.

Add a more specific compatible for this type of device that indicates to
the OS that there are only switches and no matrix keyboard present.

Reviewed-by: Krzysztof Kozlowski <>
Reviewed-by: Douglas Anderson <>
Signed-off-by: Stephen Boyd <>
Signed-off-by: Dmitry Torokhov <>
(cherry picked from commit 52dc6d3bea3b8509c2ec1f2ae413d0dc646e0b8a
 git:// ib/5.17-cros-ec-keyb)

TEST=emerge-strongbad chromeos-kernel-5_4; Boot on wormdingler;
     evtest shows no more cros_ec device

Change-Id: Ie82f212406a12e52f040182773b4348ed4de55f5
Reviewed-by: Dmitry Torokhov <>
Reviewed-by: Sean Paul <>
Commit-Queue: Douglas Anderson <>
Tested-by: Stephen Boyd <>
Reviewed-by: Douglas Anderson <>
1 file changed