linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: mtd: brcm,brcmnand: update interrupts description
@ 2022-11-04  8:53 Rafał Miłecki
  2022-11-07 16:22 ` Miquel Raynal
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rafał Miłecki @ 2022-11-04  8:53 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra
  Cc: Brian Norris, Kamal Dasu, linux-mtd, devicetree,
	bcm-kernel-feedback-list, Rafał Miłecki,
	Florian Fainelli

From: Rafał Miłecki <rafal@milecki.pl>

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/

Reported-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
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(-)

diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
index dd5a64969e37..cd606a21b53b 100644
--- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
+++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
@@ -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>;
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: mtd: brcm,brcmnand: update interrupts description
  2022-11-04  8:53 [PATCH] dt-bindings: mtd: brcm,brcmnand: update interrupts description Rafał Miłecki
@ 2022-11-07 16:22 ` Miquel Raynal
  2022-11-07 16:26   ` Miquel Raynal
  2022-11-07 20:17 ` Rob Herring
  2022-11-08  8:26 ` Miquel Raynal
  2 siblings, 1 reply; 5+ messages in thread
From: Miquel Raynal @ 2022-11-07 16:22 UTC (permalink / raw)
  To: Rafał Miłecki, Rob Herring, Krzysztof Kozlowski,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: Brian Norris, Kamal Dasu, linux-mtd, devicetree,
	bcm-kernel-feedback-list, Rafał Miłecki,
	Florian Fainelli

On Fri, 2022-11-04 at 08:53:16 UTC, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> 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/
> 
> Reported-by: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

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

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: mtd: brcm,brcmnand: update interrupts description
  2022-11-07 16:22 ` Miquel Raynal
@ 2022-11-07 16:26   ` Miquel Raynal
  0 siblings, 0 replies; 5+ messages in thread
From: Miquel Raynal @ 2022-11-07 16:26 UTC (permalink / raw)
  To: Rafał Miłecki, Rob Herring, Krzysztof Kozlowski,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: Brian Norris, Kamal Dasu, linux-mtd, devicetree,
	bcm-kernel-feedback-list, Rafał Miłecki,
	Florian Fainelli

Hi,

miquel.raynal@bootlin.com wrote on Mon,  7 Nov 2022 17:22:53 +0100:

> On Fri, 2022-11-04 at 08:53:16 UTC, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= wrote:
> > From: Rafał Miłecki <rafal@milecki.pl>
> > 
> > 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/
> > 
> > Reported-by: Florian Fainelli <f.fainelli@gmail.com>
> > Signed-off-by: Rafał Miłecki <rafal@milecki.pl>  
> 
> 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

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: mtd: brcm,brcmnand: update interrupts description
  2022-11-04  8:53 [PATCH] dt-bindings: mtd: brcm,brcmnand: update interrupts description Rafał Miłecki
  2022-11-07 16:22 ` Miquel Raynal
@ 2022-11-07 20:17 ` Rob Herring
  2022-11-08  8:26 ` Miquel Raynal
  2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2022-11-07 20:17 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Miquel Raynal, devicetree, Krzysztof Kozlowski,
	Rafał Miłecki, Kamal Dasu, Florian Fainelli,
	Rob Herring, Brian Norris, linux-mtd, Richard Weinberger,
	bcm-kernel-feedback-list, Vignesh Raghavendra


On Fri, 04 Nov 2022 09:53:16 +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> 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/
> 
> Reported-by: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> 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(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: mtd: brcm,brcmnand: update interrupts description
  2022-11-04  8:53 [PATCH] dt-bindings: mtd: brcm,brcmnand: update interrupts description Rafał Miłecki
  2022-11-07 16:22 ` Miquel Raynal
  2022-11-07 20:17 ` Rob Herring
@ 2022-11-08  8:26 ` Miquel Raynal
  2 siblings, 0 replies; 5+ messages in thread
From: Miquel Raynal @ 2022-11-08  8:26 UTC (permalink / raw)
  To: Rafał Miłecki, Rob Herring, Krzysztof Kozlowski,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: Brian Norris, Kamal Dasu, linux-mtd, devicetree,
	bcm-kernel-feedback-list, Rafał Miłecki,
	Florian Fainelli

On Fri, 2022-11-04 at 08:53:16 UTC, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> 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/
> 
> Reported-by: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> Reviewed-by: Rob Herring <robh@kernel.org>

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

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-08  8:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04  8:53 [PATCH] dt-bindings: mtd: brcm,brcmnand: update interrupts description Rafał Miłecki
2022-11-07 16:22 ` Miquel Raynal
2022-11-07 16:26   ` Miquel Raynal
2022-11-07 20:17 ` Rob Herring
2022-11-08  8:26 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).