diff options
Diffstat (limited to 'drivers/usb/core/usb.h')
-rw-r--r-- | drivers/usb/core/usb.h | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index e6504f3370ad..1c4a68499dce 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h | |||
@@ -13,12 +13,14 @@ extern void usb_disable_device (struct usb_device *dev, int skip_ep0); | |||
13 | 13 | ||
14 | extern int usb_get_device_descriptor(struct usb_device *dev, | 14 | extern int usb_get_device_descriptor(struct usb_device *dev, |
15 | unsigned int size); | 15 | unsigned int size); |
16 | extern char *usb_cache_string(struct usb_device *udev, int index); | ||
16 | extern int usb_set_configuration(struct usb_device *dev, int configuration); | 17 | extern int usb_set_configuration(struct usb_device *dev, int configuration); |
17 | 18 | ||
18 | extern void usb_lock_all_devices(void); | 19 | extern void usb_lock_all_devices(void); |
19 | extern void usb_unlock_all_devices(void); | 20 | extern void usb_unlock_all_devices(void); |
20 | 21 | ||
21 | extern void usb_kick_khubd(struct usb_device *dev); | 22 | extern void usb_kick_khubd(struct usb_device *dev); |
23 | extern void usb_suspend_root_hub(struct usb_device *hdev); | ||
22 | extern void usb_resume_root_hub(struct usb_device *dev); | 24 | extern void usb_resume_root_hub(struct usb_device *dev); |
23 | 25 | ||
24 | extern int usb_hub_init(void); | 26 | extern int usb_hub_init(void); |
@@ -28,6 +30,28 @@ extern void usb_major_cleanup(void); | |||
28 | extern int usb_host_init(void); | 30 | extern int usb_host_init(void); |
29 | extern void usb_host_cleanup(void); | 31 | extern void usb_host_cleanup(void); |
30 | 32 | ||
33 | extern int usb_suspend_device(struct usb_device *dev); | ||
34 | extern int usb_resume_device(struct usb_device *dev); | ||
35 | |||
36 | |||
37 | /* Interfaces and their "power state" are owned by usbcore */ | ||
38 | |||
39 | static inline void mark_active(struct usb_interface *f) | ||
40 | { | ||
41 | f->dev.power.power_state.event = PM_EVENT_ON; | ||
42 | } | ||
43 | |||
44 | static inline void mark_quiesced(struct usb_interface *f) | ||
45 | { | ||
46 | f->dev.power.power_state.event = PM_EVENT_FREEZE; | ||
47 | } | ||
48 | |||
49 | static inline int is_active(struct usb_interface *f) | ||
50 | { | ||
51 | return f->dev.power.power_state.event == PM_EVENT_ON; | ||
52 | } | ||
53 | |||
54 | |||
31 | /* for labeling diagnostics */ | 55 | /* for labeling diagnostics */ |
32 | extern const char *usbcore_name; | 56 | extern const char *usbcore_name; |
33 | 57 | ||
@@ -39,9 +63,6 @@ extern void usbfs_conn_disc_event(void); | |||
39 | 63 | ||
40 | extern int usbdev_init(void); | 64 | extern int usbdev_init(void); |
41 | extern void usbdev_cleanup(void); | 65 | extern void usbdev_cleanup(void); |
42 | extern void usbdev_add(struct usb_device *dev); | ||
43 | extern void usbdev_remove(struct usb_device *dev); | ||
44 | extern struct usb_device *usbdev_lookup_minor(int minor); | ||
45 | 66 | ||
46 | struct dev_state { | 67 | struct dev_state { |
47 | struct list_head list; /* state list */ | 68 | struct list_head list; /* state list */ |
@@ -58,3 +79,9 @@ struct dev_state { | |||
58 | unsigned long ifclaimed; | 79 | unsigned long ifclaimed; |
59 | }; | 80 | }; |
60 | 81 | ||
82 | /* internal notify stuff */ | ||
83 | extern void usb_notify_add_device(struct usb_device *udev); | ||
84 | extern void usb_notify_remove_device(struct usb_device *udev); | ||
85 | extern void usb_notify_add_bus(struct usb_bus *ubus); | ||
86 | extern void usb_notify_remove_bus(struct usb_bus *ubus); | ||
87 | |||