* [PATCH] dt-bindings: iio: adc: adi,ad7606: fix dt_schema validation warning
@ 2025-05-23 14:24 Angelo Dureghello
2025-05-23 15:57 ` David Lechner
0 siblings, 1 reply; 2+ messages in thread
From: Angelo Dureghello @ 2025-05-23 14:24 UTC (permalink / raw)
To: Nuno Sa, Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
David Lechner, Andy Shevchenko, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-iio, linux-kernel, Jonathan Cameron, Michael Hennerich,
devicetree, Angelo Dureghello
From: Angelo Dureghello <adureghello@baylibre.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@baylibre.com>
---
Fix dt_schema validation warning.
Link: https://lore.kernel.org/linux-iio/20250408-wip-bl-ad3552r-fixes-v4-0-b33c0264bd78@baylibre.com
---
Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
index 29f12d650442b8ff2eb455306ce59a0e87867ddd..ddb8266d18312031c6b957bcb435b651a128f711 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
@@ -228,6 +228,8 @@ allOf:
- interrupts
- required:
- io-backends
+ - required:
+ - "#trigger-source-cells"
- if:
properties:
---
base-commit: 3964c6e5877f054497ffccc7d00f8f7add307d0d
change-id: 20250523-wip-bl-ad7606-dtschema-fixes-5e6ab342e043
Best regards,
--
Angelo Dureghello <adureghello@baylibre.com>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] dt-bindings: iio: adc: adi,ad7606: fix dt_schema validation warning
2025-05-23 14:24 [PATCH] dt-bindings: iio: adc: adi,ad7606: fix dt_schema validation warning Angelo Dureghello
@ 2025-05-23 15:57 ` David Lechner
0 siblings, 0 replies; 2+ messages in thread
From: David Lechner @ 2025-05-23 15:57 UTC (permalink / raw)
To: Angelo Dureghello, Nuno Sa, Lars-Peter Clausen,
Michael Hennerich, Jonathan Cameron, Andy Shevchenko,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-iio, linux-kernel, Jonathan Cameron, devicetree
On 5/23/25 9:24 AM, Angelo Dureghello wrote:
> From: Angelo Dureghello <adureghello@baylibre.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@baylibre.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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-23 15:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-23 14:24 [PATCH] dt-bindings: iio: adc: adi,ad7606: fix dt_schema validation warning Angelo Dureghello
2025-05-23 15:57 ` David Lechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®