diff options
author | Ping Cheng <pinglinux@gmail.com> | 2011-08-27 02:10:02 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-08-27 02:20:12 -0400 |
commit | cfb7d557242783bc3bfe77683ced20b4909258ec (patch) | |
tree | 28b21b71ac32cf7aa8cdf9856c3ff993a863da09 /drivers/input/tablet | |
parent | 9eff794b777ac9ca034129a1b637204000c8fb29 (diff) |
Input: wacom - remove pressure for touch devices
Touch devices do not report valid pressure or capacitance.
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 14 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 6 |
2 files changed, 3 insertions, 17 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index d27c9d91630b..958b4eb6369d 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -229,13 +229,6 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi | |||
229 | get_unaligned_le16(&report[i + 3]); | 229 | get_unaligned_le16(&report[i + 3]); |
230 | i += 4; | 230 | i += 4; |
231 | } | 231 | } |
232 | } else if (usage == WCM_DIGITIZER) { | ||
233 | /* max pressure isn't reported | ||
234 | features->pressure_max = (unsigned short) | ||
235 | (report[i+4] << 8 | report[i + 3]); | ||
236 | */ | ||
237 | features->pressure_max = 255; | ||
238 | i += 4; | ||
239 | } | 232 | } |
240 | break; | 233 | break; |
241 | 234 | ||
@@ -291,13 +284,6 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi | |||
291 | pen = 1; | 284 | pen = 1; |
292 | i++; | 285 | i++; |
293 | break; | 286 | break; |
294 | |||
295 | case HID_USAGE_UNDEFINED: | ||
296 | if (usage == WCM_DESKTOP && finger) /* capacity */ | ||
297 | features->pressure_max = | ||
298 | get_unaligned_le16(&report[i + 3]); | ||
299 | i += 4; | ||
300 | break; | ||
301 | } | 287 | } |
302 | break; | 288 | break; |
303 | 289 | ||
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index c1c2f7b28d89..3eccf212d5b2 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -818,7 +818,6 @@ static int wacom_bpt_touch(struct wacom_wac *wacom) | |||
818 | x <<= 5; | 818 | x <<= 5; |
819 | y <<= 5; | 819 | y <<= 5; |
820 | } | 820 | } |
821 | input_report_abs(input, ABS_MT_PRESSURE, p); | ||
822 | input_report_abs(input, ABS_MT_POSITION_X, x); | 821 | input_report_abs(input, ABS_MT_POSITION_X, x); |
823 | input_report_abs(input, ABS_MT_POSITION_Y, y); | 822 | input_report_abs(input, ABS_MT_POSITION_Y, y); |
824 | } | 823 | } |
@@ -1056,10 +1055,11 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1056 | features->x_fuzz, 0); | 1055 | features->x_fuzz, 0); |
1057 | input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, | 1056 | input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, |
1058 | features->y_fuzz, 0); | 1057 | features->y_fuzz, 0); |
1059 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, | ||
1060 | features->pressure_fuzz, 0); | ||
1061 | 1058 | ||
1062 | if (features->device_type == BTN_TOOL_PEN) { | 1059 | if (features->device_type == BTN_TOOL_PEN) { |
1060 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, | ||
1061 | features->pressure_fuzz, 0); | ||
1062 | |||
1063 | /* penabled devices have fixed resolution for each model */ | 1063 | /* penabled devices have fixed resolution for each model */ |
1064 | input_abs_set_res(input_dev, ABS_X, features->x_resolution); | 1064 | input_abs_set_res(input_dev, ABS_X, features->x_resolution); |
1065 | input_abs_set_res(input_dev, ABS_Y, features->y_resolution); | 1065 | input_abs_set_res(input_dev, ABS_Y, features->y_resolution); |