diff mbox series

[1/4] dt-bindings: net: nfc: s3fwrn5: Convert to dtschema

Message ID 20200829142948.32365-1-krzk@kernel.org
State New
Headers show
Series [1/4] dt-bindings: net: nfc: s3fwrn5: Convert to dtschema | expand

Commit Message

Krzysztof Kozlowski Aug. 29, 2020, 2:29 p.m. UTC
Convert the Samsung S3FWRN5 NCI NFC controller bindings to dtschema.
This is conversion only so it includes properties with invalid prefixes
(s3fwrn5,en-gpios) which should be addressed later.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../devicetree/bindings/net/nfc/s3fwrn5.txt   | 25 --------
 .../devicetree/bindings/net/nfc/s3fwrn5.yaml  | 59 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 3 files changed, 60 insertions(+), 25 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt
 create mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml

Comments

Rob Herring Sept. 3, 2020, 4:32 p.m. UTC | #1
On Sat, Aug 29, 2020 at 04:29:45PM +0200, Krzysztof Kozlowski wrote:
> Convert the Samsung S3FWRN5 NCI NFC controller bindings to dtschema.
> This is conversion only so it includes properties with invalid prefixes
> (s3fwrn5,en-gpios) which should be addressed later.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  .../devicetree/bindings/net/nfc/s3fwrn5.txt   | 25 --------
>  .../devicetree/bindings/net/nfc/s3fwrn5.yaml  | 59 +++++++++++++++++++

Please rename to samsung,s3fwrn5-i2c.yaml.

>  MAINTAINERS                                   |  1 +
>  3 files changed, 60 insertions(+), 25 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt
>  create mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt b/Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt
> deleted file mode 100644
> index f02f6fb7f81c..000000000000
> --- a/Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -* Samsung S3FWRN5 NCI NFC Controller
> -
> -Required properties:
> -- compatible: Should be "samsung,s3fwrn5-i2c".
> -- reg: address on the bus
> -- interrupts: GPIO interrupt to which the chip is connected
> -- s3fwrn5,en-gpios: Output GPIO pin used for enabling/disabling the chip
> -- s3fwrn5,fw-gpios: Output GPIO pin used to enter firmware mode and
> -  sleep/wakeup control
> -
> -Example:
> -
> -&hsi2c_4 {
> -	s3fwrn5@27 {
> -		compatible = "samsung,s3fwrn5-i2c";
> -
> -		reg = <0x27>;
> -
> -		interrupt-parent = <&gpa1>;
> -		interrupts = <3 0 0>;
> -
> -		s3fwrn5,en-gpios = <&gpf1 4 0>;
> -		s3fwrn5,fw-gpios = <&gpj0 2 0>;
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml b/Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml
> new file mode 100644
> index 000000000000..c22451dea350
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml
> @@ -0,0 +1,59 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/nfc/s3fwrn5.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Samsung S3FWRN5 NCI NFC Controller
> +
> +maintainers:
> +  - Krzysztof Kozlowski <krzk@kernel.org>
> +  - Krzysztof Opasiak <k.opasiak@samsung.com>
> +
> +properties:
> +  compatible:
> +    const: samsung,s3fwrn5-i2c
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  reg:
> +    maxItems: 1
> +
> +  s3fwrn5,en-gpios:
> +    maxItems: 1
> +    description:
> +      Output GPIO pin used for enabling/disabling the chip
> +
> +  s3fwrn5,fw-gpios:
> +    maxItems: 1
> +    description:
> +      Output GPIO pin used to enter firmware mode and sleep/wakeup control
> +
> +required:
> +  - compatible
> +  - interrupts
> +  - reg
> +  - s3fwrn5,en-gpios
> +  - s3fwrn5,fw-gpios

additionalProperties: false

> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    i2c4 {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        s3fwrn5@27 {
> +            compatible = "samsung,s3fwrn5-i2c";
> +            reg = <0x27>;
> +
> +            interrupt-parent = <&gpa1>;
> +            interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
> +
> +            s3fwrn5,en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>;
> +            s3fwrn5,fw-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
> +        };
> +    };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index ac79fdbdf8d0..91b3d5c349d8 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -15273,6 +15273,7 @@ M:	Robert Baldyga <r.baldyga@samsung.com>
>  M:	Krzysztof Opasiak <k.opasiak@samsung.com>
>  L:	linux-nfc@lists.01.org (moderated for non-subscribers)
>  S:	Supported
> +F:	Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml
>  F:	drivers/nfc/s3fwrn5
>  
>  SAMSUNG S5C73M3 CAMERA DRIVER
> -- 
> 2.17.1
>
Krzysztof Kozlowski Sept. 6, 2020, 2:38 p.m. UTC | #2
On Thu, 3 Sep 2020 at 18:33, Rob Herring <robh@kernel.org> wrote:
>
> On Sat, Aug 29, 2020 at 04:29:45PM +0200, Krzysztof Kozlowski wrote:
> > Convert the Samsung S3FWRN5 NCI NFC controller bindings to dtschema.
> > This is conversion only so it includes properties with invalid prefixes
> > (s3fwrn5,en-gpios) which should be addressed later.
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > ---
> >  .../devicetree/bindings/net/nfc/s3fwrn5.txt   | 25 --------
> >  .../devicetree/bindings/net/nfc/s3fwrn5.yaml  | 59 +++++++++++++++++++
>
> Please rename to samsung,s3fwrn5-i2c.yaml.
>
> >  MAINTAINERS                                   |  1 +
> >  3 files changed, 60 insertions(+), 25 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt
> >  create mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt b/Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt
> > deleted file mode 100644
> > index f02f6fb7f81c..000000000000
> > --- a/Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt
> > +++ /dev/null
> > @@ -1,25 +0,0 @@
> > -* Samsung S3FWRN5 NCI NFC Controller
> > -
> > -Required properties:
> > -- compatible: Should be "samsung,s3fwrn5-i2c".
> > -- reg: address on the bus
> > -- interrupts: GPIO interrupt to which the chip is connected
> > -- s3fwrn5,en-gpios: Output GPIO pin used for enabling/disabling the chip
> > -- s3fwrn5,fw-gpios: Output GPIO pin used to enter firmware mode and
> > -  sleep/wakeup control
> > -
> > -Example:
> > -
> > -&hsi2c_4 {
> > -     s3fwrn5@27 {
> > -             compatible = "samsung,s3fwrn5-i2c";
> > -
> > -             reg = <0x27>;
> > -
> > -             interrupt-parent = <&gpa1>;
> > -             interrupts = <3 0 0>;
> > -
> > -             s3fwrn5,en-gpios = <&gpf1 4 0>;
> > -             s3fwrn5,fw-gpios = <&gpj0 2 0>;
> > -     };
> > -};
> > diff --git a/Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml b/Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml
> > new file mode 100644
> > index 000000000000..c22451dea350
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml
> > @@ -0,0 +1,59 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/net/nfc/s3fwrn5.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Samsung S3FWRN5 NCI NFC Controller
> > +
> > +maintainers:
> > +  - Krzysztof Kozlowski <krzk@kernel.org>
> > +  - Krzysztof Opasiak <k.opasiak@samsung.com>
> > +
> > +properties:
> > +  compatible:
> > +    const: samsung,s3fwrn5-i2c
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  s3fwrn5,en-gpios:
> > +    maxItems: 1
> > +    description:
> > +      Output GPIO pin used for enabling/disabling the chip
> > +
> > +  s3fwrn5,fw-gpios:
> > +    maxItems: 1
> > +    description:
> > +      Output GPIO pin used to enter firmware mode and sleep/wakeup control
> > +
> > +required:
> > +  - compatible
> > +  - interrupts
> > +  - reg
> > +  - s3fwrn5,en-gpios
> > +  - s3fwrn5,fw-gpios
>
> additionalProperties: false

Sure, I'll fix both issues.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt b/Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt
deleted file mode 100644
index f02f6fb7f81c..000000000000
--- a/Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt
+++ /dev/null
@@ -1,25 +0,0 @@ 
-* Samsung S3FWRN5 NCI NFC Controller
-
-Required properties:
-- compatible: Should be "samsung,s3fwrn5-i2c".
-- reg: address on the bus
-- interrupts: GPIO interrupt to which the chip is connected
-- s3fwrn5,en-gpios: Output GPIO pin used for enabling/disabling the chip
-- s3fwrn5,fw-gpios: Output GPIO pin used to enter firmware mode and
-  sleep/wakeup control
-
-Example:
-
-&hsi2c_4 {
-	s3fwrn5@27 {
-		compatible = "samsung,s3fwrn5-i2c";
-
-		reg = <0x27>;
-
-		interrupt-parent = <&gpa1>;
-		interrupts = <3 0 0>;
-
-		s3fwrn5,en-gpios = <&gpf1 4 0>;
-		s3fwrn5,fw-gpios = <&gpj0 2 0>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml b/Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml
new file mode 100644
index 000000000000..c22451dea350
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml
@@ -0,0 +1,59 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/nfc/s3fwrn5.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung S3FWRN5 NCI NFC Controller
+
+maintainers:
+  - Krzysztof Kozlowski <krzk@kernel.org>
+  - Krzysztof Opasiak <k.opasiak@samsung.com>
+
+properties:
+  compatible:
+    const: samsung,s3fwrn5-i2c
+
+  interrupts:
+    maxItems: 1
+
+  reg:
+    maxItems: 1
+
+  s3fwrn5,en-gpios:
+    maxItems: 1
+    description:
+      Output GPIO pin used for enabling/disabling the chip
+
+  s3fwrn5,fw-gpios:
+    maxItems: 1
+    description:
+      Output GPIO pin used to enter firmware mode and sleep/wakeup control
+
+required:
+  - compatible
+  - interrupts
+  - reg
+  - s3fwrn5,en-gpios
+  - s3fwrn5,fw-gpios
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c4 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        s3fwrn5@27 {
+            compatible = "samsung,s3fwrn5-i2c";
+            reg = <0x27>;
+
+            interrupt-parent = <&gpa1>;
+            interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+
+            s3fwrn5,en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>;
+            s3fwrn5,fw-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
+        };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index ac79fdbdf8d0..91b3d5c349d8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15273,6 +15273,7 @@  M:	Robert Baldyga <r.baldyga@samsung.com>
 M:	Krzysztof Opasiak <k.opasiak@samsung.com>
 L:	linux-nfc@lists.01.org (moderated for non-subscribers)
 S:	Supported
+F:	Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml
 F:	drivers/nfc/s3fwrn5
 
 SAMSUNG S5C73M3 CAMERA DRIVER