Re: [PATCH v5 1/3] dt-bindings: iio: adc: Fix channel property validation
From: Rob Herring (Arm)
Date: Wed Nov 18 2026 - 11:33:36 EST
On Tue, 17 Nov 2026 16:28:30 +0800, Chi-Wen Weng wrote:
> From: Chi-Wen Weng <cwweng@xxxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> Signed-off-by: Chi-Wen Weng <cwweng@xxxxxxxxxxx>
> ---
> .../devicetree/bindings/iio/adc/adc.yaml | 17 +++++++----------
> 1 file changed, 7 insertions(+), 10 deletions(-)
>
Reviewed-by: Rob Herring (Arm) <robh@xxxxxxxxxx>