1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 # Copyright 2019-2020 Artur Rojek
5 $id: "http://devicetree.org/schemas/input/adc-joystick.yaml#"
6 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
8 title: ADC attached joystick
11 - Artur Rojek <contact@artur-rojek.eu>
14 Bindings for joystick devices connected to ADC controllers supporting
15 the Industrial I/O subsystem.
25 List of phandle and IIO specifier pairs.
26 Each pair defines one ADC channel to which a joystick axis is connected.
28 https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml
43 additionalProperties: false
49 Represents a joystick axis bound to the given ADC channel.
50 For each entry in the io-channels list, one axis subnode with a matching
51 reg property must be specified.
57 description: Index of an io-channels list entry bound to this axis.
60 $ref: /schemas/types.yaml#/definitions/uint32
61 description: EV_ABS specific event code generated by the axis.
64 $ref: /schemas/types.yaml#/definitions/uint32-array
66 - description: minimum value
67 - description: maximum value
69 Minimum and maximum values produced by the axis.
70 For an ABS_X axis this will be the left-most and right-most
71 inclination of the joystick. If min > max, it is left to userspace to
72 treat the axis as inverted.
73 This property is interpreted as two signed 32 bit values.
76 $ref: /schemas/types.yaml#/definitions/uint32
78 Amount of noise in the input value.
79 Omitting this property indicates the axis is precise.
82 $ref: /schemas/types.yaml#/definitions/uint32
84 Axial "deadzone", or area around the center position, where the axis
85 is considered to be at rest.
86 Omitting this property indicates the axis always returns to exactly
94 additionalProperties: false
98 #include <dt-bindings/iio/adc/ingenic,adc.h>
99 #include <dt-bindings/input/input.h>
101 joystick: adc-joystick {
102 compatible = "adc-joystick";
103 io-channels = <&adc INGENIC_ADC_TOUCH_XP>,
104 <&adc INGENIC_ADC_TOUCH_YP>;
105 #address-cells = <1>;
110 linux,code = <ABS_X>;
111 abs-range = <3300 0>;
117 linux,code = <ABS_Y>;
118 abs-range = <0 3300>;