Skip to content

Commit

Permalink
Input: wacom - use BTN_TOOL_FINGER to indicate touch device type
Browse files Browse the repository at this point in the history
Tested-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
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 Jan 31, 2012
1 parent 393f9ff commit 8b4a0c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions drivers/input/tablet/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static int wacom_parse_logical_collection(unsigned char *report,

/* Logical collection is only used by 3rd gen Bamboo Touch */
features->pktlen = WACOM_PKGLEN_BBTOUCH3;
features->device_type = BTN_TOOL_DOUBLETAP;
features->device_type = BTN_TOOL_FINGER;

/*
* Stylus and Touch have same active area
Expand Down Expand Up @@ -286,12 +286,10 @@ static int wacom_parse_hid(struct usb_interface *intf,
if (features->type == TABLETPC2FG) {
/* need to reset back */
features->pktlen = WACOM_PKGLEN_TPC2FG;
features->device_type = BTN_TOOL_DOUBLETAP;
}
if (features->type == BAMBOO_PT) {
/* need to reset back */
features->pktlen = WACOM_PKGLEN_BBTOUCH;
features->device_type = BTN_TOOL_DOUBLETAP;
features->x_phy =
get_unaligned_le16(&report[i + 5]);
features->x_max =
Expand Down Expand Up @@ -325,7 +323,6 @@ static int wacom_parse_hid(struct usb_interface *intf,
if (features->type == TABLETPC2FG) {
/* need to reset back */
features->pktlen = WACOM_PKGLEN_TPC2FG;
features->device_type = BTN_TOOL_DOUBLETAP;
features->y_max =
get_unaligned_le16(&report[i + 3]);
features->y_phy =
Expand All @@ -334,7 +331,6 @@ static int wacom_parse_hid(struct usb_interface *intf,
} else if (features->type == BAMBOO_PT) {
/* need to reset back */
features->pktlen = WACOM_PKGLEN_BBTOUCH;
features->device_type = BTN_TOOL_DOUBLETAP;
features->y_phy =
get_unaligned_le16(&report[i + 3]);
features->y_max =
Expand Down
4 changes: 2 additions & 2 deletions drivers/input/tablet/wacom_wac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
break;

case TABLETPC2FG:
if (features->device_type == BTN_TOOL_DOUBLETAP) {
if (features->device_type == BTN_TOOL_FINGER) {

input_mt_init_slots(input_dev, 2);
input_set_abs_params(input_dev, ABS_MT_TOOL_TYPE,
Expand Down Expand Up @@ -1366,7 +1366,7 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,

__set_bit(INPUT_PROP_POINTER, input_dev->propbit);

if (features->device_type == BTN_TOOL_DOUBLETAP) {
if (features->device_type == BTN_TOOL_FINGER) {
__set_bit(BTN_LEFT, input_dev->keybit);
__set_bit(BTN_FORWARD, input_dev->keybit);
__set_bit(BTN_BACK, input_dev->keybit);
Expand Down

0 comments on commit 8b4a0c1

Please sign in to comment.