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.
28 List of phandle and IIO specifier pairs.
29 Each pair defines one ADC channel to which a joystick axis is connected.
31 https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml
48 additionalProperties: false
55 Represents a joystick axis bound to the given ADC channel.
56 For each entry in the io-channels list, one axis subnode with a matching
57 reg property must be specified.
63 description: Index of an io-channels list entry bound to this axis.
66 description: EV_ABS specific event code generated by the axis.
69 $ref: /schemas/types.yaml#/definitions/uint32-array
71 - description: minimum value
72 - description: maximum value
74 Minimum and maximum values produced by the axis.
75 For an ABS_X axis this will be the left-most and right-most
76 inclination of the joystick. If min > max, it is left to userspace to
77 treat the axis as inverted.
78 This property is interpreted as two signed 32 bit values.
81 $ref: /schemas/types.yaml#/definitions/uint32
83 Amount of noise in the input value.
84 Omitting this property indicates the axis is precise.
87 $ref: /schemas/types.yaml#/definitions/uint32
89 Axial "deadzone", or area around the center position, where the axis
90 is considered to be at rest.
91 Omitting this property indicates the axis always returns to exactly
99 additionalProperties: false
103 #include <dt-bindings/iio/adc/ingenic,adc.h>
104 #include <dt-bindings/input/input.h>
106 joystick: adc-joystick {
107 compatible = "adc-joystick";
108 io-channels = <&adc INGENIC_ADC_TOUCH_XP>,
109 <&adc INGENIC_ADC_TOUCH_YP>;
110 #address-cells = <1>;
115 linux,code = <ABS_X>;
116 abs-range = <3300 0>;
122 linux,code = <ABS_Y>;
123 abs-range = <0 3300>;