All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Anson Huang <Anson.Huang@nxp.com>
Cc: linus.walleij@linaro.org, bgolaszewski@baylibre.com,
	shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Linux-imx@nxp.com
Subject: Re: [PATCH] dt-bindings: gpio: Convert i.MX to json-schema
Date: Mon, 20 Apr 2020 14:19:41 -0500	[thread overview]
Message-ID: <20200420191941.GA6101@bogus> (raw)
In-Reply-To: <1586770849-15693-1-git-send-email-Anson.Huang@nxp.com>

On Mon, Apr 13, 2020 at 05:40:49PM +0800, Anson Huang wrote:
> Convert the i.MX GPIO binding to DT schema format using json-schema.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  .../devicetree/bindings/gpio/fsl-imx-gpio.txt      | 35 -----------
>  .../devicetree/bindings/gpio/fsl-imx-gpio.yaml     | 72 ++++++++++++++++++++++
>  2 files changed, 72 insertions(+), 35 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
>  create mode 100644 Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> 
> diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
> deleted file mode 100644
> index b4cd9f90..0000000
> --- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -* Freescale i.MX/MXC GPIO controller
> -
> -Required properties:
> -- compatible : Should be "fsl,<soc>-gpio"
> -- reg : Address and length of the register set for the device
> -- interrupts : Should be the port interrupt shared by all 32 pins, if
> -  one number.  If two numbers, the first one is the interrupt shared
> -  by low 16 pins and the second one is for high 16 pins.
> -- gpio-controller : Marks the device node as a gpio controller.
> -- #gpio-cells : Should be two.  The first cell is the pin number and
> -  the second cell is used to specify the gpio polarity:
> -      0 = active high
> -      1 = active low
> -- interrupt-controller: Marks the device node as an interrupt controller.
> -- #interrupt-cells : Should be 2.  The first cell is the GPIO number.
> -  The second cell bits[3:0] is used to specify trigger type and level flags:
> -      1 = low-to-high edge triggered.
> -      2 = high-to-low edge triggered.
> -      4 = active high level-sensitive.
> -      8 = active low level-sensitive.
> -
> -Optional properties:
> -- clocks: the clock for clocking the GPIO silicon
> -
> -Example:
> -
> -gpio0: gpio@73f84000 {
> -	compatible = "fsl,imx51-gpio", "fsl,imx35-gpio";
> -	reg = <0x73f84000 0x4000>;
> -	interrupts = <50 51>;
> -	gpio-controller;
> -	#gpio-cells = <2>;
> -	interrupt-controller;
> -	#interrupt-cells = <2>;
> -};
> diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> new file mode 100644
> index 0000000..465104c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/fsl-imx-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale i.MX/MXC GPIO controller
> +
> +maintainers:
> +  - Anson Huang <Anson.Huang@nxp.com>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - fsl,imx1-gpio
> +              - fsl,imx21-gpio
> +              - fsl,imx31-gpio
> +              - fsl,imx35-gpio
> +              - fsl,imx7d-gpio

compatible:
  enum:
    - fsl,imx1-gpio
    - fsl,imx21-gpio
    - fsl,imx31-gpio
    - fsl,imx35-gpio
    - fsl,imx7d-gpio

> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    description: |
> +      Should be the port interrupt shared by all 32 pins, if one number.
> +      If two numbers, the first one is the interrupt shared by low 16 pins
> +      and the second one is for high 16 pins.
> +    minItems: 1
> +    maxItems: 2
> +
> +  interrupt-controller: true
> +
> +  "#interrupt-cells":
> +    const: 2
> +
> +  clocks:
> +    description: |
> +      The clock for clocking the GPIO silicon.

Can drop.

> +    maxItems: 1
> +
> +  "#gpio-cells":
> +    const: 2
> +
> +  gpio-controller: true
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - interrupt-controller
> +  - "#interrupt-cells"
> +  - "#gpio-cells"
> +  - gpio-controller
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    gpio0: gpio@73f84000 {
> +        compatible = "fsl,imx35-gpio";
> +        reg = <0x73f84000 0x4000>;
> +        interrupts = <50 51>;
> +        gpio-controller;
> +        #gpio-cells = <2>;
> +        interrupt-controller;
> +        #interrupt-cells = <2>;
> +    };
> +
> +...
> -- 
> 2.7.4
> 

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Anson Huang <Anson.Huang@nxp.com>
Cc: devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	shawnguo@kernel.org, linus.walleij@linaro.org,
	linux-kernel@vger.kernel.org, bgolaszewski@baylibre.com,
	Linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com,
	s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] dt-bindings: gpio: Convert i.MX to json-schema
Date: Mon, 20 Apr 2020 14:19:41 -0500	[thread overview]
Message-ID: <20200420191941.GA6101@bogus> (raw)
In-Reply-To: <1586770849-15693-1-git-send-email-Anson.Huang@nxp.com>

On Mon, Apr 13, 2020 at 05:40:49PM +0800, Anson Huang wrote:
> Convert the i.MX GPIO binding to DT schema format using json-schema.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  .../devicetree/bindings/gpio/fsl-imx-gpio.txt      | 35 -----------
>  .../devicetree/bindings/gpio/fsl-imx-gpio.yaml     | 72 ++++++++++++++++++++++
>  2 files changed, 72 insertions(+), 35 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
>  create mode 100644 Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> 
> diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
> deleted file mode 100644
> index b4cd9f90..0000000
> --- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -* Freescale i.MX/MXC GPIO controller
> -
> -Required properties:
> -- compatible : Should be "fsl,<soc>-gpio"
> -- reg : Address and length of the register set for the device
> -- interrupts : Should be the port interrupt shared by all 32 pins, if
> -  one number.  If two numbers, the first one is the interrupt shared
> -  by low 16 pins and the second one is for high 16 pins.
> -- gpio-controller : Marks the device node as a gpio controller.
> -- #gpio-cells : Should be two.  The first cell is the pin number and
> -  the second cell is used to specify the gpio polarity:
> -      0 = active high
> -      1 = active low
> -- interrupt-controller: Marks the device node as an interrupt controller.
> -- #interrupt-cells : Should be 2.  The first cell is the GPIO number.
> -  The second cell bits[3:0] is used to specify trigger type and level flags:
> -      1 = low-to-high edge triggered.
> -      2 = high-to-low edge triggered.
> -      4 = active high level-sensitive.
> -      8 = active low level-sensitive.
> -
> -Optional properties:
> -- clocks: the clock for clocking the GPIO silicon
> -
> -Example:
> -
> -gpio0: gpio@73f84000 {
> -	compatible = "fsl,imx51-gpio", "fsl,imx35-gpio";
> -	reg = <0x73f84000 0x4000>;
> -	interrupts = <50 51>;
> -	gpio-controller;
> -	#gpio-cells = <2>;
> -	interrupt-controller;
> -	#interrupt-cells = <2>;
> -};
> diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> new file mode 100644
> index 0000000..465104c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/fsl-imx-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale i.MX/MXC GPIO controller
> +
> +maintainers:
> +  - Anson Huang <Anson.Huang@nxp.com>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - fsl,imx1-gpio
> +              - fsl,imx21-gpio
> +              - fsl,imx31-gpio
> +              - fsl,imx35-gpio
> +              - fsl,imx7d-gpio

compatible:
  enum:
    - fsl,imx1-gpio
    - fsl,imx21-gpio
    - fsl,imx31-gpio
    - fsl,imx35-gpio
    - fsl,imx7d-gpio

> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    description: |
> +      Should be the port interrupt shared by all 32 pins, if one number.
> +      If two numbers, the first one is the interrupt shared by low 16 pins
> +      and the second one is for high 16 pins.
> +    minItems: 1
> +    maxItems: 2
> +
> +  interrupt-controller: true
> +
> +  "#interrupt-cells":
> +    const: 2
> +
> +  clocks:
> +    description: |
> +      The clock for clocking the GPIO silicon.

Can drop.

> +    maxItems: 1
> +
> +  "#gpio-cells":
> +    const: 2
> +
> +  gpio-controller: true
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - interrupt-controller
> +  - "#interrupt-cells"
> +  - "#gpio-cells"
> +  - gpio-controller
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    gpio0: gpio@73f84000 {
> +        compatible = "fsl,imx35-gpio";
> +        reg = <0x73f84000 0x4000>;
> +        interrupts = <50 51>;
> +        gpio-controller;
> +        #gpio-cells = <2>;
> +        interrupt-controller;
> +        #interrupt-cells = <2>;
> +    };
> +
> +...
> -- 
> 2.7.4
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-04-20 19:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-13  9:40 [PATCH] dt-bindings: gpio: Convert i.MX to json-schema Anson Huang
2020-04-13  9:40 ` Anson Huang
2020-04-20 19:19 ` Rob Herring [this message]
2020-04-20 19:19   ` Rob Herring

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=20200420191941.GA6101@bogus \
    --to=robh@kernel.org \
    --cc=Anson.Huang@nxp.com \
    --cc=Linux-imx@nxp.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.