Documentation/devicetree/bindings/input/adc-keys.yaml

Source file repositories/reference/linux-study-clean/Documentation/devicetree/bindings/input/adc-keys.yaml

File Facts

System
Linux kernel
Corpus path
Documentation/devicetree/bindings/input/adc-keys.yaml
Extension
.yaml
Size
2756 bytes
Lines
104
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
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/adc-keys.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ADC attached resistor ladder buttons

maintainers:
  - Alexandre Belloni <alexandre.belloni@bootlin.com>

allOf:
  - $ref: input.yaml#

properties:
  compatible:
    const: adc-keys

  io-channels:
    maxItems: 1

  io-channel-names:
    const: buttons

  keyup-threshold-microvolt:
    description:
      Voltage above or equal to which all the keys are considered up.

  poll-interval: true
  autorepeat: true

patternProperties:
  '^button-':
    type: object
    $ref: input.yaml#
    additionalProperties: false
    description:
      Each button (key) is represented as a sub-node.

    properties:
      label: true

      linux,code: true

      press-threshold-microvolt:
        description:
          Voltage above or equal to which this key is considered pressed. No
          two values of press-threshold-microvolt may be the same. All values
          of press-threshold-microvolt must be less than
          keyup-threshold-microvolt.

    required:
      - linux,code
      - press-threshold-microvolt

required:
  - compatible
  - io-channels
  - io-channel-names
  - keyup-threshold-microvolt

additionalProperties: false

examples:
  - |
    #include <dt-bindings/input/input.h>
    // +--------------------------------+------------------------+
    // | 2.000.000 <= value             | no key pressed         |
    // +--------------------------------+------------------------+
    // | 1.500.000 <= value < 2.000.000 | KEY_VOLUMEUP pressed   |

Annotation

Implementation Notes