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.
65 - $ref: /schemas/types.yaml#/definitions/uint32-array
67 - description: minimum value
68 - description: maximum value
70 Minimum and maximum values produced by the axis.
71 For an ABS_X axis this will be the left-most and right-most
72 inclination of the joystick. If min > max, it is left to userspace to
73 treat the axis as inverted.
74 This property is interpreted as two signed 32 bit values.
77 $ref: /schemas/types.yaml#/definitions/uint32
79 Amount of noise in the input value.
80 Omitting this property indicates the axis is precise.
83 $ref: /schemas/types.yaml#/definitions/uint32
85 Axial "deadzone", or area around the center position, where the axis
86 is considered to be at rest.
87 Omitting this property indicates the axis always returns to exactly
95 additionalProperties: false
99 #include <dt-bindings/iio/adc/ingenic,adc.h>
100 #include <dt-bindings/input/input.h>
102 joystick: adc-joystick {
103 compatible = "adc-joystick";
104 io-channels = <&adc INGENIC_ADC_TOUCH_XP>,
105 <&adc INGENIC_ADC_TOUCH_YP>;
106 #address-cells = <1>;
111 linux,code = <ABS_X>;
112 abs-range = <3300 0>;
118 linux,code = <ABS_Y>;
119 abs-range = <0 3300>;