usb.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Functions local to drivers/usb/core/ */
  2. extern void usb_create_sysfs_dev_files (struct usb_device *dev);
  3. extern void usb_remove_sysfs_dev_files (struct usb_device *dev);
  4. extern void usb_create_sysfs_intf_files (struct usb_interface *intf);
  5. extern void usb_remove_sysfs_intf_files (struct usb_interface *intf);
  6. extern void usb_disable_endpoint (struct usb_device *dev, unsigned int epaddr);
  7. extern void usb_disable_interface (struct usb_device *dev,
  8. struct usb_interface *intf);
  9. extern void usb_release_interface_cache(struct kref *ref);
  10. extern void usb_disable_device (struct usb_device *dev, int skip_ep0);
  11. extern int usb_get_device_descriptor(struct usb_device *dev,
  12. unsigned int size);
  13. extern int usb_set_configuration(struct usb_device *dev, int configuration);
  14. extern void usb_lock_all_devices(void);
  15. extern void usb_unlock_all_devices(void);
  16. extern void usb_kick_khubd(struct usb_device *dev);
  17. extern void usb_resume_root_hub(struct usb_device *dev);
  18. extern int usb_hub_init(void);
  19. extern void usb_hub_cleanup(void);
  20. extern int usb_major_init(void);
  21. extern void usb_major_cleanup(void);
  22. extern int usb_host_init(void);
  23. extern void usb_host_cleanup(void);
  24. /* for labeling diagnostics */
  25. extern const char *usbcore_name;
  26. /* usbfs stuff */
  27. extern struct usb_driver usbfs_driver;
  28. extern struct file_operations usbfs_devices_fops;
  29. extern struct file_operations usbfs_device_file_operations;
  30. extern void usbfs_conn_disc_event(void);
  31. extern int usbdev_init(void);
  32. extern void usbdev_cleanup(void);
  33. extern void usbdev_add(struct usb_device *dev);
  34. extern void usbdev_remove(struct usb_device *dev);
  35. extern struct usb_device *usbdev_lookup_minor(int minor);
  36. struct dev_state {
  37. struct list_head list; /* state list */
  38. struct usb_device *dev;
  39. struct file *file;
  40. spinlock_t lock; /* protects the async urb lists */
  41. struct list_head async_pending;
  42. struct list_head async_completed;
  43. wait_queue_head_t wait; /* wake up if a request completed */
  44. unsigned int discsignr;
  45. pid_t disc_pid;
  46. uid_t disc_uid, disc_euid;
  47. void __user *disccontext;
  48. unsigned long ifclaimed;
  49. };