Input: wacom - use BTN_TOOL_FINGER to indicate touch device type
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>
This commit is contained in:
parent
393f9ffb79
commit
8b4a0c1fe3
|
@ -176,7 +176,7 @@ static int wacom_parse_logical_collection(unsigned char *report,
|
||||||
|
|
||||||
/* Logical collection is only used by 3rd gen Bamboo Touch */
|
/* Logical collection is only used by 3rd gen Bamboo Touch */
|
||||||
features->pktlen = WACOM_PKGLEN_BBTOUCH3;
|
features->pktlen = WACOM_PKGLEN_BBTOUCH3;
|
||||||
features->device_type = BTN_TOOL_DOUBLETAP;
|
features->device_type = BTN_TOOL_FINGER;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Stylus and Touch have same active area
|
* Stylus and Touch have same active area
|
||||||
|
@ -286,12 +286,10 @@ static int wacom_parse_hid(struct usb_interface *intf,
|
||||||
if (features->type == TABLETPC2FG) {
|
if (features->type == TABLETPC2FG) {
|
||||||
/* need to reset back */
|
/* need to reset back */
|
||||||
features->pktlen = WACOM_PKGLEN_TPC2FG;
|
features->pktlen = WACOM_PKGLEN_TPC2FG;
|
||||||
features->device_type = BTN_TOOL_DOUBLETAP;
|
|
||||||
}
|
}
|
||||||
if (features->type == BAMBOO_PT) {
|
if (features->type == BAMBOO_PT) {
|
||||||
/* need to reset back */
|
/* need to reset back */
|
||||||
features->pktlen = WACOM_PKGLEN_BBTOUCH;
|
features->pktlen = WACOM_PKGLEN_BBTOUCH;
|
||||||
features->device_type = BTN_TOOL_DOUBLETAP;
|
|
||||||
features->x_phy =
|
features->x_phy =
|
||||||
get_unaligned_le16(&report[i + 5]);
|
get_unaligned_le16(&report[i + 5]);
|
||||||
features->x_max =
|
features->x_max =
|
||||||
|
@ -325,7 +323,6 @@ static int wacom_parse_hid(struct usb_interface *intf,
|
||||||
if (features->type == TABLETPC2FG) {
|
if (features->type == TABLETPC2FG) {
|
||||||
/* need to reset back */
|
/* need to reset back */
|
||||||
features->pktlen = WACOM_PKGLEN_TPC2FG;
|
features->pktlen = WACOM_PKGLEN_TPC2FG;
|
||||||
features->device_type = BTN_TOOL_DOUBLETAP;
|
|
||||||
features->y_max =
|
features->y_max =
|
||||||
get_unaligned_le16(&report[i + 3]);
|
get_unaligned_le16(&report[i + 3]);
|
||||||
features->y_phy =
|
features->y_phy =
|
||||||
|
@ -334,7 +331,6 @@ static int wacom_parse_hid(struct usb_interface *intf,
|
||||||
} else if (features->type == BAMBOO_PT) {
|
} else if (features->type == BAMBOO_PT) {
|
||||||
/* need to reset back */
|
/* need to reset back */
|
||||||
features->pktlen = WACOM_PKGLEN_BBTOUCH;
|
features->pktlen = WACOM_PKGLEN_BBTOUCH;
|
||||||
features->device_type = BTN_TOOL_DOUBLETAP;
|
|
||||||
features->y_phy =
|
features->y_phy =
|
||||||
get_unaligned_le16(&report[i + 3]);
|
get_unaligned_le16(&report[i + 3]);
|
||||||
features->y_max =
|
features->y_max =
|
||||||
|
|
|
@ -1317,7 +1317,7 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TABLETPC2FG:
|
case TABLETPC2FG:
|
||||||
if (features->device_type == BTN_TOOL_DOUBLETAP) {
|
if (features->device_type == BTN_TOOL_FINGER) {
|
||||||
|
|
||||||
input_mt_init_slots(input_dev, 2);
|
input_mt_init_slots(input_dev, 2);
|
||||||
input_set_abs_params(input_dev, ABS_MT_TOOL_TYPE,
|
input_set_abs_params(input_dev, ABS_MT_TOOL_TYPE,
|
||||||
|
@ -1366,7 +1366,7 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
|
||||||
|
|
||||||
__set_bit(INPUT_PROP_POINTER, input_dev->propbit);
|
__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_LEFT, input_dev->keybit);
|
||||||
__set_bit(BTN_FORWARD, input_dev->keybit);
|
__set_bit(BTN_FORWARD, input_dev->keybit);
|
||||||
__set_bit(BTN_BACK, input_dev->keybit);
|
__set_bit(BTN_BACK, input_dev->keybit);
|
||||||
|
|
Loading…
Reference in New Issue