[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bcf45254-6c02-471e-86a6-66599a77c999@baylibre.com>
Date: Fri, 23 May 2025 10:57:02 -0500
From: David Lechner <dlechner@...libre.com>
To: Angelo Dureghello <adureghello@...libre.com>, Nuno Sa
<nuno.sa@...log.com>, Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>, Andy Shevchenko <andy@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
Jonathan Cameron <Jonathan.Cameron@...wei.com>, devicetree@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: iio: adc: adi,ad7606: fix dt_schema
validation warning
On 5/23/25 9:24 AM, Angelo Dureghello wrote:
> From: Angelo Dureghello <adureghello@...libre.com>
>
> Fix following dt_schema warning when offload is used:
>
> DTC [C] arch/arm/boot/dts/xilinx/zynq-zed-adv7511-ad7606.dtb
> /home/angelo/dev-baylibre/linux-iio/arch/arm/boot/dts/xilinx/zynq-zed-adv7511-ad7606.dtb: adc@0: 'oneOf' conditional failed, one must be fixed:
> 'interrupts' is a required property
> 'io-backends' is a required property
> from schema $id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml#
>
> Offload is a third option, so none of the above is needed. Used
> "#trigger-source-cells" to identify offload usage.
>
> Fixes: ccf8c3f106a2 ("dt-bindings: iio: adc: adi,ad7606: add SPI offload properties")
> Signed-off-by: Angelo Dureghello <adureghello@...libre.com>
> ---
> Fix dt_schema validation warning.
>
> Link: https://lore.kernel.org/linux-iio/20250408-wip-bl-ad3552r-fixes-v4-0-b33c0264bd78@baylibre.com
> ---
I think this is too restrictive. Generally speaking, a trigger could be
connected to trigger something other than a SPI offload. So we wouldn't
want to exclude that possibility as this change would.
The existing binding has the same issue for interrupts. There isn't any
reason that we couldn't have interrupts wired up at the same time we
are using io-backends or SPI offload.
So I think we should just drop this whole oneOf: and let all of these
properties just be optional.
It smells to me like the original binding was written based on what the
driver supports rather than how things could actually be wired up.
Powered by blists - more mailing lists