Documentation / devicetree / bindings / input / touchscreen / resistive-adc-touch.yaml


Based on kernel version 6.11. Page generated on 2024-09-24 08:21 EST.

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
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/resistive-adc-touch.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Generic resistive touchscreen ADC

maintainers:
  - Oleksij Rempel <o.rempel@pengutronix.de>

description: |
  Generic ADC based resistive touchscreen controller
  The device must be connected to an ADC device that provides channels for
  position measurement and optional pressure.

allOf:
  - $ref: touchscreen.yaml#

properties:
  compatible:
    const: resistive-adc-touch

  io-channels:
    minItems: 2
    items:
      - description: x
      - description: y
      - description: pressure (optional)
      - description: z1 (optional)
      - description: z2 (optional)

  io-channel-names:
    oneOf:
      - items:
          - enum: [x, y]
          - enum: [x, y]
      - items:
          - enum: [x, y, pressure]
          - enum: [x, y, pressure]
          - enum: [x, y, pressure]
      - items:
          - enum: [x, y, z1, z2]
          - enum: [x, y, z1, z2]
          - enum: [x, y, z1, z2]
          - enum: [x, y, z1, z2]

  touchscreen-size-x: true
  touchscreen-size-y: true
  touchscreen-fuzz-x: true
  touchscreen-fuzz-y: true
  touchscreen-inverted-x: true
  touchscreen-inverted-y: true
  touchscreen-swapped-x-y: true
  touchscreen-min-pressure: true
  touchscreen-x-plate-ohms: true

additionalProperties: false

required:
  - compatible
  - io-channels
  - io-channel-names

examples:
  - |
    touchscreen {
      compatible = "resistive-adc-touch";
      io-channels = <&adc 24>, <&adc 25>;
      io-channel-names = "y", "x";
    };
  - |
    touchscreen {
      compatible = "resistive-adc-touch";
      touchscreen-min-pressure = <50000>;
      io-channels = <&adc 24>, <&adc 25>, <&adc 26>;
      io-channel-names = "y", "pressure", "x";
    };
  - |
    touchscreen {
      compatible = "resistive-adc-touch";
      touchscreen-min-pressure = <50000>;
      io-channels = <&adc 1>, <&adc 2>, <&adc 3>, <&adc 4>;
      io-channel-names = "x", "z1", "z2", "y";
      touchscreen-x-plate-ohms = <800>;
    };