lkml.org 
[lkml]   [2022]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 1/2] dt-bindings: google,cros-ec-keyb: Introduce switches only compatible
Quoting Stephen Boyd (2022-05-16 11:34:51)
> diff --git a/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml b/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml
> index e8f137abb03c..e1fb68ca00fc 100644
> --- a/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml
> +++ b/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml
> @@ -15,14 +15,23 @@ 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.
> -
> -allOf:
> - - $ref: "/schemas/input/matrix-keymap.yaml#"
> + into keycodes for processing by the kernel. This device also supports
> + switches/buttons like power and volume buttons.
>
> properties:
> compatible:
> - const: google,cros-ec-keyb
> + anyOf:
> + - description: ChromeOS EC with only buttons/switches
> + - items:
> + - const: google,cros-ec-keyb-switches
> + - description: |
> + (Deprecated) ChromeOS EC with only buttons/switches; optional matrix properties

s/optional/required/

> + - items:
> + - const: google,cros-ec-keyb-switches
> + - const: google,cros-ec-keyb
> + - description: ChromeOS EC with keyboard and possibly buttons/switches
> + - items:
> + - const: google,cros-ec-keyb
>
> google,needs-ghost-filter:
> description:
> @@ -41,15 +50,32 @@ properties:
> where the lower 16 bits are reserved. This property is specified only
> when the keyboard has a custom design for the top row keys.
>
> +dependencies:
> + function-row-phsymap: [ 'linux,keymap' ]
> + google,needs-ghost-filter: [ 'linux,keymap' ]
> +
> required:
> - compatible
>
> +if:
> + properties:
> + compatible:
> + contains:
> + const: google,cros-ec-keyb
> +then:
> + allOf:
> + - $ref: "/schemas/input/matrix-keymap.yaml#"
> + required:
> + - keypad,num-rows
> + - keypad,num-columns
> + - linux,keymap
> +
> unevaluatedProperties: false
>
> examples:
> - |
> #include <dt-bindings/input/input.h>
> - cros-ec-keyb {
> + keyboard-controller {
> compatible = "google,cros-ec-keyb";
> keypad,num-rows = <8>;
> keypad,num-columns = <13>;
> @@ -113,3 +139,56 @@ examples:
> /* UP LEFT */
> 0x070b0067 0x070c0069>;
> };
> +
> + - |
> + keyboard-controller {
> + compatible = "google,cros-ec-keyb-switches", "google,cros-ec-keyb";
> + /* Matrix keymap properties are optional but ignored */

Ooops I got the wrong line here from v4 :(

s/optional/required/

> + keypad,num-rows = <8>;
> + keypad,num-columns = <13>;
> + linux,keymap = <
> + /* CAPSLCK F1 B F10 */
> + 0x0001003a 0x0002003b 0x00030030 0x00040044
> + /* N = R_ALT ESC */
> + 0x00060031 0x0008000d 0x000a0064 0x01010001
> + /* F4 G F7 H */

\
 
 \ /
  Last update: 2022-05-16 20:51    [W:0.499 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site