# Generic resistive touchscreen ADC

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Input bindings / touchscreen_

> Device-tree binding reference for Generic resistive touchscreen ADC.

<!-- SPDX-License-Identifier: (GPL-2.0 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;input&#47;touchscreen&#47;resistive&#45;adc&#45;touch&#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;Oleksij Rempel &#60;o&#46;rempel&#64;pengutronix&#46;de&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Generic ADC based resistive touchscreen controller
The device must be connected to an ADC device that provides channels for
position measurement and optional pressure.</p>
</div>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

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

### Rule 1

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-95c8874f25311f4b1ab1">[<code>touchscreen&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-input/touchscreen/touchscreen.md#dt-root>)</span>

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

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

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

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

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;resistive&#45;adc&#45;touch&#34;</code></span>

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

### <code>io&#45;channels</code> — required here

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

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

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

<a id="dt-17d53412d1fa1395a9a8"></a>

**Item 1**

> <div id="dt-abac078e3f886f38f23a">
> <p style="white-space: pre-wrap">x</p>
> </div>

<a id="dt-706340a02132e83106e4"></a>

**Item 2**

> <div id="dt-6a3df8da3f9b46911305">
> <p style="white-space: pre-wrap">y</p>
> </div>

<a id="dt-7e904efc18a1f7f429f1"></a>

**Item 3**

> <div id="dt-f2625c7126283f939f63">
> <p style="white-space: pre-wrap">pressure (optional)</p>
> </div>

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

**Item 4**

> <div id="dt-ad8393dcc295ea693d13">
> <p style="white-space: pre-wrap">z1 (optional)</p>
> </div>

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

**Item 5**

> <div id="dt-f1e39f52dfbab4ac8a90">
> <p style="white-space: pre-wrap">z2 (optional)</p>
> </div>

<a id="dt-52503acc5d03431d5405"></a>

### <code>io&#45;channel&#45;names</code> — required here

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

#### Exactly one of these rules must match (<code>oneOf</code>)

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

**Rule 1**

> <a id="dt-8f666d37dbaabad1cb0f"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-741bb8b195dd4fc519f0"></a>
>
> **Item 1**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-f1d87c51c849b6647cd3"></a> <span id="dt-3e4922f61637f1de179f"><code>&#34;x&#34;</code></span>, <span id="dt-54be6d63ec8c34164a72"><code>&#34;y&#34;</code></span>
>
> <a id="dt-373da88b14264f8a6c43"></a>
>
> **Item 2**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-2eef7faeb05d1896e312"></a> <span id="dt-e8f530e19bd4788c4d0e"><code>&#34;x&#34;</code></span>, <span id="dt-76f18b1590f9f251b605"><code>&#34;y&#34;</code></span>

<a id="dt-017dff3e63ddfedde178"></a>

**Rule 2**

> <a id="dt-6dd7423ccd1a3b3686d6"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-a01c882a419d743e3e44"></a>
>
> **Item 1**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-608892bb57b90090481a"></a> <span id="dt-856f452f6a57f789dd53"><code>&#34;x&#34;</code></span>, <span id="dt-a18578bf0172f9a876f1"><code>&#34;y&#34;</code></span>, <span id="dt-46d136b0d107f0354229"><code>&#34;pressure&#34;</code></span>
>
> <a id="dt-667336d8047ad1506af7"></a>
>
> **Item 2**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-2249946f86b514c829a5"></a> <span id="dt-e64dd8c3e007f766dbef"><code>&#34;x&#34;</code></span>, <span id="dt-044ab824fa8ae40c0dff"><code>&#34;y&#34;</code></span>, <span id="dt-f495458cd11e9859caf6"><code>&#34;pressure&#34;</code></span>
>
> <a id="dt-bdea2b63dccfee54ad16"></a>
>
> **Item 3**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-95f0c2b4cf7b2b104ba0"></a> <span id="dt-3ee3dd0dbdf8d02d523f"><code>&#34;x&#34;</code></span>, <span id="dt-c432b070f6f3c2766c99"><code>&#34;y&#34;</code></span>, <span id="dt-1399d05e1da45e3d0011"><code>&#34;pressure&#34;</code></span>

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

**Rule 3**

> <a id="dt-29e59f1e7e04a0965aaa"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-0569938d2fee25e2ce46"></a>
>
> **Item 1**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-54cd49c52836f13b3558"></a> <span id="dt-b25280bbd224e2b74650"><code>&#34;x&#34;</code></span>, <span id="dt-f0a38b5b3a5e62b9603a"><code>&#34;y&#34;</code></span>, <span id="dt-1891fbd7119d3da4aa4c"><code>&#34;z1&#34;</code></span>, <span id="dt-62357b50b637d597086e"><code>&#34;z2&#34;</code></span>
>
> <a id="dt-053f04b0e045fb87cce2"></a>
>
> **Item 2**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-ae74f4befc77ceea782b"></a> <span id="dt-2a4bc81974a324cde895"><code>&#34;x&#34;</code></span>, <span id="dt-f11cab2bc60be4a089c9"><code>&#34;y&#34;</code></span>, <span id="dt-adaba71831d4a83e7d71"><code>&#34;z1&#34;</code></span>, <span id="dt-0223ec0fccdb55f39072"><code>&#34;z2&#34;</code></span>
>
> <a id="dt-1a817e07a2289e06ae33"></a>
>
> **Item 3**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-dd1d84e227703e90a894"></a> <span id="dt-87da47958091da721417"><code>&#34;x&#34;</code></span>, <span id="dt-45b9450a7e70ff7cd65e"><code>&#34;y&#34;</code></span>, <span id="dt-e705150beb44a68573ba"><code>&#34;z1&#34;</code></span>, <span id="dt-03dd8eb00d3d87af1295"><code>&#34;z2&#34;</code></span>
>
> <a id="dt-025952fbb660dd2cc1c3"></a>
>
> **Item 4**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-87892937bb237025f4ae"></a> <span id="dt-eacf0b9ef17d8d228e48"><code>&#34;x&#34;</code></span>, <span id="dt-2e84fff470779e8d4bfb"><code>&#34;y&#34;</code></span>, <span id="dt-13d55f1fc2ef3759a67a"><code>&#34;z1&#34;</code></span>, <span id="dt-c1371f305a993b415322"><code>&#34;z2&#34;</code></span>

<a id="dt-06e7b7e67cc45250159c"></a>

### <code>touchscreen&#45;size&#45;x</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

<a id="dt-3f10372b5bc2c76c1acd"></a>

### <code>touchscreen&#45;size&#45;y</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

<a id="dt-600a22fdf5c84d68a4a4"></a>

### <code>touchscreen&#45;fuzz&#45;x</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

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

### <code>touchscreen&#45;fuzz&#45;y</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

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

### <code>touchscreen&#45;inverted&#45;x</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

<a id="dt-8193561d7be3f4eb58d8"></a>

### <code>touchscreen&#45;inverted&#45;y</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

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

### <code>touchscreen&#45;swapped&#45;x&#45;y</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

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

### <code>touchscreen&#45;min&#45;pressure</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

<a id="dt-6b940ebd437b87e711b7"></a>

### <code>touchscreen&#45;x&#45;plate&#45;ohms</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

<a id="dt-63ab525a9812ac23c446"></a>

## Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

**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;io&#45;channels&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;io&#45;channel&#45;names&#34;</code></span>

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">touchscreen {
  compatible = "resistive-adc-touch";
  io-channels = &lt;&amp;adc 24&gt;, &lt;&amp;adc 25&gt;;
  io-channel-names = "y", "x";
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">touchscreen {
  compatible = "resistive-adc-touch";
  touchscreen-min-pressure = &lt;50000&gt;;
  io-channels = &lt;&amp;adc 24&gt;, &lt;&amp;adc 25&gt;, &lt;&amp;adc 26&gt;;
  io-channel-names = "y", "pressure", "x";
};
</code></pre>

<pre id="dt-d0212a4cd671f89a0b40"><code class="language-dts">touchscreen {
  compatible = "resistive-adc-touch";
  touchscreen-min-pressure = &lt;50000&gt;;
  io-channels = &lt;&amp;adc 1&gt;, &lt;&amp;adc 2&gt;, &lt;&amp;adc 3&gt;, &lt;&amp;adc 4&gt;;
  io-channel-names = "x", "z1", "z2", "y";
  touchscreen-x-plate-ohms = &lt;800&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 OR BSD-2-Clause)</span></p>

</details>
