Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml

Source file repositories/reference/linux-study-clean/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml

File Facts

System
Linux kernel
Corpus path
Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml
Extension
.yaml
Size
5320 bytes
Lines
141
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---

$id: http://devicetree.org/schemas/input/google,cros-ec-keyb.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ChromeOS EC Keyboard

maintainers:
  - Simon Glass <sjg@chromium.org>
  - Benson Leung <bleung@chromium.org>

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. This device also supports
  switches/buttons like power and volume buttons.

properties:
  compatible:
    oneOf:
      - description: ChromeOS EC with only buttons/switches
        const: google,cros-ec-keyb-switches
      - description: ChromeOS EC with keyboard and possibly buttons/switches
        const: google,cros-ec-keyb

  google,needs-ghost-filter:
    description:
      Enable a ghost filter for the matrix keyboard. This is recommended
      if the EC does not have its own logic or hardware for this.
    type: boolean

  function-row-physmap:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 15
    description: |
      An ordered u32 array describing the rows/columns (in the scan matrix)
      of top row keys from physical left (KEY_F1) to right. Each entry
      encodes the row/column as:
      (((row) & 0xFF) << 24) | (((column) & 0xFF) << 16)
      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-physmap: [ 'linux,keymap' ]
  google,needs-ghost-filter: [ 'linux,keymap' ]

required:
  - compatible

if:
  properties:
    compatible:
      contains:
        const: google,cros-ec-keyb
then:
  $ref: /schemas/input/matrix-keymap.yaml#
  required:
    - keypad,num-rows
    - keypad,num-columns
    - linux,keymap

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/input/input.h>

Annotation

Implementation Notes