Skip to contentSkip to conversation

dt-bindings: mtd: brcm,brcmnand: update interrupts description

PATCH Applied Rafał Miłecki 3 participants 5 messages Nov 4, 2022 – Nov 8, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: mtd: brcm,brcmnand: update interrupts description

From: Rafał Miłecki <[email protected]>

1. DMA and EDU are mutually exclusive: don't allow both at the same time
2. Require interrupt-names for 2+ interrupts to avoid /guessing/

---
I also thought of something like:
interrupts:
minItems: 1
items:
- description: NAND CTLRDY interrupt
- anyOf:
- description: FLASH_DMA_DONE if flash DMA is available
- description: FLASH_EDU_DONE if EDU is available
(to avoid text-form "or" in "description") but that didn't work:
CHKDT Documentation/devicetree/bindings/processed-schema.json
./Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml: error checking schema file
SCHEMA Documentation/devicetree/bindings/processed-schema.json
Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml: ignoring, error in schema: properties: interrupts

---
 .../devicetree/bindings/mtd/brcm,brcmnand.yaml   | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml +12 -4
index dd5a64969e37..cd606a21b53b 100644
@@ -86,15 +86,15 @@ properties:
     minItems: 1
     items:
       - description: NAND CTLRDY interrupt
-      - description: FLASH_DMA_DONE if flash DMA is available
-      - description: FLASH_EDU_DONE if EDU is available
+      - description: FLASH_DMA_DONE (if flash DMA is available) or FLASH_EDU_DONE (if EDU is available)
 
   interrupt-names:
     minItems: 1
     items:
       - const: nand_ctlrdy
-      - const: flash_dma_done
-      - const: flash_edu_done
+      - enum:
+          - flash_dma_done
+          - flash_edu_done
 
   clocks:
     maxItems: 1
@@ -173,6 +173,13 @@ allOf:
             - const: nand
             - const: iproc-idm
             - const: iproc-ext
+  - if:
+      properties:
+        interrupts:
+          minItems: 2
+    then:
+      required:
+        - interrupt-names
 
 unevaluatedProperties: false
 
@@ -190,6 +197,7 @@ examples:
             reg-names = "nand", "flash-dma";
             interrupt-parent = <&hif_intr2_intc>;
             interrupts = <24>, <4>;
+            interrupt-names = "nand_ctlrdy", "flash_dma_done";
 
             #address-cells = <1>;
             #size-cells = <0>;
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 7 lines · On Fri, 2022-11-04 at 08:53:16 UTC, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= wrote:

From: Rafał Miłecki <[email protected]>

1. DMA and EDU are mutually exclusive: don't allow both at the same time
2. Require interrupt-names for 2+ interrupts to avoid /guessing/

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

maintainer
#2 lore raw

Hi,

[email protected] wrote on Mon, 7 Nov 2022 17:22:53 +0100:

Quoted 10 lines · On Fri, 2022-11-04 at 08:53:16 UTC, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= wrote:
Quoted 7 lines

From: Rafał Miłecki <[email protected]>

1. DMA and EDU are mutually exclusive: don't allow both at the same time
2. Require interrupt-names for 2+ interrupts to avoid /guessing/

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

This patch has not yet been acked by Rob or Krzysztof, I just dropped it and will (re)apply it later if it gets through the necessary reviews.

Sorry for the noise.

Thanks,
Miquèl

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Rafał Miłecki
Quoted 21 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

1. DMA and EDU are mutually exclusive: don't allow both at the same time
2. Require interrupt-names for 2+ interrupts to avoid /guessing/

---
I also thought of something like:
interrupts:
minItems: 1
items:
- description: NAND CTLRDY interrupt
- anyOf:
- description: FLASH_DMA_DONE if flash DMA is available
- description: FLASH_EDU_DONE if EDU is available
(to avoid text-form "or" in "description") but that didn't work:
CHKDT Documentation/devicetree/bindings/processed-schema.json
./Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml: error checking schema file
SCHEMA Documentation/devicetree/bindings/processed-schema.json
Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml: ignoring, error in schema: properties: interrupts

Quoted 4 lines
---
 .../devicetree/bindings/mtd/brcm,brcmnand.yaml   | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
maintainer Applied
#4 lore raw
In reply to Rafał Miłecki
Quoted 8 lines · On Fri, 2022-11-04 at 08:53:16 UTC, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= wrote:

From: Rafał Miłecki <[email protected]>

1. DMA and EDU are mutually exclusive: don't allow both at the same time
2. Require interrupt-names for 2+ interrupts to avoid /guessing/

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel