Lines Matching refs:wacom

75 	struct wacom *wacom = urb->context;  in wacom_sys_irq()  local
93 wacom_wac_irq(&wacom->wacom_wac, urb->actual_length); in wacom_sys_irq()
96 usb_mark_last_busy(wacom->usbdev); in wacom_sys_irq()
105 struct wacom *wacom = input_get_drvdata(dev); in wacom_open() local
108 if (usb_autopm_get_interface(wacom->intf) < 0) in wacom_open()
111 mutex_lock(&wacom->lock); in wacom_open()
113 if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { in wacom_open()
118 wacom->open = true; in wacom_open()
119 wacom->intf->needs_remote_wakeup = 1; in wacom_open()
122 mutex_unlock(&wacom->lock); in wacom_open()
123 usb_autopm_put_interface(wacom->intf); in wacom_open()
129 struct wacom *wacom = input_get_drvdata(dev); in wacom_close() local
132 autopm_error = usb_autopm_get_interface(wacom->intf); in wacom_close()
134 mutex_lock(&wacom->lock); in wacom_close()
135 usb_kill_urb(wacom->irq); in wacom_close()
136 wacom->open = false; in wacom_close()
137 wacom->intf->needs_remote_wakeup = 0; in wacom_close()
138 mutex_unlock(&wacom->lock); in wacom_close()
141 usb_autopm_put_interface(wacom->intf); in wacom_close()
417 static int wacom_add_shared_data(struct wacom_wac *wacom, in wacom_add_shared_data() argument
438 wacom->shared = &data->shared; in wacom_add_shared_data()
457 static void wacom_remove_shared_data(struct wacom_wac *wacom) in wacom_remove_shared_data() argument
461 if (wacom->shared) { in wacom_remove_shared_data()
462 data = container_of(wacom->shared, struct wacom_usbdev_data, shared); in wacom_remove_shared_data()
464 wacom->shared = NULL; in wacom_remove_shared_data()
472 struct wacom *wacom; in wacom_probe() local
481 wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL); in wacom_probe()
483 if (!wacom || !input_dev) { in wacom_probe()
488 wacom_wac = &wacom->wacom_wac; in wacom_probe()
497 GFP_KERNEL, &wacom->data_dma); in wacom_probe()
503 wacom->irq = usb_alloc_urb(0, GFP_KERNEL); in wacom_probe()
504 if (!wacom->irq) { in wacom_probe()
509 wacom->usbdev = dev; in wacom_probe()
510 wacom->intf = intf; in wacom_probe()
511 mutex_init(&wacom->lock); in wacom_probe()
512 usb_make_path(dev, wacom->phys, sizeof(wacom->phys)); in wacom_probe()
513 strlcat(wacom->phys, "/input0", sizeof(wacom->phys)); in wacom_probe()
545 input_set_drvdata(input_dev, wacom); in wacom_probe()
549 usb_fill_int_urb(wacom->irq, dev, in wacom_probe()
552 wacom_sys_irq, wacom, endpoint->bInterval); in wacom_probe()
553 wacom->irq->transfer_dma = wacom->data_dma; in wacom_probe()
554 wacom->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; in wacom_probe()
563 usb_set_intfdata(intf, wacom); in wacom_probe()
567 fail3: usb_free_urb(wacom->irq); in wacom_probe()
568 fail2: usb_free_coherent(dev, WACOM_PKGLEN_MAX, wacom_wac->data, wacom->data_dma); in wacom_probe()
570 kfree(wacom); in wacom_probe()
576 struct wacom *wacom = usb_get_intfdata(intf); in wacom_disconnect() local
580 usb_kill_urb(wacom->irq); in wacom_disconnect()
581 input_unregister_device(wacom->wacom_wac.input); in wacom_disconnect()
582 usb_free_urb(wacom->irq); in wacom_disconnect()
584 wacom->wacom_wac.data, wacom->data_dma); in wacom_disconnect()
585 wacom_remove_shared_data(&wacom->wacom_wac); in wacom_disconnect()
586 kfree(wacom); in wacom_disconnect()
591 struct wacom *wacom = usb_get_intfdata(intf); in wacom_suspend() local
593 mutex_lock(&wacom->lock); in wacom_suspend()
594 usb_kill_urb(wacom->irq); in wacom_suspend()
595 mutex_unlock(&wacom->lock); in wacom_suspend()
602 struct wacom *wacom = usb_get_intfdata(intf); in wacom_resume() local
603 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_resume()
606 mutex_lock(&wacom->lock); in wacom_resume()
611 if (wacom->open) in wacom_resume()
612 rv = usb_submit_urb(wacom->irq, GFP_NOIO); in wacom_resume()
616 mutex_unlock(&wacom->lock); in wacom_resume()