diff mbox series

Convert brcm,kona-wdt.txt to brcm,kona-wdt.yaml

Message ID 20230330182447.51674-1-n2h9z4@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series Convert brcm,kona-wdt.txt to brcm,kona-wdt.yaml | expand

Commit Message

Nik Bune March 30, 2023, 6:24 p.m. UTC
Signed-off-by: Nikita Bondarenko <n2h9z4@gmail.com>
---
 .../bindings/watchdog/brcm,kona-wdt.txt       | 15 -------
 .../bindings/watchdog/brcm,kona-wdt.yaml      | 45 +++++++++++++++++++
 2 files changed, 45 insertions(+), 15 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml

Comments

Rob Herring (Arm) March 30, 2023, 8:50 p.m. UTC | #1
On Thu, 30 Mar 2023 20:24:47 +0200, Nikita Bondarenko wrote:
> Signed-off-by: Nikita Bondarenko <n2h9z4@gmail.com>
> ---
>  .../bindings/watchdog/brcm,kona-wdt.txt       | 15 -------
>  .../bindings/watchdog/brcm,kona-wdt.yaml      | 45 +++++++++++++++++++
>  2 files changed, 45 insertions(+), 15 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
>  create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230330182447.51674-1-n2h9z4@gmail.com


watchdog@35002f40: compatible: ['brcm,bcm11351-wdt', 'brcm,kona-wdt'] is too long
	arch/arm/boot/dts/bcm28155-ap.dtb

watchdog@35002f40: Unevaluated properties are not allowed ('compatible' was unexpected)
	arch/arm/boot/dts/bcm28155-ap.dtb
Krzysztof Kozlowski March 31, 2023, 8:30 a.m. UTC | #2
On 30/03/2023 20:24, Nikita Bondarenko wrote:
> Signed-off-by: Nikita Bondarenko <n2h9z4@gmail.com>

Use subject prefixes matching the subsystem (which you can get for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching).

Missing commit msg.

> ---
>  .../bindings/watchdog/brcm,kona-wdt.txt       | 15 -------
>  .../bindings/watchdog/brcm,kona-wdt.yaml      | 45 +++++++++++++++++++
>  2 files changed, 45 insertions(+), 15 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
>  create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt b/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
> deleted file mode 100644
> index 2b86a00e351d..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -Broadcom Kona Family Watchdog Timer
> ------------------------------------
> -
> -This watchdog timer is used in the following Broadcom SoCs:
> -  BCM11130, BCM11140, BCM11351, BCM28145, BCM28155
> -
> -Required properties:
> -  - compatible = "brcm,bcm11351-wdt", "brcm,kona-wdt";
> -  - reg: memory address & range
> -
> -Example:
> -	watchdog@35002f40 {
> -		compatible = "brcm,bcm11351-wdt", "brcm,kona-wdt";
> -		reg = <0x35002f40 0x6c>;
> -	};
> diff --git a/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml b/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml
> new file mode 100644
> index 000000000000..ffc4870bdb57
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml
> @@ -0,0 +1,45 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/brcm,kona-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom Kona Family Watchdog Timer
> +
> +description: |
> +  This watchdog timer is used in the following Broadcom SoCs:
> +  BCM11130, BCM11140, BCM11351, BCM28145, BCM28155
> +
> +maintainers:
> +  - Rob Herring <robh@kernel.org>

No, it should be device maintainer.

> +
> +allOf:
> +  - $ref: "watchdog.yaml#"

Drop quotes.

> +
> +properties:
> +  compatible:
> +    enum:
> +      - brcm,bcm11351-wdt
> +      - brcm,kona-wdt
> +
> +  reg:
> +    maxItems: 1
> +    description: memory address & range

Drop description.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    watchdog@35002f40 {
> +      compatible = "brcm,bcm11351-wdt";
> +      reg = <0x35002f40 0x6c>;
> +    };
> +  - |
> +    watchdog@35002f40 {

Does not look like you tested the bindings. Please run `make
dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).

> +      compatible = "brcm,kona-wdt";
> +      reg = <0x35002f40 0x6c>;
> +    };

Keep only one example.


Best regards,
Krzysztof
Nik Bune April 2, 2023, 2:07 p.m. UTC | #3
Hello!

Thank you for your review Rob, Krzysztof.

Incorporated all reviews comments in v2 version of the patch
https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230402135555.62507-1-n2h9z4@gmail.com/

Kind regards,
Nikita.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt b/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
deleted file mode 100644
index 2b86a00e351d..000000000000
--- a/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
+++ /dev/null
@@ -1,15 +0,0 @@ 
-Broadcom Kona Family Watchdog Timer
------------------------------------
-
-This watchdog timer is used in the following Broadcom SoCs:
-  BCM11130, BCM11140, BCM11351, BCM28145, BCM28155
-
-Required properties:
-  - compatible = "brcm,bcm11351-wdt", "brcm,kona-wdt";
-  - reg: memory address & range
-
-Example:
-	watchdog@35002f40 {
-		compatible = "brcm,bcm11351-wdt", "brcm,kona-wdt";
-		reg = <0x35002f40 0x6c>;
-	};
diff --git a/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml b/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml
new file mode 100644
index 000000000000..ffc4870bdb57
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml
@@ -0,0 +1,45 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/brcm,kona-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom Kona Family Watchdog Timer
+
+description: |
+  This watchdog timer is used in the following Broadcom SoCs:
+  BCM11130, BCM11140, BCM11351, BCM28145, BCM28155
+
+maintainers:
+  - Rob Herring <robh@kernel.org>
+
+allOf:
+  - $ref: "watchdog.yaml#"
+
+properties:
+  compatible:
+    enum:
+      - brcm,bcm11351-wdt
+      - brcm,kona-wdt
+
+  reg:
+    maxItems: 1
+    description: memory address & range
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    watchdog@35002f40 {
+      compatible = "brcm,bcm11351-wdt";
+      reg = <0x35002f40 0x6c>;
+    };
+  - |
+    watchdog@35002f40 {
+      compatible = "brcm,kona-wdt";
+      reg = <0x35002f40 0x6c>;
+    };