diff options
Diffstat (limited to 'src/2.6.13/wacom_sys.c')
-rwxr-xr-x | src/2.6.13/wacom_sys.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/2.6.13/wacom_sys.c b/src/2.6.13/wacom_sys.c index 368d998..488400b 100755 --- a/src/2.6.13/wacom_sys.c +++ b/src/2.6.13/wacom_sys.c @@ -49,6 +49,7 @@ struct hid_descriptor /* defines to get/set USB message */ #define USB_REQ_GET_REPORT 0x01 #define USB_REQ_SET_REPORT 0x09 +#define WAC_HID_FEATURE_REPORT 0x03 static int usb_get_report(struct usb_interface *intf, unsigned char type, unsigned char id, void *buf, int size) @@ -418,11 +419,12 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i wacom->dev.close = wacom_close; wacom->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); - wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); + wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_STYLUS); input_set_abs_params(&wacom->dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); input_set_abs_params(&wacom->dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); input_set_abs_params(&wacom->dev, ABS_PRESSURE, 0, wacom_wac->features->pressure_max, 0, 0); if (wacom_wac->features->type == TABLETPC) { + wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOUCH); input_set_abs_params(&wacom->dev, ABS_RX, 0, wacom_wac->features->touch_x_max, 4, 0); input_set_abs_params(&wacom->dev, ABS_RY, 0, wacom_wac->features->touch_y_max, 4, 0); } @@ -439,19 +441,17 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i input_register_device(&wacom->dev); - /* TabletPC second bit 0 is for stylus mode*/ - if (wacom_wac->features->type == TABLETPC) - mode = 0; - - /* Ask the tablet to report tablet data. Repeat until it succeeds */ - do { - rep_data[0] = 2; - rep_data[1] = mode; - /* TabletPC doesn't need set report call */ - if (wacom_wac->features->type != TABLETPC) + /* Ask the tablet to report tablet data if it is not a Tablet PC. + * Repeat until it succeeds + */ + if (wacom_wac->features->type != TABLETPC) { + do { + rep_data[0] = 2; + rep_data[1] = mode; usb_set_report(intf, USB_DT_STRING, 2, rep_data, 2); - usb_get_report(intf, USB_DT_STRING, 2, rep_data, 2); - } while (rep_data[1] != mode && limit++ < 5); + usb_get_report(intf, USB_DT_STRING, 2, rep_data, 2); + } while (rep_data[1] != mode && limit++ < 5); + } usb_set_intfdata(intf, wacom); kfree(report); |