@@ -15,14 +15,16 @@ description: |
1515 Google's ChromeOS EC Keyboard is a simple matrix keyboard
1616 implemented on a separate EC (Embedded Controller) device. It provides
1717 a message for reading key scans from the EC. These are then converted
18- into keycodes for processing by the kernel.
19-
20- allOf :
21- - $ref : " /schemas/input/matrix-keymap.yaml#"
18+ into keycodes for processing by the kernel. This device also supports
19+ switches/buttons like power and volume buttons.
2220
2321properties :
2422 compatible :
25- const : google,cros-ec-keyb
23+ oneOf :
24+ - description : ChromeOS EC with only buttons/switches
25+ const : google,cros-ec-keyb-switches
26+ - description : ChromeOS EC with keyboard and possibly buttons/switches
27+ const : google,cros-ec-keyb
2628
2729 google,needs-ghost-filter :
2830 description :
@@ -41,15 +43,31 @@ properties:
4143 where the lower 16 bits are reserved. This property is specified only
4244 when the keyboard has a custom design for the top row keys.
4345
46+ dependencies :
47+ function-row-phsymap : [ 'linux,keymap' ]
48+ google,needs-ghost-filter : [ 'linux,keymap' ]
49+
4450required :
4551 - compatible
4652
53+ if :
54+ properties :
55+ compatible :
56+ contains :
57+ const : google,cros-ec-keyb
58+ then :
59+ $ref : " /schemas/input/matrix-keymap.yaml#"
60+ required :
61+ - keypad,num-rows
62+ - keypad,num-columns
63+ - linux,keymap
64+
4765unevaluatedProperties : false
4866
4967examples :
5068 - |
5169 #include <dt-bindings/input/input.h>
52- cros-ec-keyb {
70+ keyboard-controller {
5371 compatible = "google,cros-ec-keyb";
5472 keypad,num-rows = <8>;
5573 keypad,num-columns = <13>;
@@ -113,3 +131,9 @@ examples:
113131 /* UP LEFT */
114132 0x070b0067 0x070c0069>;
115133 };
134+ - |
135+ /* No matrix keyboard, just buttons/switches */
136+ keyboard-controller {
137+ compatible = "google,cros-ec-keyb-switches";
138+ };
139+ ...
0 commit comments