History

Input: document the units for resolution of size axes

Today, the resolution of size axes is not documented. As a result, it's not clear what the canonical interpretation of this value should be. On Android, there is a need to calculate the size of the touch ellipse in physical units (millimeters). After reviewing linux source, it turned out that most of the existing usages are already interpreting this value as "units/mm". This documentation will make it explicit. This will help device implementations with correctly following the linux specs, and will ensure that the devices will work on Android without needing further customized parameters for scaling of major/minor values.

Siarhei Vishniakou committed 4 years ago

Commit 2a962711 parent 3de93e61 file · +7 −4Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/input.h+7−4
@@ -78,10 +78,13 @@ struct input_id { · 77 unmodified lines
78 * Note that input core does not clamp reported values to the78 * Note that input core does not clamp reported values to the
79 * [minimum, maximum] limits, such task is left to userspace.79 * [minimum, maximum] limits, such task is left to userspace.
80 *80 *
81 * The default resolution for main axes (ABS_X, ABS_Y, ABS_Z)81 * The default resolution for main axes (ABS_X, ABS_Y, ABS_Z,
82 * is reported in units per millimeter (units/mm), resolution82 * ABS_MT_POSITION_X, ABS_MT_POSITION_Y) is reported in units
83 * for rotational axes (ABS_RX, ABS_RY, ABS_RZ) is reported83 * per millimeter (units/mm), resolution for rotational axes
84 * in units per radian.84 * (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian.
85 * The resolution for the size axes (ABS_MT_TOUCH_MAJOR,
86 * ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MAJOR, ABS_MT_WIDTH_MINOR)
87 * is reported in units per millimeter (units/mm).
85 * When INPUT_PROP_ACCELEROMETER is set the resolution changes.88 * When INPUT_PROP_ACCELEROMETER is set the resolution changes.
86 * The main axes (ABS_X, ABS_Y, ABS_Z) are then reported in89 * The main axes (ABS_X, ABS_Y, ABS_Z) are then reported in
87 * units per g (units/g) and in units per degree per second90 * units per g (units/g) and in units per degree per second

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t