summaryrefslogtreecommitdiff
path: root/static/freebsd/man4/pcf8591.4 4.html
blob: 4f76bd2815a45d5b95ab6ba5d8aa82828df1efae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<table class="head">
  <tr>
    <td class="head-ltitle">PCF8591(4)</td>
    <td class="head-vol">Device Drivers Manual</td>
    <td class="head-rtitle">PCF8591(4)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">pcf8591</code> &#x2014; <span class="Nd">driver
    for the PCF8591 8-bit A/D and D/A converter</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp">To compile this driver into the kernel, place the following lines
    in your kernel configuration file:</p>
<div class="Bd Pp Bd-indent"><code class="Cd">device pcf8591</code>
<br/>
<code class="Cd">device iicbus</code></div>
<p class="Pp">Alternatively, to load the driver as a module at boot time, place
    the following line in <a class="Xr">loader.conf(5)</a>:</p>
<div class="Bd Pp Bd-indent Li">
<pre>pcf8591_load=&quot;YES&quot;</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="Nm">pcf8591</code> driver supports reading four
    inputs and setting one output over I2C. The hardware supports configuring
    the input lines as:</p>
<ul class="Bl-bullet">
  <li>four single-ended inputs</li>
  <li>three differential inputs (one input line is shared between all three
      inputs)</li>
  <li>two single-ended inputs and one differential input</li>
  <li>two differential inputs.</li>
</ul>
<p class="Pp">The <code class="Nm">pcf8591</code> driver reports data via
    <a class="Xr">sysctl(8)</a> entries in the device's node in the
    <a class="Xr">sysctl(8)</a> tree:</p>
<dl class="Bl-tag">
  <dt id="inputs._d"><var class="Va">inputs.%d</var></dt>
  <dd>The input level of the corresponding input in steps between 0 and 255.
      Absolute voltage depends on an actual reference voltage.</dd>
</dl>
<p class="Pp">On an <a class="Xr">FDT(4)</a> based system the following
    properties must be set:</p>
<dl class="Bl-tag">
  <dt id="compatible"><var class="Va">compatible</var></dt>
  <dd>Must be set to &quot;nxp,pcf8591&quot;.</dd>
  <dt id="reg"><var class="Va">reg</var></dt>
  <dd>The I2C address of <code class="Nm">pcf8591</code>. It should be in the
      range from 0x40 to 0x4f (7-bit).</dd>
</dl>
<p class="Pp">The DTS part for a <code class="Nm">pcf8591</code> device usually
    looks like:</p>
<div class="Bd Pp Li">
<pre>/ {

	...
	pcf8591adc {
		compatible = &quot;nxp,pcf8591&quot;;
		reg = &lt;0x48&gt;;
	};
};</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<p class="Pp"><a class="Xr">fdt(4)</a>, <a class="Xr">iicbus(4)</a>,
    <a class="Xr">sysctl(8)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">pcf8591</code> driver and this manual page
    was written by <span class="An">Andriy Gapon</span>
    &lt;<a class="Mt" href="mailto:avg@FreeBSD.org">avg@FreeBSD.org</a>&gt;.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
<p class="Pp">The <code class="Nm">pcf8591</code> driver does not support
    changing the input configuration. All input lines are configured as
    single-ended inputs.</p>
<p class="Pp">The <code class="Nm">pcf8591</code> driver does not support
    setting the output. It is always disabled (tri-state).</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">November 6, 2021</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>