Lines Matching full:interface

9  * The driver connects to the kernel hardware RNG interface to provide
75 struct usb_interface *interface; member
97 usb_dbg(dev->interface, "free"); in chaoskey_free()
101 usb_put_intf(dev->interface); in chaoskey_free()
106 static int chaoskey_probe(struct usb_interface *interface, in chaoskey_probe() argument
109 struct usb_device *udev = interface_to_usbdev(interface); in chaoskey_probe()
110 struct usb_host_interface *altsetting = interface->cur_altsetting; in chaoskey_probe()
118 usb_dbg(interface, "probe %s-%s", udev->product, udev->serial); in chaoskey_probe()
123 usb_dbg(interface, "no IN endpoint found"); in chaoskey_probe()
132 usb_dbg(interface, "invalid size (%d)", size); in chaoskey_probe()
137 usb_dbg(interface, "size reduced from %d to %d\n", in chaoskey_probe()
149 dev->interface = usb_get_intf(interface); in chaoskey_probe()
193 usb_set_intfdata(interface, dev); in chaoskey_probe()
195 result = usb_register_dev(interface, &chaoskey_class); in chaoskey_probe()
197 usb_err(interface, "Unable to allocate minor number."); in chaoskey_probe()
206 usb_err(interface, "Unable to register with hwrng"); in chaoskey_probe()
210 usb_dbg(interface, "chaoskey probe success, size %d", dev->size); in chaoskey_probe()
214 usb_set_intfdata(interface, NULL); in chaoskey_probe()
219 static void chaoskey_disconnect(struct usb_interface *interface) in chaoskey_disconnect() argument
223 usb_dbg(interface, "disconnect"); in chaoskey_disconnect()
224 dev = usb_get_intfdata(interface); in chaoskey_disconnect()
226 usb_dbg(interface, "disconnect failed - no dev"); in chaoskey_disconnect()
233 usb_deregister_dev(interface, &chaoskey_class); in chaoskey_disconnect()
235 usb_set_intfdata(interface, NULL); in chaoskey_disconnect()
247 usb_dbg(interface, "disconnect done"); in chaoskey_disconnect()
253 struct usb_interface *interface; in chaoskey_open() local
255 /* get the interface from minor number and driver information */ in chaoskey_open()
256 interface = usb_find_interface(&chaoskey_driver, iminor(inode)); in chaoskey_open()
257 if (!interface) in chaoskey_open()
260 usb_dbg(interface, "open"); in chaoskey_open()
262 dev = usb_get_intfdata(interface); in chaoskey_open()
264 usb_dbg(interface, "open (dev)"); in chaoskey_open()
273 usb_dbg(interface, "open success"); in chaoskey_open()
280 struct usb_interface *interface; in chaoskey_release() local
285 interface = dev->interface; in chaoskey_release()
287 usb_dbg(interface, "release"); in chaoskey_release()
291 usb_dbg(interface, "open count at release is %d", dev->open); in chaoskey_release()
294 usb_dbg(interface, "invalid open count (%d)", dev->open); in chaoskey_release()
310 usb_dbg(interface, "release success"); in chaoskey_release()
319 usb_dbg(dev->interface, "callback status (%d)", status); in chaos_read_callback()
343 usb_dbg(dev->interface, "fill"); in _chaoskey_fill()
348 usb_dbg(dev->interface, "not empty yet (valid %d used %d)", in _chaoskey_fill()
355 usb_dbg(dev->interface, "device not present"); in _chaoskey_fill()
360 result = usb_autopm_get_interface(dev->interface); in _chaoskey_fill()
362 usb_dbg(dev->interface, "wakeup failed (result %d)", result); in _chaoskey_fill()
399 usb_autopm_put_interface(dev->interface); in _chaoskey_fill()
401 usb_dbg(dev->interface, "read %d bytes", dev->valid); in _chaoskey_fill()
422 usb_dbg(dev->interface, "read %zu", count); in chaoskey_read()
426 /* Grab the rng_lock briefly to ensure that the hwrng interface in chaoskey_read()
469 usb_dbg(dev->interface, "read %zu bytes", read_count); in chaoskey_read()
472 usb_dbg(dev->interface, "empty read, result %d", result); in chaoskey_read()
484 usb_dbg(dev->interface, "rng_read max %zu wait %d", max, wait); in chaoskey_rng_read()
487 usb_dbg(dev->interface, "device not present"); in chaoskey_rng_read()
518 usb_dbg(dev->interface, "rng_read this_time %d\n", this_time); in chaoskey_rng_read()
523 static int chaoskey_suspend(struct usb_interface *interface, in chaoskey_suspend() argument
526 usb_dbg(interface, "suspend"); in chaoskey_suspend()
530 static int chaoskey_resume(struct usb_interface *interface) in chaoskey_resume() argument
533 struct usb_device *udev = interface_to_usbdev(interface); in chaoskey_resume()
535 usb_dbg(interface, "resume"); in chaoskey_resume()
536 dev = usb_get_intfdata(interface); in chaoskey_resume()