Skip to content

Commit

Permalink
Input: wacom - remove pressure for touch devices
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ping Cheng authored and Dmitry Torokhov committed Aug 27, 2011
1 parent 9eff794 commit cfb7d55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
14 changes: 0 additions & 14 deletions drivers/input/tablet/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,6 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi
get_unaligned_le16(&report[i + 3]);
i += 4;
}
} else if (usage == WCM_DIGITIZER) {
/* max pressure isn't reported
features->pressure_max = (unsigned short)
(report[i+4] << 8 | report[i + 3]);
*/
features->pressure_max = 255;
i += 4;
}
break;

Expand Down Expand Up @@ -291,13 +284,6 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi
pen = 1;
i++;
break;

case HID_USAGE_UNDEFINED:
if (usage == WCM_DESKTOP && finger) /* capacity */
features->pressure_max =
get_unaligned_le16(&report[i + 3]);
i += 4;
break;
}
break;

Expand Down
6 changes: 3 additions & 3 deletions drivers/input/tablet/wacom_wac.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,6 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
x <<= 5;
y <<= 5;
}
input_report_abs(input, ABS_MT_PRESSURE, p);
input_report_abs(input, ABS_MT_POSITION_X, x);
input_report_abs(input, ABS_MT_POSITION_Y, y);
}
Expand Down Expand Up @@ -1056,10 +1055,11 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
features->x_fuzz, 0);
input_set_abs_params(input_dev, ABS_Y, 0, features->y_max,
features->y_fuzz, 0);
input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max,
features->pressure_fuzz, 0);

if (features->device_type == BTN_TOOL_PEN) {
input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max,
features->pressure_fuzz, 0);

/* penabled devices have fixed resolution for each model */
input_abs_set_res(input_dev, ABS_X, features->x_resolution);
input_abs_set_res(input_dev, ABS_Y, features->y_resolution);
Expand Down

0 comments on commit cfb7d55

Please sign in to comment.