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

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

File Facts

System
Linux kernel
Corpus path
Documentation/devicetree/bindings/input/adc-joystick.yaml
Extension
.yaml
Size
3362 bytes
Lines
128
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)
# Copyright 2019-2020 Artur Rojek
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/adc-joystick.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ADC attached joystick

maintainers:
  - Artur Rojek <contact@artur-rojek.eu>

description: >
  Bindings for joystick devices connected to ADC controllers supporting
  the Industrial I/O subsystem.

allOf:
  - $ref: input.yaml#

properties:
  compatible:
    const: adc-joystick

  io-channels:
    minItems: 1
    maxItems: 1024
    description: >
      List of phandle and IIO specifier pairs.
      Each pair defines one ADC channel to which a joystick axis is connected.
      See
      https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml
      for details.

  poll-interval: true

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

required:
  - compatible
  - io-channels
  - '#address-cells'
  - '#size-cells'

additionalProperties: false

patternProperties:
  "^axis@[0-9a-f]+$":
    type: object
    $ref: input.yaml#
    description: >
      Represents a joystick axis bound to the given ADC channel.
      For each entry in the io-channels list, one axis subnode with a matching
      reg property must be specified.

    properties:
      reg:
        minimum: 0
        maximum: 1023
        description: Index of an io-channels list entry bound to this axis.

      linux,code:
        description: EV_ABS specific event code generated by the axis.

      abs-range:
        $ref: /schemas/types.yaml#/definitions/uint32-array
        items:

Annotation

Implementation Notes