]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* Functions local to drivers/usb/core/ */ |
2 | ||
3 | extern void usb_create_sysfs_dev_files (struct usb_device *dev); | |
4 | extern void usb_remove_sysfs_dev_files (struct usb_device *dev); | |
5 | extern void usb_create_sysfs_intf_files (struct usb_interface *intf); | |
6 | extern void usb_remove_sysfs_intf_files (struct usb_interface *intf); | |
7 | ||
8 | extern void usb_disable_endpoint (struct usb_device *dev, unsigned int epaddr); | |
9 | extern void usb_disable_interface (struct usb_device *dev, | |
10 | struct usb_interface *intf); | |
11 | extern void usb_release_interface_cache(struct kref *ref); | |
12 | extern void usb_disable_device (struct usb_device *dev, int skip_ep0); | |
13 | ||
14 | extern int usb_get_device_descriptor(struct usb_device *dev, | |
15 | unsigned int size); | |
16 | extern int usb_set_configuration(struct usb_device *dev, int configuration); | |
17 | ||
18 | extern void usb_lock_all_devices(void); | |
19 | extern void usb_unlock_all_devices(void); | |
20 | ||
21 | extern void usb_kick_khubd(struct usb_device *dev); | |
979d5199 | 22 | extern void usb_suspend_root_hub(struct usb_device *hdev); |
1da177e4 LT |
23 | extern void usb_resume_root_hub(struct usb_device *dev); |
24 | ||
6d5e8254 GKH |
25 | extern int usb_hub_init(void); |
26 | extern void usb_hub_cleanup(void); | |
27 | extern int usb_major_init(void); | |
28 | extern void usb_major_cleanup(void); | |
29 | extern int usb_host_init(void); | |
30 | extern void usb_host_cleanup(void); | |
31 | ||
db690874 DB |
32 | /* Interfaces and their "power state" are owned by usbcore */ |
33 | ||
34 | static inline void mark_active(struct usb_interface *f) | |
35 | { | |
36 | f->dev.power.power_state.event = PM_EVENT_ON; | |
37 | } | |
38 | ||
39 | static inline void mark_quiesced(struct usb_interface *f) | |
40 | { | |
41 | f->dev.power.power_state.event = PM_EVENT_FREEZE; | |
42 | } | |
43 | ||
44 | static inline int is_active(struct usb_interface *f) | |
45 | { | |
46 | return f->dev.power.power_state.event == PM_EVENT_ON; | |
47 | } | |
48 | ||
49 | ||
1da177e4 LT |
50 | /* for labeling diagnostics */ |
51 | extern const char *usbcore_name; | |
52 | ||
53 | /* usbfs stuff */ | |
54 | extern struct usb_driver usbfs_driver; | |
55 | extern struct file_operations usbfs_devices_fops; | |
56 | extern struct file_operations usbfs_device_file_operations; | |
57 | extern void usbfs_conn_disc_event(void); | |
58 | ||
fbf82fd2 KS |
59 | extern int usbdev_init(void); |
60 | extern void usbdev_cleanup(void); | |
61 | extern void usbdev_add(struct usb_device *dev); | |
62 | extern void usbdev_remove(struct usb_device *dev); | |
63 | extern struct usb_device *usbdev_lookup_minor(int minor); | |
6d5e8254 | 64 | |
1da177e4 LT |
65 | struct dev_state { |
66 | struct list_head list; /* state list */ | |
67 | struct usb_device *dev; | |
68 | struct file *file; | |
69 | spinlock_t lock; /* protects the async urb lists */ | |
70 | struct list_head async_pending; | |
71 | struct list_head async_completed; | |
72 | wait_queue_head_t wait; /* wake up if a request completed */ | |
73 | unsigned int discsignr; | |
d7dd8a72 LT |
74 | pid_t disc_pid; |
75 | uid_t disc_uid, disc_euid; | |
1da177e4 LT |
76 | void __user *disccontext; |
77 | unsigned long ifclaimed; | |
78 | }; | |
79 |