Re: [PATCH v2 1/2] dt-bindings: pwm: convert atmel pwm to json-schema

From
Krzysztof Kozlowski <hidden>
Date
2022-03-07 14:55:22
Also in
linux-arm-kernel, linux-pwm, lkml
Reply to
Sergiu Moga, 2022-03-07
On 07/03/2022 15:46, Sergiu Moga wrote:
quoted hunk ↗ jump to hunk
Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema
format.

Signed-off-by: Sergiu Moga <redacted>
---
 .../bindings/pwm/atmel,at91sam-pwm.yaml       | 42 +++++++++++++++++++
 .../devicetree/bindings/pwm/atmel-pwm.txt     | 35 ----------------
 2 files changed, 42 insertions(+), 35 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
 delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
diff --git a/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
new file mode 100644
index 000000000000..2d5dd51a6a55
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/atmel,at91sam-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Atmel/Microchip PWM controller
+
+allOf:
+  - $ref: "pwm.yaml#"
allOf by convention should go between maintaners and properties.
quoted hunk ↗ jump to hunk
+
+maintainers:
+  - Claudiu Beznea <claudiu.beznea@microchip.com>
+
+properties:
+  compatible:
+    enum:
+      - atmel,at91sam9rl-pwm
+      - atmel,sama5d3-pwm
+      - atmel,sama5d2-pwm
+      - microchip,sam9x60-pwm
+
+  reg:
+    maxItems: 1
+
+  "#pwm-cells":
+    const: 3
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: true
This has to be either additionalProperties:false or
"unevaluatedProperties:false".
quoted hunk ↗ jump to hunk
+
+examples:
+  - |
+        pwm0: pwm@f8034000 {
+                compatible = "atmel,at91sam9rl-pwm";
+                reg = <0xf8034000 0x400>;
+                #pwm-cells = <3>;
Also please change indentation to 2 or 4 spaces (like we use for all DTS
examples). Four is preferred (only personally).

You also need to update the path in MAINTAINERS.

Best regards,
Krzysztof
Thread (5 messages) 5 messages, 2 authors, last reply 2022-03-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help