[PATCH v5 1/3] dt-bindings: iio: adc: Fix channel property validation
Rob Herring (Arm)
robh at kernel.org
Wed Nov 18 08:31:53 PST 2026
On Tue, 17 Nov 2026 16:28:30 +0800, Chi-Wen Weng wrote:
> From: Chi-Wen Weng <cwweng at nuvoton.com>
>
> The common ADC channel binding currently uses an anyOf constraint
> to require the reg property and select between single-channel and
> diff-channels.
>
> However, the reg-only branch allows validation to succeed even when
> both single-channel and diff-channels are present, bypassing the
> intended mutual exclusion.
>
> Replace the anyOf constraint with an explicit reg requirement and
> a not constraint that rejects channels specifying both properties.
>
> This preserves support for reg-only, single-ended and differential
> channel descriptions while rejecting conflicting configurations.
>
> Fixes: dd471a2b7759 ("dt-bindings: iio: adc: Add single-channel property")
> Suggested-by: Rob Herring <robh at kernel.org>
> Signed-off-by: Chi-Wen Weng <cwweng at nuvoton.com>
> ---
> .../devicetree/bindings/iio/adc/adc.yaml | 17 +++++++----------
> 1 file changed, 7 insertions(+), 10 deletions(-)
>
Reviewed-by: Rob Herring (Arm) <robh at kernel.org>
More information about the linux-arm-kernel
mailing list