aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-10-13 16:18:32 -0400
committerHenrik Rydberg <rydberg@euromail.se>2010-12-16 04:43:27 -0500
commitb88cbd3a007608a224fad5413de6170c75afd5a7 (patch)
treec05a3dca8b0f057b39f0f61bf07a132d7569bd32
parent4a864183fb28ddf553e5b0b47858bc3c518dae94 (diff)
hid: egalax: Correct for device resolution report error
The firmware of both supported devices report a X/Y maximum of 4095, whereas in reality, it is eight times larger. Fixed with this patch. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Cc: Stephane Chatty <chatty@enac.fr> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-rw-r--r--drivers/hid/hid-egalax.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/hid-egalax.c b/drivers/hid/hid-egalax.c
index 5be513c363e3..733bebc885db 100644
--- a/drivers/hid/hid-egalax.c
+++ b/drivers/hid/hid-egalax.c
@@ -54,6 +54,7 @@ static int egalax_input_mapping(struct hid_device *hdev, struct hid_input *hi,
54 case HID_UP_GENDESK: 54 case HID_UP_GENDESK:
55 switch (usage->hid) { 55 switch (usage->hid) {
56 case HID_GD_X: 56 case HID_GD_X:
57 field->logical_maximum = 32760;
57 hid_map_usage(hi, usage, bit, max, 58 hid_map_usage(hi, usage, bit, max,
58 EV_ABS, ABS_MT_POSITION_X); 59 EV_ABS, ABS_MT_POSITION_X);
59 set_abs(input, ABS_MT_POSITION_X, field, 0); 60 set_abs(input, ABS_MT_POSITION_X, field, 0);
@@ -61,6 +62,7 @@ static int egalax_input_mapping(struct hid_device *hdev, struct hid_input *hi,
61 set_abs(input, ABS_X, field, 0); 62 set_abs(input, ABS_X, field, 0);
62 return 1; 63 return 1;
63 case HID_GD_Y: 64 case HID_GD_Y:
65 field->logical_maximum = 32760;
64 hid_map_usage(hi, usage, bit, max, 66 hid_map_usage(hi, usage, bit, max,
65 EV_ABS, ABS_MT_POSITION_Y); 67 EV_ABS, ABS_MT_POSITION_Y);
66 set_abs(input, ABS_MT_POSITION_Y, field, 0); 68 set_abs(input, ABS_MT_POSITION_Y, field, 0);