devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: irqchip: convert st,stih407-irq-syscfg to DT schema
@ 2023-08-01 21:46 Raphael Gallais-Pou
  2023-08-03 16:06 ` Conor Dooley
  2023-08-04 15:06 ` Rob Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Raphael Gallais-Pou @ 2023-08-01 21:46 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Patrice Chotard
  Cc: linux-kernel, devicetree

Convert deprecated format to DT schema format.

Signed-off-by: Raphael Gallais-Pou <rgallaispou@gmail.com>
---
 .../st,sti-irq-syscfg.txt                     | 30 ---------
 .../st,stih407-irq-syscfg.yaml                | 67 +++++++++++++++++++
 2 files changed, 67 insertions(+), 30 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/st,stih407-irq-syscfg.yaml

diff --git a/Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt b/Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt
deleted file mode 100644
index 977d7ed3670e..000000000000
--- a/Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-STMicroelectronics STi System Configuration Controlled IRQs
------------------------------------------------------------
-
-On STi based systems; External, CTI (Core Sight), PMU (Performance Management),
-and PL310 L2 Cache IRQs are controlled using System Configuration registers.
-This driver is used to unmask them prior to use.
-
-Required properties:
-- compatible	: Should be "st,stih407-irq-syscfg"
-- st,syscfg	: Phandle to Cortex-A9 IRQ system config registers
-- st,irq-device	: Array of IRQs to enable - should be 2 in length
-- st,fiq-device	: Array of FIQs to enable - should be 2 in length
-
-Optional properties:
-- st,invert-ext	: External IRQs can be inverted at will.  This property inverts
-		  these IRQs using bitwise logic.  A number of defines have been
-		  provided for convenience:
-			ST_IRQ_SYSCFG_EXT_1_INV
-			ST_IRQ_SYSCFG_EXT_2_INV
-			ST_IRQ_SYSCFG_EXT_3_INV
-Example:
-
-irq-syscfg {
-	compatible    = "st,stih407-irq-syscfg";
-	st,syscfg     = <&syscfg_cpu>;
-	st,irq-device = <ST_IRQ_SYSCFG_PMU_0>,
-			<ST_IRQ_SYSCFG_PMU_1>;
-	st,fiq-device = <ST_IRQ_SYSCFG_DISABLED>,
-			<ST_IRQ_SYSCFG_DISABLED>;
-};
diff --git a/Documentation/devicetree/bindings/interrupt-controller/st,stih407-irq-syscfg.yaml b/Documentation/devicetree/bindings/interrupt-controller/st,stih407-irq-syscfg.yaml
new file mode 100644
index 000000000000..fce18d444c56
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/st,stih407-irq-syscfg.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/st,stih407-irq-syscfg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STi System Configuration Controlled IRQs
+
+maintainers:
+  - Patrice Chotard <patrice.chotard@foss.st.com>
+
+description:
+  On STi based systems; External, CTI (Core Sight), PMU (Performance
+  Management), and PL310 L2 Cache IRQs are controlled using System
+  Configuration registers.  This driver is used to unmask them prior to use.
+
+properties:
+  compatible:
+    const: st,stih407-irq-syscfg
+
+  st,syscfg:
+    description: Phandle to Cortex-A9 IRQ system config registers
+    $ref: "/schemas/types.yaml#/definitions/phandle"
+
+  st,irq-device:
+    description: Array of IRQs to enable.
+    $ref: "/schemas/types.yaml#/definitions/uint32-array"
+    items:
+      - description: Enable the IRQ of the channel one.
+      - description: Enable the IRQ of the channel two.
+
+  st,fiq-device:
+    description: Array of FIQs to enable.
+    $ref: "/schemas/types.yaml#/definitions/uint32-array"
+    items:
+      - description: Enable the IRQ of the channel one.
+      - description: Enable the IRQ of the channel two.
+
+  st,invert-ext:
+    description: External IRQs can be inverted at will. This property inverts
+      these IRQs using bitwise logic.
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+    enum:
+      - ST_IRQ_SYSCFG_EXT_1_INV
+      - ST_IRQ_SYSCFG_EXT_2_INV
+      - ST_IRQ_SYSCFG_EXT_3_INV
+
+required:
+  - compatible
+  - st,syscfg
+  - st,irq-device
+  - st,fiq-device
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq-st.h>
+    irq-syscfg {
+        compatible    = "st,stih407-irq-syscfg";
+        st,syscfg     = <&syscfg_cpu>;
+        st,irq-device = <ST_IRQ_SYSCFG_PMU_0>,
+                        <ST_IRQ_SYSCFG_PMU_1>;
+        st,fiq-device = <ST_IRQ_SYSCFG_DISABLED>,
+                        <ST_IRQ_SYSCFG_DISABLED>;
+    };
+...
-- 
2.41.0


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

* Re: [PATCH] dt-bindings: irqchip: convert st,stih407-irq-syscfg to DT schema
  2023-08-01 21:46 [PATCH] dt-bindings: irqchip: convert st,stih407-irq-syscfg to DT schema Raphael Gallais-Pou
@ 2023-08-03 16:06 ` Conor Dooley
  2023-08-04 15:06 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Conor Dooley @ 2023-08-03 16:06 UTC (permalink / raw)
  To: Raphael Gallais-Pou
  Cc: Thomas Gleixner, Marc Zyngier, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Patrice Chotard, linux-kernel, devicetree

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

On Tue, Aug 01, 2023 at 11:46:51PM +0200, Raphael Gallais-Pou wrote:
> Convert deprecated format to DT schema format.
> 
> Signed-off-by: Raphael Gallais-Pou <rgallaispou@gmail.com>

This seems ok to me,
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH] dt-bindings: irqchip: convert st,stih407-irq-syscfg to DT schema
  2023-08-01 21:46 [PATCH] dt-bindings: irqchip: convert st,stih407-irq-syscfg to DT schema Raphael Gallais-Pou
  2023-08-03 16:06 ` Conor Dooley
@ 2023-08-04 15:06 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2023-08-04 15:06 UTC (permalink / raw)
  To: Raphael Gallais-Pou
  Cc: Thomas Gleixner, Marc Zyngier, Krzysztof Kozlowski, Conor Dooley,
	Patrice Chotard, linux-kernel, devicetree

On Tue, Aug 01, 2023 at 11:46:51PM +0200, Raphael Gallais-Pou wrote:
> Convert deprecated format to DT schema format.
> 
> Signed-off-by: Raphael Gallais-Pou <rgallaispou@gmail.com>
> ---
>  .../st,sti-irq-syscfg.txt                     | 30 ---------
>  .../st,stih407-irq-syscfg.yaml                | 67 +++++++++++++++++++
>  2 files changed, 67 insertions(+), 30 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt
>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/st,stih407-irq-syscfg.yaml
> 
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt b/Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt
> deleted file mode 100644
> index 977d7ed3670e..000000000000
> --- a/Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -STMicroelectronics STi System Configuration Controlled IRQs
> ------------------------------------------------------------
> -
> -On STi based systems; External, CTI (Core Sight), PMU (Performance Management),
> -and PL310 L2 Cache IRQs are controlled using System Configuration registers.
> -This driver is used to unmask them prior to use.
> -
> -Required properties:
> -- compatible	: Should be "st,stih407-irq-syscfg"
> -- st,syscfg	: Phandle to Cortex-A9 IRQ system config registers
> -- st,irq-device	: Array of IRQs to enable - should be 2 in length
> -- st,fiq-device	: Array of FIQs to enable - should be 2 in length
> -
> -Optional properties:
> -- st,invert-ext	: External IRQs can be inverted at will.  This property inverts
> -		  these IRQs using bitwise logic.  A number of defines have been
> -		  provided for convenience:
> -			ST_IRQ_SYSCFG_EXT_1_INV
> -			ST_IRQ_SYSCFG_EXT_2_INV
> -			ST_IRQ_SYSCFG_EXT_3_INV
> -Example:
> -
> -irq-syscfg {
> -	compatible    = "st,stih407-irq-syscfg";
> -	st,syscfg     = <&syscfg_cpu>;
> -	st,irq-device = <ST_IRQ_SYSCFG_PMU_0>,
> -			<ST_IRQ_SYSCFG_PMU_1>;
> -	st,fiq-device = <ST_IRQ_SYSCFG_DISABLED>,
> -			<ST_IRQ_SYSCFG_DISABLED>;
> -};
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/st,stih407-irq-syscfg.yaml b/Documentation/devicetree/bindings/interrupt-controller/st,stih407-irq-syscfg.yaml
> new file mode 100644
> index 000000000000..fce18d444c56
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interrupt-controller/st,stih407-irq-syscfg.yaml
> @@ -0,0 +1,67 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interrupt-controller/st,stih407-irq-syscfg.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: STMicroelectronics STi System Configuration Controlled IRQs
> +
> +maintainers:
> +  - Patrice Chotard <patrice.chotard@foss.st.com>
> +
> +description:
> +  On STi based systems; External, CTI (Core Sight), PMU (Performance
> +  Management), and PL310 L2 Cache IRQs are controlled using System
> +  Configuration registers.  This driver is used to unmask them prior to use.
> +
> +properties:
> +  compatible:
> +    const: st,stih407-irq-syscfg
> +
> +  st,syscfg:
> +    description: Phandle to Cortex-A9 IRQ system config registers
> +    $ref: "/schemas/types.yaml#/definitions/phandle"

Drop quotes. Here and other $refs.

> +
> +  st,irq-device:
> +    description: Array of IRQs to enable.
> +    $ref: "/schemas/types.yaml#/definitions/uint32-array"
> +    items:
> +      - description: Enable the IRQ of the channel one.
> +      - description: Enable the IRQ of the channel two.
> +
> +  st,fiq-device:
> +    description: Array of FIQs to enable.
> +    $ref: "/schemas/types.yaml#/definitions/uint32-array"
> +    items:
> +      - description: Enable the IRQ of the channel one.
> +      - description: Enable the IRQ of the channel two.
> +
> +  st,invert-ext:
> +    description: External IRQs can be inverted at will. This property inverts
> +      these IRQs using bitwise logic.
> +    $ref: "/schemas/types.yaml#/definitions/uint32"
> +    enum:
> +      - ST_IRQ_SYSCFG_EXT_1_INV
> +      - ST_IRQ_SYSCFG_EXT_2_INV
> +      - ST_IRQ_SYSCFG_EXT_3_INV

Defines don't work here. Add the property to the example and you'll see.

> +
> +required:
> +  - compatible
> +  - st,syscfg
> +  - st,irq-device
> +  - st,fiq-device
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq-st.h>
> +    irq-syscfg {
> +        compatible    = "st,stih407-irq-syscfg";
> +        st,syscfg     = <&syscfg_cpu>;
> +        st,irq-device = <ST_IRQ_SYSCFG_PMU_0>,
> +                        <ST_IRQ_SYSCFG_PMU_1>;
> +        st,fiq-device = <ST_IRQ_SYSCFG_DISABLED>,
> +                        <ST_IRQ_SYSCFG_DISABLED>;
> +    };
> +...
> -- 
> 2.41.0
> 

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

end of thread, other threads:[~2023-08-04 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 21:46 [PATCH] dt-bindings: irqchip: convert st,stih407-irq-syscfg to DT schema Raphael Gallais-Pou
2023-08-03 16:06 ` Conor Dooley
2023-08-04 15:06 ` Rob Herring

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).