[RFC] dt-bindings: input: Clarify that abs_min must be less than abs_max

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Chris Morgan <macromorgan@xxxxxxxxxxx>

uinput refuses to work with abs devices where the min value is greater
than the max value. uinput_validate_absinfo() returns -EINVAL if this
is the case and prevents using uinput on such a device. Since uinput
has worked this way since at least kernel 2.6 (or prior) I presume that
this is the correct way of doing things, and that this documentation
needs to be clarified that min must always be less than max.

uinput is used in my use case to bind together adc-joystick devices
with gpio-keys devices to create a single unified gamepad for
userspace.

Note that there are several boards that will need to be corrected,
all but a few of them I maintain. Submitting as an RFC for now to get
comments from the input team and the original author in case there is
something I am missing.

Fixes: 7956b0d4694f ("dt-bindings: input: Add docs for ADC driven joystick")

Signed-off-by: Chris Morgan <macromorgan@xxxxxxxxxxx>
---
 Documentation/devicetree/bindings/input/adc-joystick.yaml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/input/adc-joystick.yaml b/Documentation/devicetree/bindings/input/adc-joystick.yaml
index 6c244d66f8ce..8f5cdd5ef190 100644
--- a/Documentation/devicetree/bindings/input/adc-joystick.yaml
+++ b/Documentation/devicetree/bindings/input/adc-joystick.yaml
@@ -73,8 +73,9 @@ patternProperties:
         description: >
           Minimum and maximum values produced by the axis.
           For an ABS_X axis this will be the left-most and right-most
-          inclination of the joystick. If min > max, it is left to userspace to
-          treat the axis as inverted.
+          inclination of the joystick. The axis must always be expressed as
+          min < max, if the axis is inverted it is left to userspace to handle
+          the inversion.
           This property is interpreted as two signed 32 bit values.
 
       abs-fuzz:
-- 
2.34.1





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux