public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Animesh Agarwal <animeshagarwal28@gmail.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: interrupt-controller: nxp,lpc3220-mic: Convert to dtschema
Date: Thu, 15 Aug 2024 16:21:18 +0100	[thread overview]
Message-ID: <20240815-starring-genetics-812e8f6bcd89@spud> (raw)
In-Reply-To: <20240814174651.188748-1-animeshagarwal28@gmail.com>

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

On Wed, Aug 14, 2024 at 11:16:47PM +0530, Animesh Agarwal wrote:
> Convert the nxp,lpc3220-mic bindings to yaml format.
> 
> Cc: Daniel Baluta <daniel.baluta@nxp.com>
> Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
> ---
>  .../interrupt-controller/nxp,lpc3220-mic.txt  | 58 -------------
>  .../interrupt-controller/nxp,lpc3220-mic.yaml | 85 +++++++++++++++++++
>  2 files changed, 85 insertions(+), 58 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt
>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
> 
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt
> deleted file mode 100644
> index 0bfb3ba55f4c..000000000000
> --- a/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt
> +++ /dev/null
> @@ -1,58 +0,0 @@
> -* NXP LPC32xx MIC, SIC1 and SIC2 Interrupt Controllers
> -
> -Required properties:
> -- compatible: "nxp,lpc3220-mic" or "nxp,lpc3220-sic".
> -- reg: should contain IC registers location and length.
> -- interrupt-controller: identifies the node as an interrupt controller.
> -- #interrupt-cells: the number of cells to define an interrupt, should be 2.
> -  The first cell is the IRQ number, the second cell is used to specify
> -  one of the supported IRQ types:
> -      IRQ_TYPE_EDGE_RISING = low-to-high edge triggered,
> -      IRQ_TYPE_EDGE_FALLING = high-to-low edge triggered,
> -      IRQ_TYPE_LEVEL_HIGH = active high level-sensitive,
> -      IRQ_TYPE_LEVEL_LOW = active low level-sensitive.
> -  Reset value is IRQ_TYPE_LEVEL_LOW.
> -
> -Optional properties:
> -- interrupts: empty for MIC interrupt controller, cascaded MIC
> -  hardware interrupts for SIC1 and SIC2
> -
> -Examples:
> -
> -	/* LPC32xx MIC, SIC1 and SIC2 interrupt controllers */
> -	mic: interrupt-controller@40008000 {
> -		compatible = "nxp,lpc3220-mic";
> -		reg = <0x40008000 0x4000>;
> -		interrupt-controller;
> -		#interrupt-cells = <2>;
> -	};
> -
> -	sic1: interrupt-controller@4000c000 {
> -		compatible = "nxp,lpc3220-sic";
> -		reg = <0x4000c000 0x4000>;
> -		interrupt-controller;
> -		#interrupt-cells = <2>;
> -
> -		interrupt-parent = <&mic>;
> -		interrupts = <0 IRQ_TYPE_LEVEL_LOW>,
> -			     <30 IRQ_TYPE_LEVEL_LOW>;
> -	};
> -
> -	sic2: interrupt-controller@40010000 {
> -		compatible = "nxp,lpc3220-sic";
> -		reg = <0x40010000 0x4000>;
> -		interrupt-controller;
> -		#interrupt-cells = <2>;
> -
> -		interrupt-parent = <&mic>;
> -		interrupts = <1 IRQ_TYPE_LEVEL_LOW>,
> -			     <31 IRQ_TYPE_LEVEL_LOW>;
> -	};
> -
> -	/* ADC */
> -	adc@40048000 {
> -		compatible = "nxp,lpc3220-adc";
> -		reg = <0x40048000 0x1000>;
> -		interrupt-parent = <&sic1>;
> -		interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
> -	};
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
> new file mode 100644
> index 000000000000..66f2227ed364
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
> @@ -0,0 +1,85 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interrupt-controller/nxp,lpc3220-mic.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP LPC32xx MIC, SIC1 and SIC2 Interrupt Controllers
> +
> +maintainers:
> +  - Animesh Agarwal <animeshagarwal28@gmail.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - nxp,lpc3220-mic
> +      - nxp,lpc3220-sic
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupt-controller: true
> +
> +  '#interrupt-cells':
> +    const: 2
> +    description: |
> +      The first cell is the IRQ number, the second cell is used to specify one
> +      of the supported IRQ types:

> +          IRQ_TYPE_EDGE_RISING = low-to-high edge triggered,
> +          IRQ_TYPE_EDGE_FALLING = high-to-low edge triggered,
> +          IRQ_TYPE_LEVEL_HIGH = active high level-sensitive,
> +          IRQ_TYPE_LEVEL_LOW = active low level-sensitive.

These are teh standard definitions, so there's no need to have them
here?

> +      Reset value is IRQ_TYPE_LEVEL_LOW.
> +
> +  interrupts:
> +    items:
> +      - description: Interrupt for SIC1
> +      - description: Interrupt for SIC2
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupt-controller
> +  - '#interrupt-cells'
> +
> +if:
> +  properties:
> +    compatible:
> +      const: nxp,lpc3220-sic
> +
> +then:
> +  required:
> +    - interrupts

The text binding didn't require this, what has changed?

Cheers,
Conor.

> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    mic: interrupt-controller@40008000 {
> +        compatible = "nxp,lpc3220-mic";
> +        reg = <0x40008000 0x4000>;
> +        interrupt-controller;
> +        #interrupt-cells = <2>;
> +      };
> +
> +    sic1: interrupt-controller@4000c000 {
> +        compatible = "nxp,lpc3220-sic";
> +        reg = <0x4000c000 0x4000>;
> +        interrupt-controller;
> +        #interrupt-cells = <2>;
> +
> +        interrupt-parent = <&mic>;
> +        interrupts = <0 IRQ_TYPE_LEVEL_LOW>, <30 IRQ_TYPE_LEVEL_LOW>;
> +    };
> +
> +    sic2: interrupt-controller@40010000 {
> +        compatible = "nxp,lpc3220-sic";
> +        reg = <0x40010000 0x4000>;
> +        interrupt-controller;
> +        #interrupt-cells = <2>;
> +
> +        interrupt-parent = <&mic>;
> +        interrupts = <1 IRQ_TYPE_LEVEL_LOW>, <31 IRQ_TYPE_LEVEL_LOW>;
> +    };
> -- 
> 2.46.0
> 

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

      reply	other threads:[~2024-08-15 15:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-14 17:46 [PATCH] dt-bindings: interrupt-controller: nxp,lpc3220-mic: Convert to dtschema Animesh Agarwal
2024-08-15 15:21 ` Conor Dooley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240815-starring-genetics-812e8f6bcd89@spud \
    --to=conor@kernel.org \
    --cc=animeshagarwal28@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox