diff options
author | Roderick Colenbrander <roderick.colenbrander@sony.com> | 2017-03-07 15:45:00 -0800 |
---|---|---|
committer | Siarhei Vishniakou <svv@google.com> | 2019-11-07 11:14:06 -0600 |
commit | 4b6c5de73c9b5deb98f725b3731dece8f4693587 (patch) | |
tree | 5e5fbe85c1f6abbcb2f17624ba4a84ea1c614256 /include/uapi/linux | |
parent | 5cbac92a650f5fbdc2b9408e4fcb9f4b835ee90a (diff) |
UPSTREAM: HID: sony: Report DS4 motion sensors through a separate device
The DS4 motion sensors are currently mapped by the hid-core driver
to non-existing axes in between ABS_MISC and ABS_MT_SLOT, because
the device already exhausted ABS_X-ABS_RZ. For a part the mapping
by hid-core is accomplished by a fixup in hid-sony as the motion
axes actually use vendor specific usage pages.
This patch makes the DS4 use a separate input device for the motion
sensors and reports acceleration data through ABS_X-ABS_Z and
gyroscope data through ABS_RX-ABS_RZ. In addition it extends the
event spec to allow gyroscope data through ABS_RX-ABS_RZ when
INPUT_PROP_ACCELEROMETER is set. This change was suggested by
Peter Hutterer during a discussion on linux-input.
[jkosina@suse.cz: rebase onto slightly newer codebase]
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit 227c011b2e046dd4d36d9e00e3d9c88097b2a4c3)
Bug: 111431828
Signed-off-by: Kim Low <kim-huei.low@sony.com>
Change-Id: I26c22b0b076f114e9965460b589b22014b0c4b2f
Signed-off-by: Siarhei Vishniakou <svv@google.com>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r-- | include/uapi/linux/input.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h index 2758687300b4..ff7bdec34011 100644 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h @@ -61,9 +61,14 @@ struct input_id { * Note that input core does not clamp reported values to the * [minimum, maximum] limits, such task is left to userspace. * - * Resolution for main axes (ABS_X, ABS_Y, ABS_Z) is reported in - * units per millimeter (units/mm), resolution for rotational axes - * (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian. + * The default resolution for main axes (ABS_X, ABS_Y, ABS_Z) + * is reported in units per millimeter (units/mm), resolution + * for rotational axes (ABS_RX, ABS_RY, ABS_RZ) is reported + * in units per radian. + * When INPUT_PROP_ACCELEROMETER is set the resolution changes. + * The main axes (ABS_X, ABS_Y, ABS_Z) are then reported in + * in units per g (units/g) and in units per degree per second + * (units/deg/s) for rotational axes (ABS_RX, ABS_RY, ABS_RZ). */ struct input_absinfo { __s32 value; |