# Analog Devices LTC2947 high precision power and energy monitor

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Hwmon bindings_

> Device-tree binding reference for Analog Devices LTC2947 high precision power and energy monitor.

<!-- SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;hwmon&#47;adi&#44;ltc2947&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Nuno Sá &#60;nuno&#46;sa&#64;analog&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Analog Devices LTC2947 high precision power and energy monitor over SPI or I2C.</p>
<p style="white-space: pre-wrap">https://www.analog.com/media/en/technical-documentation/data-sheets/LTC2947.pdf</p>
</div>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — required here

**Allowed values (<code>enum</code>):** <a id="dt-207128c21dbd6355c894"></a> <span id="dt-bd234eb96375d77ca611"><code>&#34;adi&#44;ltc2947&#34;</code></span>

<a id="dt-9c1635fdb65d87e33d77"></a>

### <code>reg</code> — required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-71421d35675d9a533ad2"><code>1</code></span>

<a id="dt-4e9a371963ac013ad39d"></a>

### <code>clocks</code> — not listed as required here

<div id="dt-853257adf43f6880d753">
<p style="white-space: pre-wrap">The LTC2947 uses either a trimmed internal oscillator or an external clock as the time base for determining the integration period to represent time, charge and energy. When an external clock is used, this property must be set accordingly.</p>
</div>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-c7438d9082840936a9a7"><code>1</code></span>

<a id="dt-ad410164abfca8d10d32"></a>

### <code>adi&#44;accumulator&#45;ctl&#45;pol</code> — not listed as required here

<div id="dt-11fc8f142c662396be70">
<p style="white-space: pre-wrap">This property controls the polarity of current that is accumulated to calculate charge and energy so that, they can be only accumulated for positive current for example. Since there are two sets of registers for the accumulated values, this entry can also have two items which sets energy1/charge1 and energy2/charger2 respectively. Check table 12 of the datasheet for more information on the supported options.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-94dbfee253ee01384a6b">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-03a03f95a666fe4b033c>)</span>

**Minimum number of items (<code>minItems</code>):** <span id="dt-0ecad95cf28373d273dd"><code>2</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-79d0900da23fb8ad962c"><code>2</code></span>

<a id="dt-d3adff2902caef4cab26"></a>

#### Array item rules (<code>items</code>)

> **Allowed values (<code>enum</code>):** <a id="dt-60d79e418511213d24bd"></a> <span id="dt-7b6424f89d39c00d4aeb"><code>0</code></span>, <span id="dt-6654144a6adc0e4c9f89"><code>1</code></span>, <span id="dt-c07b9583234493bf69f4"><code>2</code></span>, <span id="dt-b98f1661190f71aa27ed"><code>3</code></span>
>
> **Default value (<code>default</code>):** <span id="dt-4e5e6f2635af790bcfee"><code>0</code></span>

<a id="dt-6381f1c2b1a0d45a8a3c"></a>

### <code>adi&#44;accumulation&#45;deadband&#45;microamp</code> — not listed as required here

<div id="dt-66262fca6c5ba8c60b6d">
<p style="white-space: pre-wrap">This property controls the Accumulation Dead band which allows to set the level of current below which no accumulation takes place.</p>
</div>

**Maximum value (<code>maximum</code>):** <span id="dt-351fac043f488437470e"><code>255</code></span>

**Default value (<code>default</code>):** <span id="dt-565177d6a8c3e55ffd17"><code>0</code></span>

<a id="dt-9156011706ebd75070a1"></a>

### <code>adi&#44;gpio&#45;out&#45;pol</code> — not listed as required here

<div id="dt-008406aec905ae379247">
<p style="white-space: pre-wrap">This property controls the GPIO polarity. Setting it to one makes the GPIO active high, setting it to zero makets it active low. When this property is present, the GPIO is automatically configured as output and set to control a fan as a function of measured temperature.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-ecc9cda105e35b4d3b4f">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

**Allowed values (<code>enum</code>):** <a id="dt-dbc30042f331ca0fd0e0"></a> <span id="dt-1f634a64fdbd1292244a"><code>0</code></span>, <span id="dt-e60b93b81d08ad75e4bc"><code>1</code></span>

**Default value (<code>default</code>):** <span id="dt-fb2a224a32e73d2485b0"><code>0</code></span>

<a id="dt-9c9b14562d0279ba8896"></a>

### <code>adi&#44;gpio&#45;in&#45;accum</code> — not listed as required here

<div id="dt-32e110214c11214f2a5a">
<p style="white-space: pre-wrap">When set, this property sets the GPIO as input. It is then used to control the accumulation of charge, energy and time. This function can be enabled/configured separately for each of the two sets of accumulation registers. Check table 13 of the datasheet for more information on the supported options. This property cannot be used together with adi,gpio-out-pol.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-dae63c6e19debf0cbd18">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-03a03f95a666fe4b033c>)</span>

**Minimum number of items (<code>minItems</code>):** <span id="dt-a51a16d3ce36a51698b7"><code>2</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-d0af4cabe7c086b5bfb8"><code>2</code></span>

<a id="dt-c6ebadf6fcb24248cf1b"></a>

#### Array item rules (<code>items</code>)

> **Allowed values (<code>enum</code>):** <a id="dt-2bdcaedb80a2666a4d06"></a> <span id="dt-60b9f323827b11d64df7"><code>0</code></span>, <span id="dt-4613ab0540b18861532c"><code>1</code></span>, <span id="dt-f89c593f83213bc37374"><code>2</code></span>
>
> **Default value (<code>default</code>):** <span id="dt-aa4031c47709bfb3d5cd"><code>0</code></span>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;reg&#34;</code></span>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">spi {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    ltc2947_spi: ltc2947@0 {
        compatible = "adi,ltc2947";
        reg = &lt;0&gt;;
        /* accumulation takes place always for energ1/charge1. */
        /* accumulation only on positive current for energy2/charge2. */
        adi,accumulator-ctl-pol = &lt;0 1&gt;;
    };
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)</span></p>

</details>
