Commit dd471a2b authored by Alisa-Dariana Roman's avatar Alisa-Dariana Roman Committed by Jonathan Cameron

dt-bindings: iio: adc: Add single-channel property

Devices that have both single-ended channels and differential channels
cause a bit of confusion when the channels are configured in the
devicetree.

Clarify difference between these two types of channels for such devices
by adding single-channel property alongside diff-channels. They should
be mutually exclusive.

Devices that have only single-ended channels can still use reg property
to reference a channel like before.
Suggested-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarAlisa-Dariana Roman <alisa.roman@analog.com>
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240514120222.56488-5-alisa.roman@analog.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 2b12a52b
...@@ -38,6 +38,14 @@ properties: ...@@ -38,6 +38,14 @@ properties:
The first value specifies the positive input pin, the second The first value specifies the positive input pin, the second
specifies the negative input pin. specifies the negative input pin.
single-channel:
$ref: /schemas/types.yaml#/definitions/uint32
description:
When devices combine single-ended and differential channels, allow the
channel for a single element to be specified, independent of reg (as for
differential channels). If this and diff-channels are not present reg
shall be used instead.
settling-time-us: settling-time-us:
description: description:
Time between enabling the channel and first stable readings. Time between enabling the channel and first stable readings.
...@@ -50,4 +58,15 @@ properties: ...@@ -50,4 +58,15 @@ properties:
device design and can interact with other characteristics such as device design and can interact with other characteristics such as
settling time. settling time.
anyOf:
- oneOf:
- required:
- reg
- diff-channels
- required:
- reg
- single-channel
- required:
- reg
additionalProperties: true additionalProperties: true
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