<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>AD7944 driver — The Linux Kernel documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=3918102e" />
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=9bcbadda"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="ADE9000 driver" href="ade9000.html" />
<link rel="prev" title="AD7625 driver" href="ad7625.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
</head><body>
<div class="document">
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/logo.svg" alt="Logo of The Linux Kernel"/>
</a></p>
<h1 class="logo"><a href="../index.html">The Linux Kernel</a></h1>
<p class="blurb">6.18.50</p>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
<p>
<h3 class="kernel-toc-contents">Contents</h3>
<input type="checkbox" class="kernel-toc-toggle" id = "kernel-toc-toggle" checked>
<label class="kernel-toc-title" for="kernel-toc-toggle"></label>
<div class="kerneltoc" id="kerneltoc">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../process/development-process.html">Development process</a></li>
<li class="toctree-l1"><a class="reference internal" href="../process/submitting-patches.html">Submitting patches</a></li>
<li class="toctree-l1"><a class="reference internal" href="../process/code-of-conduct.html">Code of conduct</a></li>
<li class="toctree-l1"><a class="reference internal" href="../maintainer/index.html">Maintainer handbook</a></li>
<li class="toctree-l1"><a class="reference internal" href="../process/index.html">All development-process docs</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../core-api/index.html">Core API</a></li>
<li class="toctree-l1"><a class="reference internal" href="../driver-api/index.html">Driver APIs</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../subsystem-apis.html">Subsystems</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#core-subsystems">Core subsystems</a></li>
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#human-interfaces">Human interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#networking-interfaces">Networking interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#storage-interfaces">Storage interfaces</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../subsystem-apis.html#other-subsystems">Other subsystems</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../accounting/index.html">Accounting</a></li>
<li class="toctree-l3"><a class="reference internal" href="../cpu-freq/index.html">CPUFreq - CPU frequency and voltage scaling code in the Linux(TM) kernel</a></li>
<li class="toctree-l3"><a class="reference internal" href="../edac/index.html">EDAC Subsystem</a></li>
<li class="toctree-l3"><a class="reference internal" href="../fpga/index.html">FPGA</a></li>
<li class="toctree-l3"><a class="reference internal" href="../i2c/index.html">I2C/SMBus Subsystem</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="index.html">Industrial I/O</a></li>
<li class="toctree-l3"><a class="reference internal" href="../pcmcia/index.html">PCMCIA</a></li>
<li class="toctree-l3"><a class="reference internal" href="../spi/index.html">Serial Peripheral Interface (SPI)</a></li>
<li class="toctree-l3"><a class="reference internal" href="../w1/index.html">1-Wire Subsystem</a></li>
<li class="toctree-l3"><a class="reference internal" href="../watchdog/index.html">Watchdog Support</a></li>
<li class="toctree-l3"><a class="reference internal" href="../virt/index.html">Virtualization Support</a></li>
<li class="toctree-l3"><a class="reference internal" href="../hwmon/index.html">Hardware Monitoring</a></li>
<li class="toctree-l3"><a class="reference internal" href="../accel/index.html">Compute Accelerators</a></li>
<li class="toctree-l3"><a class="reference internal" href="../security/index.html">Security Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../crypto/index.html">Crypto API</a></li>
<li class="toctree-l3"><a class="reference internal" href="../bpf/index.html">BPF Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../usb/index.html">USB support</a></li>
<li class="toctree-l3"><a class="reference internal" href="../PCI/index.html">PCI Bus Subsystem</a></li>
<li class="toctree-l3"><a class="reference internal" href="../misc-devices/index.html">Assorted Miscellaneous Devices Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../peci/index.html">PECI Subsystem</a></li>
<li class="toctree-l3"><a class="reference internal" href="../wmi/index.html">WMI Subsystem</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tee/index.html">TEE Subsystem</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../locking/index.html">Locking</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../process/license-rules.html">Licensing rules</a></li>
<li class="toctree-l1"><a class="reference internal" href="../doc-guide/index.html">Writing documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev-tools/index.html">Development tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev-tools/testing-overview.html">Testing guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../kernel-hacking/index.html">Hacking guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../trace/index.html">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../fault-injection/index.html">Fault injection</a></li>
<li class="toctree-l1"><a class="reference internal" href="../livepatch/index.html">Livepatching</a></li>
<li class="toctree-l1"><a class="reference internal" href="../rust/index.html">Rust</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../admin-guide/index.html">Administration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../kbuild/index.html">Build system</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin-guide/reporting-issues.html">Reporting issues</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tools/index.html">Userspace tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../userspace-api/index.html">Userspace API</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../firmware-guide/index.html">Firmware</a></li>
<li class="toctree-l1"><a class="reference internal" href="../devicetree/index.html">Firmware and Devicetree</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../arch/index.html">CPU architectures</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../staging/index.html">Unsorted documentation</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../translations/index.html">Translations</a></li>
</ul>
</div>
<script type="text/javascript"> <!--
var sbar = document.getElementsByClassName("sphinxsidebar")[0];
let currents = document.getElementsByClassName("current")
if (currents.length) {
sbar.scrollTop = currents[currents.length - 1].offsetTop;
}
--> </script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/iio/ad7944.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="ad7944-driver">
<h1>AD7944 driver<a class="headerlink" href="#ad7944-driver" title="Link to this heading">¶</a></h1>
<p>ADC driver for Analog Devices Inc. AD7944 and similar devices. The module name
is <code class="docutils literal notranslate"><span class="pre">ad7944</span></code>.</p>
<section id="supported-devices">
<h2>Supported devices<a class="headerlink" href="#supported-devices" title="Link to this heading">¶</a></h2>
<p>The following chips are supported by this driver:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.analog.com/AD7944">AD7944</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/AD7985">AD7985</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/AD7986">AD7986</a></p></li>
</ul>
</section>
<section id="supported-features">
<h2>Supported features<a class="headerlink" href="#supported-features" title="Link to this heading">¶</a></h2>
<section id="spi-wiring-modes">
<h3>SPI wiring modes<a class="headerlink" href="#spi-wiring-modes" title="Link to this heading">¶</a></h3>
<p>The driver currently supports three of the many possible SPI wiring configurations.</p>
<section id="cs-mode-3-wire-without-busy-indicator">
<h4>CS mode, 3-wire, without busy indicator<a class="headerlink" href="#cs-mode-3-wire-without-busy-indicator" title="Link to this heading">¶</a></h4>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> +-------------+
+--------------------| CS |
v | |
VIO +--------------------+ | HOST |
| | CNV | | |
+--->| SDI AD7944 SDO |-------->| SDI |
| SCK | | |
+--------------------+ | |
^ | |
+--------------------| SCLK |
+-------------+
</pre></div>
</div>
<p>To select this mode in the device tree, set the <code class="docutils literal notranslate"><span class="pre">adi,spi-mode</span></code> property to
<code class="docutils literal notranslate"><span class="pre">"single"</span></code> and omit the <code class="docutils literal notranslate"><span class="pre">cnv-gpios</span></code> property.</p>
<p>This is the only wiring configuration supported when using <a class="reference internal" href="#spi-offload-support">SPI offload support</a>.</p>
</section>
<section id="cs-mode-4-wire-without-busy-indicator">
<h4>CS mode, 4-wire, without busy indicator<a class="headerlink" href="#cs-mode-4-wire-without-busy-indicator" title="Link to this heading">¶</a></h4>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> +-------------+
+-----------------------------------| CS |
| | |
| +--------------------| GPIO |
| v | |
| +--------------------+ | HOST |
| | CNV | | |
+--->| SDI AD7944 SDO |-------->| SDI |
| SCK | | |
+--------------------+ | |
^ | |
+--------------------| SCLK |
+-------------+
</pre></div>
</div>
<p>To select this mode in the device tree, omit the <code class="docutils literal notranslate"><span class="pre">adi,spi-mode</span></code> property and
provide the <code class="docutils literal notranslate"><span class="pre">cnv-gpios</span></code> property.</p>
</section>
<section id="chain-mode-without-busy-indicator">
<h4>Chain mode, without busy indicator<a class="headerlink" href="#chain-mode-without-busy-indicator" title="Link to this heading">¶</a></h4>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> +-------------+
+-------------------------+--------------------| CS |
v v | |
+--------------------+ +--------------------+ | HOST |
| CNV | | CNV | | |
+--->| SDI AD7944 SDO |--->| SDI AD7944 SDO |-------->| SDI |
| | SCK | | SCK | | |
GND +--------------------+ +--------------------+ | |
^ ^ | |
+-------------------------+--------------------| SCLK |
+-------------+
</pre></div>
</div>
<p>To select this mode in the device tree, set the <code class="docutils literal notranslate"><span class="pre">adi,spi-mode</span></code> property to
<code class="docutils literal notranslate"><span class="pre">"chain"</span></code>, add the <code class="docutils literal notranslate"><span class="pre">spi-cs-high</span></code> flag, add the <code class="docutils literal notranslate"><span class="pre">#daisy-chained-devices</span></code>
property, and omit the <code class="docutils literal notranslate"><span class="pre">cnv-gpios</span></code> property.</p>
</section>
</section>
<section id="reference-voltage">
<h3>Reference voltage<a class="headerlink" href="#reference-voltage" title="Link to this heading">¶</a></h3>
<p>All 3 possible reference voltage sources are supported:</p>
<ul class="simple">
<li><p>Internal reference</p></li>
<li><p>External 1.2V reference and internal buffer</p></li>
<li><p>External reference</p></li>
</ul>
<p>The source is determined by the device tree. If <code class="docutils literal notranslate"><span class="pre">ref-supply</span></code> is present, then
the external reference is used. If <code class="docutils literal notranslate"><span class="pre">refin-supply</span></code> is present, then the internal
buffer is used. If neither is present, then the internal reference is used.</p>
</section>
<section id="unimplemented-features">
<h3>Unimplemented features<a class="headerlink" href="#unimplemented-features" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">BUSY</span></code> indication</p></li>
</ul>
</section>
</section>
<section id="device-attributes">
<h2>Device attributes<a class="headerlink" href="#device-attributes" title="Link to this heading">¶</a></h2>
<p>There are two types of ADCs in this family, pseudo-differential and fully
differential. The channel name is different depending on the type of ADC.</p>
<section id="pseudo-differential-adcs">
<h3>Pseudo-differential ADCs<a class="headerlink" href="#pseudo-differential-adcs" title="Link to this heading">¶</a></h3>
<p>AD7944 and AD7985 are pseudo-differential ADCs and have the following attributes:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">in_voltage0_raw</span></code></p></td>
<td><p>Raw ADC voltage value (<em>IN+</em> referenced to ground sense).</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">in_voltage0_scale</span></code></p></td>
<td><p>Scale factor to convert raw value to mV.</p></td>
</tr>
</tbody>
</table>
<p>In “chain” mode, additional chips will appear as additional voltage input
channels, e.g. <code class="docutils literal notranslate"><span class="pre">in_voltage1_raw</span></code>.</p>
</section>
<section id="fully-differential-adcs">
<h3>Fully-differential ADCs<a class="headerlink" href="#fully-differential-adcs" title="Link to this heading">¶</a></h3>
<p>AD7986 is a fully-differential ADC and has the following attributes:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">in_voltage0-voltage1_raw</span></code></p></td>
<td><p>Raw ADC voltage value (<em>IN+</em> - <em>IN-</em>).</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">in_voltage0-voltage1_scale</span></code></p></td>
<td><p>Scale factor to convert raw value to mV.</p></td>
</tr>
</tbody>
</table>
<p>In “chain” mode, additional chips will appear as additional voltage input
channels, e.g. <code class="docutils literal notranslate"><span class="pre">in_voltage2-voltage3_raw</span></code>.</p>
</section>
</section>
<section id="spi-offload-support">
<h2>SPI offload support<a class="headerlink" href="#spi-offload-support" title="Link to this heading">¶</a></h2>
<p>To be able to achieve the maximum sample rate, the driver can be used with the
<a class="reference external" href="http://analogdevicesinc.github.io/hdl/projects/pulsar_adc/index.html">AXI SPI Engine</a> to provide SPI offload support.</p>
<p>When SPI offload is being used, some attributes will be different.</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">trigger</span></code> directory is removed.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">in_voltage0_sampling_frequency</span></code> attribute is added for setting the sample
rate.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">in_voltage0_sampling_frequency_available</span></code> attribute is added for querying
the max sample rate.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">timestamp</span></code> channel is removed.</p></li>
<li><p>Buffer data format may be different compared to when offload is not used,
e.g. the <code class="docutils literal notranslate"><span class="pre">in_voltage0_type</span></code> attribute.</p></li>
</ul>
<p>If the <code class="docutils literal notranslate"><span class="pre">turbo-gpios</span></code> property is present in the device tree, the driver will
turn on TURBO during buffered reads and turn it off otherwise.</p>
</section>
<section id="device-buffers">
<h2>Device buffers<a class="headerlink" href="#device-buffers" title="Link to this heading">¶</a></h2>
<p>This driver supports IIO triggered buffers.</p>
<p>See <a class="reference internal" href="iio_devbuf.html"><span class="doc">Industrial IIO device buffers</span></a> for more information.</p>
</section>
</section>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©The kernel development community.
|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.1.3</a>
& <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
|
<a href="../_sources/iio/ad7944.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>