Commit 71d576d3 authored by Oleksij Rempel's avatar Oleksij Rempel Committed by Dmitry Torokhov

dt-bindings: touchscreen: Convert resistive-adc-touch binding to json schema

Convert the resistive-adc-touch binding to DT schema format using json-schema.
Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20210525054634.9134-2-o.rempel@pengutronix.deSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent cbb24523
Generic resistive touchscreen ADC
Required properties:
- compatible: must be "resistive-adc-touch"
The device must be connected to an ADC device that provides channels for
position measurement and optional pressure.
Refer to
https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml
for details
- iio-channels: must have at least two channels connected to an ADC device.
These should correspond to the channels exposed by the ADC device and should
have the right index as the ADC device registers them. These channels
represent the relative position on the "x" and "y" axes.
- iio-channel-names: must have all the channels' names. Mandatory channels
are "x" and "y".
Optional properties:
- iio-channels: The third channel named "pressure" is optional and can be
used if the ADC device also measures pressure besides position.
If this channel is missing, pressure will be ignored and the touchscreen
will only report position.
- iio-channel-names: optional channel named "pressure".
Example:
resistive_touch: resistive_touch {
compatible = "resistive-adc-touch";
touchscreen-min-pressure = <50000>;
io-channels = <&adc 24>, <&adc 25>, <&adc 26>;
io-channel-names = "x", "y", "pressure";
};
# 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)
io-channel-names:
oneOf:
- items:
- enum: [x, y]
- enum: [x, y]
- items:
- enum: [x, y, pressure]
- enum: [x, y, pressure]
- enum: [x, y, pressure]
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
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";
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment