Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > cf93d8a8acdcc6fe2225039da0502495 > files > 991

kernel-doc-2.6.32-131.17.1.el6.centos.plus.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 spi_driver</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Linux Device Drivers" /><link rel="up" href="ch09.html" title="Chapter&#160;9.&#160;Serial Peripheral Interface (SPI)" /><link rel="prev" href="re735.html" title="struct spi_device" /><link rel="next" href="re737.html" title="spi_unregister_driver" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>struct spi_driver</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re735.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;9.&#160;Serial Peripheral Interface (SPI)</th><td width="20%" align="right">&#160;<a accesskey="n" href="re737.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="struct spi_driver"><a id="API-struct-spi-driver"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct spi_driver &#8212; 
     Host side <span class="quote">&#8220;<span class="quote">protocol</span>&#8221;</span> driver
 </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><pre class="programlisting">
struct spi_driver {
  const struct spi_device_id * id_table;
  int (* probe) (struct spi_device *spi);
  int (* remove) (struct spi_device *spi);
  void (* shutdown) (struct spi_device *spi);
  int (* suspend) (struct spi_device *spi, pm_message_t mesg);
  int (* resume) (struct spi_device *spi);
  struct device_driver driver;
};  </pre></div><div class="refsect1" title="Members"><a id="id3135432"></a><h2>Members</h2><div class="variablelist"><dl><dt><span class="term">id_table</span></dt><dd><p>
   List of SPI devices supported by this driver
      </p></dd><dt><span class="term">probe</span></dt><dd><p>
   Binds this driver to the spi device.  Drivers can verify
   that the device is actually present, and may need to configure
   characteristics (such as bits_per_word) which weren't needed for
   the initial configuration done during system setup.
      </p></dd><dt><span class="term">remove</span></dt><dd><p>
   Unbinds this driver from the spi device
      </p></dd><dt><span class="term">shutdown</span></dt><dd><p>
   Standard shutdown callback used during system state
   transitions such as powerdown/halt and kexec
      </p></dd><dt><span class="term">suspend</span></dt><dd><p>
   Standard suspend callback used during system state transitions
      </p></dd><dt><span class="term">resume</span></dt><dd><p>
   Standard resume callback used during system state transitions
      </p></dd><dt><span class="term">driver</span></dt><dd><p>
   SPI device drivers should initialize the name and owner
   field of this structure.
      </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id3135529"></a><h2>Description</h2><p>
   This represents the kind of device driver that uses SPI messages to
   interact with the hardware at the other end of a SPI link.  It's called
   a <span class="quote">&#8220;<span class="quote">protocol</span>&#8221;</span> driver because it works through messages rather than talking
   directly to SPI hardware (which is what the underlying SPI controller
   driver does to pass those messages).  These protocols are defined in the
   specification for the device(s) supported by the driver.
   </p><p>

   As a rule, those device protocols represent the lowest level interface
   supported by a driver, and it will support upper level interfaces too.
   Examples of such upper levels include frameworks like MTD, networking,
   MMC, RTC, filesystem character device nodes, and hardware monitoring.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re735.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch09.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="re737.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>struct spi_device</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>spi_unregister_driver</span></td></tr></table></div></body></html>