Skip to content

Commit b72fb1d

Browse files
jigpuJiri Kosina
authored andcommitted
HID: wacom: Correct distance scale for 2nd-gen Intuos devices
Distance values reported by 2nd-gen Intuos tablets are on an inverted scale (0 == far, 63 == near). We need to change them over to a normal scale before reporting to userspace or else userspace drivers and applications can get confused. Ref: linuxwacom/input-wacom#98 Fixes: eda01da ("HID: wacom: Add four new Intuos devices") Signed-off-by: Jason Gerecke <[email protected]> Cc: <[email protected]> # v4.4+ Signed-off-by: Jiri Kosina <[email protected]>
1 parent a3384b8 commit b72fb1d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/hid/wacom_wac.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,8 @@ static int wacom_intuos_general(struct wacom_wac *wacom)
846846
y >>= 1;
847847
distance >>= 1;
848848
}
849+
if (features->type == INTUOSHT2)
850+
distance = features->distance_max - distance;
849851
input_report_abs(input, ABS_X, x);
850852
input_report_abs(input, ABS_Y, y);
851853
input_report_abs(input, ABS_DISTANCE, distance);

0 commit comments

Comments
 (0)