On Thu, Jun 20, 2024 at 10:03:44AM +0200, Olivier MOYSAN wrote:
On 6/18/24 20:10, Conor Dooley wrote:
On Tue, Jun 18, 2024 at 06:08:30PM +0200, Olivier Moysan wrote:
allOf: - if: properties:
@@ -199,9 +264,19 @@ patternProperties: description: From common IIO binding. Used to pipe external sigma delta modulator or internal ADC output to DFSDM channel.
deprecated: true
required:
- io-channels
if:
required:
- st,adc-channels
then:
required:
- io-channels
patternProperties:
"^channel@([0-9]|1[0-9])$":
required:
- io-backends
Why is this here, rather than with reg above? Only some channels require a backend?
The io-backends property is required only when we use st,stm32-dfsdm-adc compatible. In other words, when we are in an analog use case. In this case the channel is a consumer of a backend (typically a sd modulator) In an audio use case (compatible st,stm32-dfsdm-dmic) the backend is not required.
Ahh, I think the hunks and indent confused me here. What you're doing is making io-backends required based on the compatible, but what I thought you were doing was trying to make io-backends required in channels if st,adc-channels was set.
Thanks for the explanation, Conor.