ASoC: dt-bindings: davinci-mcasp: Fix interrupts property
Subsystems (4)
PATCH 1/1 ASoC: dt-bindings: davinci-mcasp: Fix interrupts property
My understanding of the interrupts property is that it can either be:
1/ - TX
2/ - TX
- RX
3/ - Common/combined.
There are very little chances that either:
- TX
- Common/combined
or even
- TX
- RX
- Common/combined
could be a thing.
Looking at the interrupt-names definition (which uses oneOf instead of anyOf), it makes indeed little sense to use anyOf in the interrupts definition. I believe this is just a mistake, hence let's fix it.
---
--- .../devicetree/bindings/sound/davinci-mcasp-audio.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml +1 -1
@@ -102,7 +102,7 @@ properties: default: 2 interrupts: - anyOf: + oneOf: - minItems: 1 items: - description: TX interrupt
Signature · 1 line
2.43.0
Quoted 31 lines · Miquel Raynal
My understanding of the interrupts property is that it can either be:
1/ - TX
2/ - TX
- RX
3/ - Common/combined.There are very little chances that either:
- TX
- Common/combined
or even
- TX
- RX
- Common/combined
could be a thing.Looking at the interrupt-names definition (which uses oneOf instead of anyOf), it makes indeed little sense to use anyOf in the interrupts definition. I believe this is just a mistake, hence let's fix it.
Fixes 8be90641a0bb ("ASoC: dt-bindings: davinci-mcasp: convert McASP bindings to yaml schema")Signed-off-by Miquel Raynal <[email protected]>---
--- .../devicetree/bindings/sound/davinci-mcasp-audio.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml +0
-0
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml properties: · line 105
Quoted 5 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml +1
-1@@ -102,7 +102,7 @@ properties: default: 2 interrupts: - anyOf: + oneOf:
You need to change interrupt-names as well.
Best regards,
Krzysztof
Hi Krzysztof,
[email protected] wrote on Wed, 2 Oct 2024 08:34:44 +0200:
Quoted 34 lines · Miquel Raynal
Quoted 33 lines
My understanding of the interrupts property is that it can either be:
1/ - TX
2/ - TX
- RX
3/ - Common/combined.There are very little chances that either:
- TX
- Common/combined
or even
- TX
- RX
- Common/combined
could be a thing.Looking at the interrupt-names definition (which uses oneOf instead of anyOf), it makes indeed little sense to use anyOf in the interrupts definition. I believe this is just a mistake, hence let's fix it.
Fixes 8be90641a0bb ("ASoC: dt-bindings: davinci-mcasp: convert McASP bindings to yaml schema")Signed-off-by Miquel Raynal <[email protected]>---
--- .../devicetree/bindings/sound/davinci-mcasp-audio.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml +0
-0@@ -102,7 +102,7 @@ properties: default: 2
Quoted 6 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml properties: · line 105
Quoted 3 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml +1
-1interrupts: - anyOf: + oneOf:You need to change interrupt-names as well.
interrupt-names is already using 'oneOf'!
The extended diff looks like that:
interrupts:
- anyOf:
+ oneOf:
- minItems: 1
items:
- description: TX interrupt
- description: RX interrupt
- items:
- description: common/combined interrupt
interrupt-names:
oneOf:
- minItems: 1
items:
- const: tx
- const: rx
- const: common
Thanks,
Miquèl
Krzysztof Kozlowski
Reviewed-byQuoted 45 lines · Miquel Raynal
Hi Krzysztof,
[email protected] wrote on Wed, 2 Oct 2024 08:34:44 +0200:
Quoted 34 lines · Miquel Raynal
Quoted 33 lines
My understanding of the interrupts property is that it can either be:
1/ - TX
2/ - TX
- RX
3/ - Common/combined.There are very little chances that either:
- TX
- Common/combined
or even
- TX
- RX
- Common/combined
could be a thing.Looking at the interrupt-names definition (which uses oneOf instead of anyOf), it makes indeed little sense to use anyOf in the interrupts definition. I believe this is just a mistake, hence let's fix it.
Fixes 8be90641a0bb ("ASoC: dt-bindings: davinci-mcasp: convert McASP bindings to yaml schema")Signed-off-by Miquel Raynal <[email protected]>---
--- .../devicetree/bindings/sound/davinci-mcasp-audio.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml +0
-0@@ -102,7 +102,7 @@ properties: default: 2Quoted 6 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml properties: · line 105
Quoted 3 lines
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml +1
-1interrupts: - anyOf: + oneOf:You need to change interrupt-names as well.
Quoted 3 lines
interrupt-names is already using 'oneOf'!
The extended diff looks like that:
Indeed.
Best regards,
Krzysztof
Hi,
Quoted 6 lines · Miquel Raynal
My understanding of the interrupts property is that it can either be:
1/ - TX
2/ - TX
- RX
3/ - Common/combined.
Quoted 8 lines
There are very little chances that either:
- TX
- Common/combined
or even
- TX
- RX
- Common/combined
could be a thing.
For interrupt these are the valid onesÉ
- Common only
- TX and RX
- TX only
- RX only
The driver cuts this through by trying to request all and leaves it for DT to specify the correct irqs.
Note: in case of common only, we still have RX+TX, TX only, RX only operation, but that is just a side note.
Quoted 25 lines
Looking at the interrupt-names definition (which uses oneOf instead of anyOf), it makes indeed little sense to use anyOf in the interrupts definition. I believe this is just a mistake, hence let's fix it.
Fixes 8be90641a0bb ("ASoC: dt-bindings: davinci-mcasp: convert McASP bindings to yaml schema")Signed-off-by Miquel Raynal <[email protected]>---
--- .../devicetree/bindings/sound/davinci-mcasp-audio.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml +1
-1@@ -102,7 +102,7 @@ properties: default: 2 interrupts: - anyOf: + oneOf: - minItems: 1 items: - description: TX interrupt
Signature · 1 line
Péter
Hi Péter,
[email protected] wrote on Wed, 2 Oct 2024 11:43:56 +0300:
Quoted 18 lines
Hi,
Quoted 6 lines · Miquel Raynal
My understanding of the interrupts property is that it can either be:
1/ - TX
2/ - TX
- RX
3/ - Common/combined.Quoted 8 lines
There are very little chances that either:
- TX
- Common/combined
or even
- TX
- RX
- Common/combined
could be a thing.
Quoted 5 lines
For interrupt these are the valid onesÉ
- Common only
- TX and RX
- TX only
- RX only
Thanks for the input!
AFAIU, Rx only is currently not a valid description. As you are providing a description list with minItems = <1>, I think it expects either the first item or nothing. When I change the example in the yaml to only give the "rx" interrupt, make dt_binding_check errors out.
I will propose an update.
Thanks,
Miquèl
Mark Brown
maintainerQuoted 15 lines · Miquel Raynal
My understanding of the interrupts property is that it can either be:
1/ - TX
2/ - TX
- RX
3/ - Common/combined.There are very little chances that either:
- TX
- Common/combined
or even
- TX
- RX
- Common/combined
could be a thing.
Quoted 1 line
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: dt-bindings: davinci-mcasp: Fix interrupts property
commit: 17d8adc4cd5181c13c1041b197b76efc09eaf8a8
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Hi Mark,
[email protected] wrote on Wed, 02 Oct 2024 18:37:51 +0100:
Quoted 16 lines · Miquel Raynal
Quoted 15 lines
My understanding of the interrupts property is that it can either be:
1/ - TX
2/ - TX
- RX
3/ - Common/combined.There are very little chances that either:
- TX
- Common/combined
or even
- TX
- RX
- Common/combined
could be a thing.
Quoted 5 lines
Quoted 1 line
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
I didn't read your e-mail in time, there is apparently more to fix if Péter is right, as the current binding still does not allow the "rx" interrupt alone, while apparently it should. I prepared a second fix.
Thanks,
Miquèl