Commit 6e8ec537 authored by Chris Bagwell's avatar Chris Bagwell Committed by Dmitry Torokhov

Input: wacom - cleanup feature report for bamboos

Only the stylus interface on Bamboo's has a feature report that can
be used to set to wacom mode.  The touch interface only has 1 report mode
and will return errors for those get/sets requests.

The get request was always erroring out because it was not marked as
an input request. Only down side of error was needlessly resending the
set request 5 times.
Signed-off-by: default avatarChris Bagwell <chris@cnpbagwell.com>
Acked-by: default avatarPing Cheng <pingc@wacom.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 3f48e735
...@@ -66,7 +66,8 @@ static int wacom_get_report(struct usb_interface *intf, u8 type, u8 id, ...@@ -66,7 +66,8 @@ static int wacom_get_report(struct usb_interface *intf, u8 type, u8 id,
do { do {
retval = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), retval = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
USB_REQ_GET_REPORT, USB_REQ_GET_REPORT,
USB_TYPE_CLASS | USB_RECIP_INTERFACE, USB_DIR_IN | USB_TYPE_CLASS |
USB_RECIP_INTERFACE,
(type << 8) + id, (type << 8) + id,
intf->altsetting[0].desc.bInterfaceNumber, intf->altsetting[0].desc.bInterfaceNumber,
buf, size, 100); buf, size, 100);
...@@ -362,7 +363,8 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat ...@@ -362,7 +363,8 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
WAC_HID_FEATURE_REPORT, WAC_HID_FEATURE_REPORT,
report_id, rep_data, 4, 1); report_id, rep_data, 4, 1);
} while ((error < 0 || rep_data[1] != 4) && limit++ < WAC_MSG_RETRIES); } while ((error < 0 || rep_data[1] != 4) && limit++ < WAC_MSG_RETRIES);
} else if (features->type != TABLETPC) { } else if (features->type != TABLETPC &&
features->device_type == BTN_TOOL_PEN) {
do { do {
rep_data[0] = 2; rep_data[0] = 2;
rep_data[1] = 2; rep_data[1] = 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment