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.
27 See Documentation/devicetree/bindings/iio/iio-bindings.txt for details.
41 additionalProperties: false
47 Represents a joystick axis bound to the given ADC channel.
48 For each entry in the io-channels list, one axis subnode with a matching
49 reg property must be specified.
55 description: Index of an io-channels list entry bound to this axis.
58 $ref: /schemas/types.yaml#/definitions/uint32
59 description: EV_ABS specific event code generated by the axis.
63 - $ref: /schemas/types.yaml#/definitions/uint32-array
65 - description: minimum value
66 - description: maximum value
68 Minimum and maximum values produced by the axis.
69 For an ABS_X axis this will be the left-most and right-most
70 inclination of the joystick. If min > max, it is left to userspace to
71 treat the axis as inverted.
72 This property is interpreted as two signed 32 bit values.
75 $ref: /schemas/types.yaml#/definitions/uint32
77 Amount of noise in the input value.
78 Omitting this property indicates the axis is precise.
81 $ref: /schemas/types.yaml#/definitions/uint32
83 Axial "deadzone", or area around the center position, where the axis
84 is considered to be at rest.
85 Omitting this property indicates the axis always returns to exactly
93 additionalProperties: false
97 #include <dt-bindings/iio/adc/ingenic,adc.h>
98 #include <dt-bindings/input/input.h>
100 joystick: adc-joystick {
101 compatible = "adc-joystick";
102 io-channels = <&adc INGENIC_ADC_TOUCH_XP>,
103 <&adc INGENIC_ADC_TOUCH_YP>;
104 #address-cells = <1>;
109 linux,code = <ABS_X>;
110 abs-range = <3300 0>;
116 linux,code = <ABS_Y>;
117 abs-range = <0 3300>;