summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_controller.h
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2011-12-14 00:28:54 +0000
committerhselasky <hselasky@FreeBSD.org>2011-12-14 00:28:54 +0000
commit7076389cec83009f9046b6c6e2695fe340a63802 (patch)
tree56520f5d0635d8db6259b372fff280b4e6288da5 /sys/dev/usb/usb_controller.h
parent145914e3e7153161b6dd67fdcd58c7a8201845bc (diff)
downloadFreeBSD-src-7076389cec83009f9046b6c6e2695fe340a63802.zip
FreeBSD-src-7076389cec83009f9046b6c6e2695fe340a63802.tar.gz
Implement better support for USB controller suspend and resume.
This patch should remove the need for kldunload of USB controller drivers at suspend and kldload of USB controller drivers at resume. This patch also fixes some build issues in avr32dci.c MFC after: 2 weeks
Diffstat (limited to 'sys/dev/usb/usb_controller.h')
-rw-r--r--sys/dev/usb/usb_controller.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_controller.h b/sys/dev/usb/usb_controller.h
index 6b15dab..4ffc041 100644
--- a/sys/dev/usb/usb_controller.h
+++ b/sys/dev/usb/usb_controller.h
@@ -66,7 +66,7 @@ struct usb_bus_methods {
void (*device_suspend) (struct usb_device *);
void (*device_resume) (struct usb_device *);
void (*set_hw_power) (struct usb_bus *);
-
+ void (*set_hw_power_sleep) (struct usb_bus *, uint32_t);
/*
* The following flag is set if one or more control transfers are
* active:
@@ -92,6 +92,18 @@ struct usb_bus_methods {
* are present on the given USB bus:
*/
#define USB_HW_POWER_NON_ROOT_HUB 0x10
+ /*
+ * The following flag is set if we are suspending
+ */
+#define USB_HW_POWER_SUSPEND 0x20
+ /*
+ * The following flag is set if we are resuming
+ */
+#define USB_HW_POWER_RESUME 0x40
+ /*
+ * The following flag is set if we are shutting down
+ */
+#define USB_HW_POWER_SHUTDOWN 0x60
/* USB Device mode only - Mandatory */
OpenPOWER on IntegriCloud