Lines Matching refs:wacom

106 struct wacom {  struct
119 struct wacom *wacom = urb->context; in wacom_pl_irq() argument
120 unsigned char *data = wacom->data; in wacom_pl_irq()
121 struct input_dev *dev = &wacom->dev; in wacom_pl_irq()
151 struct wacom *wacom = urb->context; in wacom_penpartner_irq() local
152 unsigned char *data = wacom->data; in wacom_penpartner_irq()
153 struct input_dev *dev = &wacom->dev; in wacom_penpartner_irq()
178 struct wacom *wacom = urb->context; in wacom_graphire_irq() local
179 unsigned char *data = wacom->data; in wacom_graphire_irq()
180 struct input_dev *dev = &wacom->dev; in wacom_graphire_irq()
233 struct wacom *wacom = urb->context; in wacom_intuos_irq() local
234 unsigned char *data = wacom->data; in wacom_intuos_irq()
235 struct input_dev *dev = &wacom->dev; in wacom_intuos_irq()
251 wacom->serial[idx] = ((__u32)(data[3] & 0x0f) << 4) + /* serial number of the tool */ in wacom_intuos_irq()
257 case 0x012: wacom->tool[idx] = BTN_TOOL_PENCIL; break; /* Inking pen */ in wacom_intuos_irq()
260 case 0x022: wacom->tool[idx] = BTN_TOOL_PEN; break; /* Pen */ in wacom_intuos_irq()
262 case 0x032: wacom->tool[idx] = BTN_TOOL_BRUSH; break; /* Stroke pen */ in wacom_intuos_irq()
265 case 0x094: wacom->tool[idx] = BTN_TOOL_MOUSE; break; /* Mouse 4D */ in wacom_intuos_irq()
266 case 0x096: wacom->tool[idx] = BTN_TOOL_LENS; break; /* Lens cursor */ in wacom_intuos_irq()
270 case 0x0fa: wacom->tool[idx] = BTN_TOOL_RUBBER; break; /* Eraser */ in wacom_intuos_irq()
271 case 0x112: wacom->tool[idx] = BTN_TOOL_AIRBRUSH; break; /* Airbrush */ in wacom_intuos_irq()
272 default: wacom->tool[idx] = BTN_TOOL_PEN; break; /* Unknown tool */ in wacom_intuos_irq()
275 input_report_key(dev, wacom->tool[idx], 1); in wacom_intuos_irq()
276 input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); in wacom_intuos_irq()
281 input_report_key(dev, wacom->tool[idx], 0); in wacom_intuos_irq()
282 input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); in wacom_intuos_irq()
335 input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); in wacom_intuos_irq()
414 struct wacom *wacom = dev->private; in wacom_open() local
416 if (wacom->open++) in wacom_open()
419 wacom->irq.dev = wacom->usbdev; in wacom_open()
420 if (usb_submit_urb(&wacom->irq)) in wacom_open()
428 struct wacom *wacom = dev->private; in wacom_close() local
430 if (!--wacom->open) in wacom_close()
431 usb_unlink_urb(&wacom->irq); in wacom_close()
437 struct wacom *wacom; in wacom_probe() local
440 if (!(wacom = kmalloc(sizeof(struct wacom), GFP_KERNEL))) return NULL; in wacom_probe()
441 memset(wacom, 0, sizeof(struct wacom)); in wacom_probe()
443 wacom->features = wacom_features + id->driver_info; in wacom_probe()
445 wacom->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC) | wacom->features->evbit; in wacom_probe()
446wacom->dev.absbit[0] |= BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE) | BIT(ABS_DISTANCE) | BIT(ABS_… in wacom_probe()
447 wacom->dev.relbit[0] |= wacom->features->relbit; in wacom_probe()
448wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | wacom->fea… in wacom_probe()
449wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE… in wacom_probe()
450 BIT(BTN_TOUCH) | BIT(BTN_STYLUS) | BIT(BTN_STYLUS2) | wacom->features->digibit; in wacom_probe()
451 wacom->dev.mscbit[0] |= BIT(MSC_SERIAL); in wacom_probe()
453 wacom->dev.absmax[ABS_X] = wacom->features->x_max; in wacom_probe()
454 wacom->dev.absmax[ABS_Y] = wacom->features->y_max; in wacom_probe()
455 wacom->dev.absmax[ABS_PRESSURE] = wacom->features->pressure_max; in wacom_probe()
456 wacom->dev.absmax[ABS_DISTANCE] = wacom->features->distance_max; in wacom_probe()
457 wacom->dev.absmax[ABS_TILT_X] = 127; in wacom_probe()
458 wacom->dev.absmax[ABS_TILT_Y] = 127; in wacom_probe()
459 wacom->dev.absmax[ABS_WHEEL] = 1023; in wacom_probe()
461 wacom->dev.absmin[ABS_RZ] = -900; in wacom_probe()
462 wacom->dev.absmax[ABS_RZ] = 899; in wacom_probe()
463 wacom->dev.absmin[ABS_THROTTLE] = -1023; in wacom_probe()
464 wacom->dev.absmax[ABS_THROTTLE] = 1023; in wacom_probe()
466 wacom->dev.absfuzz[ABS_X] = 4; in wacom_probe()
467 wacom->dev.absfuzz[ABS_Y] = 4; in wacom_probe()
469 wacom->dev.private = wacom; in wacom_probe()
470 wacom->dev.open = wacom_open; in wacom_probe()
471 wacom->dev.close = wacom_close; in wacom_probe()
473 wacom->dev.name = wacom->features->name; in wacom_probe()
474 wacom->dev.idbus = BUS_USB; in wacom_probe()
475 wacom->dev.idvendor = dev->descriptor.idVendor; in wacom_probe()
476 wacom->dev.idproduct = dev->descriptor.idProduct; in wacom_probe()
477 wacom->dev.idversion = dev->descriptor.bcdDevice; in wacom_probe()
478 wacom->usbdev = dev; in wacom_probe()
484 FILL_INT_URB(&wacom->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress), in wacom_probe()
485 wacom->data, wacom->features->pktlen, wacom->features->irq, wacom, endpoint->bInterval); in wacom_probe()
487 input_register_device(&wacom->dev); in wacom_probe()
495 wacom->dev.number, wacom->features->name, dev->bus->busnum, dev->devnum, ifnum); in wacom_probe()
497 return wacom; in wacom_probe()
502 struct wacom *wacom = ptr; in wacom_disconnect() local
503 usb_unlink_urb(&wacom->irq); in wacom_disconnect()
504 input_unregister_device(&wacom->dev); in wacom_disconnect()
505 kfree(wacom); in wacom_disconnect()