Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 3818

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>struct usb_device</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="The Linux-USB Host Side API" /><link rel="up" href="ch04.html" title="Chapter&#160;4.&#160;Host-Side Data Types and Macros" /><link rel="prev" href="re20.html" title="struct usb_host_config" /><link rel="next" href="re22.html" title="usb_interface_claimed" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>struct usb_device</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re20.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;4.&#160;Host-Side Data Types and Macros</th><td width="20%" align="right">&#160;<a accesskey="n" href="re22.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="struct usb_device"><a id="API-struct-usb-device"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct usb_device &#8212; 
     kernel's representation of a USB device
 </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><pre class="programlisting">
struct usb_device {
  int devnum;
  char devpath[16];
  u32 route;
  enum usb_device_state state;
  enum usb_device_speed speed;
  struct usb_tt * tt;
  int ttport;
  unsigned int toggle[2];
  struct usb_device * parent;
  struct usb_bus * bus;
  struct usb_host_endpoint ep0;
  struct device dev;
  struct usb_device_descriptor descriptor;
  struct usb_host_config * config;
  struct usb_host_config * actconfig;
  struct usb_host_endpoint * ep_in[16];
  struct usb_host_endpoint * ep_out[16];
  char ** rawdescriptors;
  unsigned short bus_mA;
  u8 portnum;
  u8 level;
  unsigned can_submit:1;
  unsigned discon_suspended:1;
  unsigned persist_enabled:1;
  unsigned have_langid:1;
  unsigned authorized:1;
  unsigned authenticated:1;
  unsigned wusb:1;
  int string_langid;
  char * product;
  char * manufacturer;
  char * serial;
  struct list_head filelist;
#ifdef CONFIG_USB_DEVICE_CLASS
  struct device * usb_classdev;
#endif
#ifdef CONFIG_USB_DEVICEFS
  struct dentry * usbfs_dentry;
#endif
  int maxchild;
  struct usb_device * children[USB_MAXCHILDREN];
  int pm_usage_cnt;
  u32 quirks;
  atomic_t urbnum;
  unsigned long active_duration;
#ifdef CONFIG_PM
  struct delayed_work autosuspend;
  struct work_struct autoresume;
  struct mutex pm_mutex;
  unsigned long last_busy;
  int autosuspend_delay;
  unsigned long connect_time;
  unsigned auto_pm:1;
  unsigned do_remote_wakeup:1;
  unsigned reset_resume:1;
  unsigned autosuspend_disabled:1;
  unsigned autoresume_disabled:1;
  unsigned skip_sys_resume:1;
#endif
  struct wusb_dev * wusb_dev;
  int slot_id;
};  </pre></div><div class="refsect1" title="Members"><a id="id2738631"></a><h2>Members</h2><div class="variablelist"><dl><dt><span class="term">devnum</span></dt><dd><p>
   device number; address on a USB bus
      </p></dd><dt><span class="term">devpath[16]</span></dt><dd><p>
   device ID string for use in messages (e.g., /port/...)
      </p></dd><dt><span class="term">route</span></dt><dd><p>
   tree topology hex string for use with xHCI
      </p></dd><dt><span class="term">state</span></dt><dd><p>
   device state: configured, not attached, etc.
      </p></dd><dt><span class="term">speed</span></dt><dd><p>
   device speed: high/full/low (or error)
      </p></dd><dt><span class="term">tt</span></dt><dd><p>
   Transaction Translator info; used with low/full speed dev, highspeed hub
      </p></dd><dt><span class="term">ttport</span></dt><dd><p>
   device port on that tt hub
      </p></dd><dt><span class="term">toggle[2]</span></dt><dd><p>
   one bit for each endpoint, with ([0] = IN, [1] = OUT) endpoints
      </p></dd><dt><span class="term">parent</span></dt><dd><p>
   our hub, unless we're the root
      </p></dd><dt><span class="term">bus</span></dt><dd><p>
   bus we're part of
      </p></dd><dt><span class="term">ep0</span></dt><dd><p>
   endpoint 0 data (default control pipe)
      </p></dd><dt><span class="term">dev</span></dt><dd><p>
   generic device interface
      </p></dd><dt><span class="term">descriptor</span></dt><dd><p>
   USB device descriptor
      </p></dd><dt><span class="term">config</span></dt><dd><p>
   all of the device's configs
      </p></dd><dt><span class="term">actconfig</span></dt><dd><p>
   the active configuration
      </p></dd><dt><span class="term">ep_in[16]</span></dt><dd><p>
   array of IN endpoints
      </p></dd><dt><span class="term">ep_out[16]</span></dt><dd><p>
   array of OUT endpoints
      </p></dd><dt><span class="term">rawdescriptors</span></dt><dd><p>
   raw descriptors for each config
      </p></dd><dt><span class="term">bus_mA</span></dt><dd><p>
   Current available from the bus
      </p></dd><dt><span class="term">portnum</span></dt><dd><p>
   parent port number (origin 1)
      </p></dd><dt><span class="term">level</span></dt><dd><p>
   number of USB hub ancestors
      </p></dd><dt><span class="term">can_submit</span></dt><dd><p>
   URBs may be submitted
      </p></dd><dt><span class="term">discon_suspended</span></dt><dd><p>
   disconnected while suspended
      </p></dd><dt><span class="term">persist_enabled</span></dt><dd><p>
   USB_PERSIST enabled for this device
      </p></dd><dt><span class="term">have_langid</span></dt><dd><p>
   whether string_langid is valid
      </p></dd><dt><span class="term">authorized</span></dt><dd><p>
   policy has said we can use it;
   (user space) policy determines if we authorize this device to be
   used or not. By default, wired USB devices are authorized.
   WUSB devices are not, until we authorize them from user space.
   FIXME -- complete doc
      </p></dd><dt><span class="term">authenticated</span></dt><dd><p>
   Crypto authentication passed
      </p></dd><dt><span class="term">wusb</span></dt><dd><p>
   device is Wireless USB
      </p></dd><dt><span class="term">string_langid</span></dt><dd><p>
   language ID for strings
      </p></dd><dt><span class="term">product</span></dt><dd><p>
   iProduct string, if present (static)
      </p></dd><dt><span class="term">manufacturer</span></dt><dd><p>
   iManufacturer string, if present (static)
      </p></dd><dt><span class="term">serial</span></dt><dd><p>
   iSerialNumber string, if present (static)
      </p></dd><dt><span class="term">filelist</span></dt><dd><p>
   usbfs files that are open to this device
      </p></dd><dt><span class="term">usb_classdev</span></dt><dd><p>
   USB class device that was created for usbfs device
   access from userspace
      </p></dd><dt><span class="term">usbfs_dentry</span></dt><dd><p>
   usbfs dentry entry for the device
      </p></dd><dt><span class="term">maxchild</span></dt><dd><p>
   number of ports if hub
      </p></dd><dt><span class="term">children[USB_MAXCHILDREN]</span></dt><dd><p>
   child devices - USB devices that are attached to this hub
      </p></dd><dt><span class="term">pm_usage_cnt</span></dt><dd><p>
   usage counter for autosuspend
      </p></dd><dt><span class="term">quirks</span></dt><dd><p>
   quirks of the whole device
      </p></dd><dt><span class="term">urbnum</span></dt><dd><p>
   number of URBs submitted for the whole device
      </p></dd><dt><span class="term">active_duration</span></dt><dd><p>
   total time device is not suspended
      </p></dd><dt><span class="term">autosuspend</span></dt><dd><p>
   for delayed autosuspends
      </p></dd><dt><span class="term">autoresume</span></dt><dd><p>
   for autoresumes requested while in_interrupt
      </p></dd><dt><span class="term">pm_mutex</span></dt><dd><p>
   protects PM operations
      </p></dd><dt><span class="term">last_busy</span></dt><dd><p>
   time of last use
      </p></dd><dt><span class="term">autosuspend_delay</span></dt><dd><p>
   in jiffies
      </p></dd><dt><span class="term">connect_time</span></dt><dd><p>
   time device was first connected
      </p></dd><dt><span class="term">auto_pm</span></dt><dd><p>
   autosuspend/resume in progress
      </p></dd><dt><span class="term">do_remote_wakeup</span></dt><dd><p>
   remote wakeup should be enabled
      </p></dd><dt><span class="term">reset_resume</span></dt><dd><p>
   needs reset instead of resume
      </p></dd><dt><span class="term">autosuspend_disabled</span></dt><dd><p>
   autosuspend disabled by the user
      </p></dd><dt><span class="term">autoresume_disabled</span></dt><dd><p>
   autoresume disabled by the user
      </p></dd><dt><span class="term">skip_sys_resume</span></dt><dd><p>
   skip the next system resume
      </p></dd><dt><span class="term">wusb_dev</span></dt><dd><p>
   if this is a Wireless USB device, link to the WUSB
   specific data for the device.
      </p></dd><dt><span class="term">slot_id</span></dt><dd><p>
   Slot ID assigned by xHCI
      </p></dd></dl></div></div><div class="refsect1" title="Notes"><a id="id2739278"></a><h2>Notes</h2><p>
   Usbcore drivers should not set usbdev-&gt;state directly.  Instead use
   <code class="function">usb_set_device_state</code>.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re20.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch04.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="re22.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>struct usb_host_config</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span>usb_interface_claimed</span></td></tr></table></div></body></html>