Commit 6560cfcf authored by Chris Morgan's avatar Chris Morgan Committed by Dmitry Torokhov
Browse files

Input: adc-joystick - handle inverted axes



When one or more axes are inverted, (where min > max), normalize the
data so that min < max and invert the values reported to the input
stack.

This ensures we can continue defining the device correctly in the
device tree while not breaking downstream assumptions that min is
always less than max.

Signed-off-by: default avatarChris Morgan <macromorgan@hotmail.com>
Acked-by: default avatarArtur Rojek <contact@artur-rojek.eu>
Link: https://lore.kernel.org/r/20240115192752.266367-1-macroalpha82@gmail.com


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 5bbcece6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment