Lines Matching refs:onetouch
90 struct usb_onetouch *onetouch = urb->context; in usb_onetouch_irq() local
91 signed char *data = onetouch->data; in usb_onetouch_irq()
92 struct input_dev *dev = onetouch->dev; in usb_onetouch_irq()
115 "retval %d\n", onetouch->udev->bus->bus_name, in usb_onetouch_irq()
116 onetouch->udev->devpath, retval); in usb_onetouch_irq()
121 struct usb_onetouch *onetouch = input_get_drvdata(dev); in usb_onetouch_open() local
123 onetouch->is_open = 1; in usb_onetouch_open()
124 onetouch->irq->dev = onetouch->udev; in usb_onetouch_open()
125 if (usb_submit_urb(onetouch->irq, GFP_KERNEL)) { in usb_onetouch_open()
135 struct usb_onetouch *onetouch = input_get_drvdata(dev); in usb_onetouch_close() local
137 usb_kill_urb(onetouch->irq); in usb_onetouch_close()
138 onetouch->is_open = 0; in usb_onetouch_close()
144 struct usb_onetouch *onetouch = (struct usb_onetouch *) us->extra; in usb_onetouch_pm_hook() local
146 if (onetouch->is_open) { in usb_onetouch_pm_hook()
149 usb_kill_urb(onetouch->irq); in usb_onetouch_pm_hook()
152 if (usb_submit_urb(onetouch->irq, GFP_NOIO) != 0) in usb_onetouch_pm_hook()
153 dev_err(&onetouch->irq->dev->dev, in usb_onetouch_pm_hook()
168 struct usb_onetouch *onetouch; in onetouch_connect_input() local
186 onetouch = kzalloc(sizeof(struct usb_onetouch), GFP_KERNEL); in onetouch_connect_input()
188 if (!onetouch || !input_dev) in onetouch_connect_input()
191 onetouch->data = usb_alloc_coherent(udev, ONETOUCH_PKT_LEN, in onetouch_connect_input()
192 GFP_KERNEL, &onetouch->data_dma); in onetouch_connect_input()
193 if (!onetouch->data) in onetouch_connect_input()
196 onetouch->irq = usb_alloc_urb(0, GFP_KERNEL); in onetouch_connect_input()
197 if (!onetouch->irq) in onetouch_connect_input()
200 onetouch->udev = udev; in onetouch_connect_input()
201 onetouch->dev = input_dev; in onetouch_connect_input()
204 strscpy(onetouch->name, udev->manufacturer, in onetouch_connect_input()
205 sizeof(onetouch->name)); in onetouch_connect_input()
208 strlcat(onetouch->name, " ", sizeof(onetouch->name)); in onetouch_connect_input()
209 strlcat(onetouch->name, udev->product, sizeof(onetouch->name)); in onetouch_connect_input()
212 if (!strlen(onetouch->name)) in onetouch_connect_input()
213 snprintf(onetouch->name, sizeof(onetouch->name), in onetouch_connect_input()
218 usb_make_path(udev, onetouch->phys, sizeof(onetouch->phys)); in onetouch_connect_input()
219 strlcat(onetouch->phys, "/input0", sizeof(onetouch->phys)); in onetouch_connect_input()
221 input_dev->name = onetouch->name; in onetouch_connect_input()
222 input_dev->phys = onetouch->phys; in onetouch_connect_input()
230 input_set_drvdata(input_dev, onetouch); in onetouch_connect_input()
235 usb_fill_int_urb(onetouch->irq, udev, pipe, onetouch->data, maxp, in onetouch_connect_input()
236 usb_onetouch_irq, onetouch, endpoint->bInterval); in onetouch_connect_input()
237 onetouch->irq->transfer_dma = onetouch->data_dma; in onetouch_connect_input()
238 onetouch->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; in onetouch_connect_input()
241 ss->extra = onetouch; in onetouch_connect_input()
246 error = input_register_device(onetouch->dev); in onetouch_connect_input()
252 fail3: usb_free_urb(onetouch->irq); in onetouch_connect_input()
254 onetouch->data, onetouch->data_dma); in onetouch_connect_input()
255 fail1: kfree(onetouch); in onetouch_connect_input()
262 struct usb_onetouch *onetouch = (struct usb_onetouch *) onetouch_; in onetouch_release_input() local
264 if (onetouch) { in onetouch_release_input()
265 usb_kill_urb(onetouch->irq); in onetouch_release_input()
266 input_unregister_device(onetouch->dev); in onetouch_release_input()
267 usb_free_urb(onetouch->irq); in onetouch_release_input()
268 usb_free_coherent(onetouch->udev, ONETOUCH_PKT_LEN, in onetouch_release_input()
269 onetouch->data, onetouch->data_dma); in onetouch_release_input()