If the device is a detachable, this device won't have a matrix keyboard but it may have some button switches, e.g. volume buttons and power buttons. Let's 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. Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx> Cc: Rob Herring <robh+dt@xxxxxxxxxx> Cc: <devicetree@xxxxxxxxxxxxxxx> Cc: Benson Leung <bleung@xxxxxxxxxxxx> Cc: Guenter Roeck <groeck@xxxxxxxxxxxx> Cc: Douglas Anderson <dianders@xxxxxxxxxxxx> Cc: Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx> Cc: "Joseph S. Barrera III" <joebar@xxxxxxxxxxxx> Signed-off-by: Stephen Boyd <swboyd@xxxxxxxxxxxx> --- .../bindings/input/google,cros-ec-keyb.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml b/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml index e8f137abb03c..edc1194d558d 100644 --- a/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml +++ b/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml @@ -15,14 +15,20 @@ description: | Google's ChromeOS EC Keyboard is a simple matrix keyboard implemented on a separate EC (Embedded Controller) device. It provides a message for reading key scans from the EC. These are then converted - into keycodes for processing by the kernel. + into keycodes for processing by the kernel. This device also supports + switches/buttons like power and volume buttons. allOf: - $ref: "/schemas/input/matrix-keymap.yaml#" properties: compatible: - const: google,cros-ec-keyb + oneOf: + - items: + - const: google,cros-ec-keyb-switches + - const: google,cros-ec-keyb + - items: + - const: google,cros-ec-keyb google,needs-ghost-filter: description: @@ -50,7 +56,7 @@ examples: - | #include <dt-bindings/input/input.h> cros-ec-keyb { - compatible = "google,cros-ec-keyb"; + compatible = "google,cros-ec-keyb-switches", "google,cros-ec-keyb"; keypad,num-rows = <8>; keypad,num-columns = <13>; google,needs-ghost-filter; -- https://chromeos.dev