usb.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. struct dev_state {
  32. struct list_head list; /* state list */
  33. struct usb_device *dev;
  34. struct file *file;
  35. spinlock_t lock; /* protects the async urb lists */
  36. struct list_head async_pending;
  37. struct list_head async_completed;
  38. wait_queue_head_t wait; /* wake up if a request completed */
  39. unsigned int discsignr;
  40. struct task_struct *disctask;
  41. void __user *disccontext;
  42. unsigned long ifclaimed;
  43. };