aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/usb.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 35fe6ab222bb..73c7df489607 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -20,6 +20,7 @@
20#include <linux/completion.h> /* for struct completion */ 20#include <linux/completion.h> /* for struct completion */
21#include <linux/sched.h> /* for current && schedule_timeout */ 21#include <linux/sched.h> /* for current && schedule_timeout */
22#include <linux/mutex.h> /* for struct mutex */ 22#include <linux/mutex.h> /* for struct mutex */
23#include <linux/pm_runtime.h> /* for runtime PM */
23 24
24struct usb_device; 25struct usb_device;
25struct usb_driver; 26struct usb_driver;
@@ -313,6 +314,10 @@ struct usb_bus {
313 int busnum; /* Bus number (in order of reg) */ 314 int busnum; /* Bus number (in order of reg) */
314 const char *bus_name; /* stable id (PCI slot_name etc) */ 315 const char *bus_name; /* stable id (PCI slot_name etc) */
315 u8 uses_dma; /* Does the host controller use DMA? */ 316 u8 uses_dma; /* Does the host controller use DMA? */
317 u8 uses_pio_for_control; /*
318 * Does the host controller use PIO
319 * for control transfers?
320 */
316 u8 otg_port; /* 0, or number of OTG/HNP port */ 321 u8 otg_port; /* 0, or number of OTG/HNP port */
317 unsigned is_b_host:1; /* true during some HNP roleswitches */ 322 unsigned is_b_host:1; /* true during some HNP roleswitches */
318 unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ 323 unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */
@@ -407,8 +412,6 @@ struct usb_tt;
407 * @quirks: quirks of the whole device 412 * @quirks: quirks of the whole device
408 * @urbnum: number of URBs submitted for the whole device 413 * @urbnum: number of URBs submitted for the whole device
409 * @active_duration: total time device is not suspended 414 * @active_duration: total time device is not suspended
410 * @last_busy: time of last use
411 * @autosuspend_delay: in jiffies
412 * @connect_time: time device was first connected 415 * @connect_time: time device was first connected
413 * @do_remote_wakeup: remote wakeup should be enabled 416 * @do_remote_wakeup: remote wakeup should be enabled
414 * @reset_resume: needs reset instead of resume 417 * @reset_resume: needs reset instead of resume
@@ -481,8 +484,6 @@ struct usb_device {
481 unsigned long active_duration; 484 unsigned long active_duration;
482 485
483#ifdef CONFIG_PM 486#ifdef CONFIG_PM
484 unsigned long last_busy;
485 int autosuspend_delay;
486 unsigned long connect_time; 487 unsigned long connect_time;
487 488
488 unsigned do_remote_wakeup:1; 489 unsigned do_remote_wakeup:1;
@@ -527,7 +528,7 @@ extern void usb_autopm_put_interface_no_suspend(struct usb_interface *intf);
527 528
528static inline void usb_mark_last_busy(struct usb_device *udev) 529static inline void usb_mark_last_busy(struct usb_device *udev)
529{ 530{
530 udev->last_busy = jiffies; 531 pm_runtime_mark_last_busy(&udev->dev);
531} 532}
532 533
533#else 534#else
@@ -622,7 +623,7 @@ extern struct usb_host_interface *usb_find_alt_setting(
622 * USB hubs. That makes it stay the same until systems are physically 623 * USB hubs. That makes it stay the same until systems are physically
623 * reconfigured, by re-cabling a tree of USB devices or by moving USB host 624 * reconfigured, by re-cabling a tree of USB devices or by moving USB host
624 * controllers. Adding and removing devices, including virtual root hubs 625 * controllers. Adding and removing devices, including virtual root hubs
625 * in host controller driver modules, does not change these path identifers; 626 * in host controller driver modules, does not change these path identifiers;
626 * neither does rebooting or re-enumerating. These are more useful identifiers 627 * neither does rebooting or re-enumerating. These are more useful identifiers
627 * than changeable ("unstable") ones like bus numbers or device addresses. 628 * than changeable ("unstable") ones like bus numbers or device addresses.
628 * 629 *
@@ -792,12 +793,12 @@ struct usbdrv_wrap {
792 * usb_set_intfdata() to associate driver-specific data with the 793 * usb_set_intfdata() to associate driver-specific data with the
793 * interface. It may also use usb_set_interface() to specify the 794 * interface. It may also use usb_set_interface() to specify the
794 * appropriate altsetting. If unwilling to manage the interface, 795 * appropriate altsetting. If unwilling to manage the interface,
795 * return -ENODEV, if genuine IO errors occured, an appropriate 796 * return -ENODEV, if genuine IO errors occurred, an appropriate
796 * negative errno value. 797 * negative errno value.
797 * @disconnect: Called when the interface is no longer accessible, usually 798 * @disconnect: Called when the interface is no longer accessible, usually
798 * because its device has been (or is being) disconnected or the 799 * because its device has been (or is being) disconnected or the
799 * driver module is being unloaded. 800 * driver module is being unloaded.
800 * @ioctl: Used for drivers that want to talk to userspace through 801 * @unlocked_ioctl: Used for drivers that want to talk to userspace through
801 * the "usbfs" filesystem. This lets devices provide ways to 802 * the "usbfs" filesystem. This lets devices provide ways to
802 * expose information to user space regardless of where they 803 * expose information to user space regardless of where they
803 * do (or don't) show up otherwise in the filesystem. 804 * do (or don't) show up otherwise in the filesystem.
@@ -805,8 +806,10 @@ struct usbdrv_wrap {
805 * @resume: Called when the device is being resumed by the system. 806 * @resume: Called when the device is being resumed by the system.
806 * @reset_resume: Called when the suspended device has been reset instead 807 * @reset_resume: Called when the suspended device has been reset instead
807 * of being resumed. 808 * of being resumed.
808 * @pre_reset: Called by usb_reset_device() when the device 809 * @pre_reset: Called by usb_reset_device() when the device is about to be
809 * is about to be reset. 810 * reset. This routine must not return until the driver has no active
811 * URBs for the device, and no more URBs may be submitted until the
812 * post_reset method is called.
810 * @post_reset: Called by usb_reset_device() after the device 813 * @post_reset: Called by usb_reset_device() after the device
811 * has been reset 814 * has been reset
812 * @id_table: USB drivers use ID table to support hotplugging. 815 * @id_table: USB drivers use ID table to support hotplugging.
@@ -975,6 +978,7 @@ extern int usb_disabled(void);
975#define URB_SETUP_MAP_SINGLE 0x00100000 /* Setup packet DMA mapped */ 978#define URB_SETUP_MAP_SINGLE 0x00100000 /* Setup packet DMA mapped */
976#define URB_SETUP_MAP_LOCAL 0x00200000 /* HCD-local setup packet */ 979#define URB_SETUP_MAP_LOCAL 0x00200000 /* HCD-local setup packet */
977#define URB_DMA_SG_COMBINED 0x00400000 /* S-G entries were combined */ 980#define URB_DMA_SG_COMBINED 0x00400000 /* S-G entries were combined */
981#define URB_ALIGNED_TEMP_BUFFER 0x00800000 /* Temp buffer was alloc'd */
978 982
979struct usb_iso_packet_descriptor { 983struct usb_iso_packet_descriptor {
980 unsigned int offset; 984 unsigned int offset;