Skip to contentSkip to conversation

dt-bindings: rtc: sprd,sc2731-rtc: convert to YAML

PATCH Applied Stanislav Jakubek 3 participants 3 messages Jul 6, 2024 – Sep 11, 2024

Subsystems (3)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: rtc: sprd,sc2731-rtc: convert to YAML

Convert the Spreadtrum SC2731 RTC bindings to DT schema. Rename file to match compatible.

---
 .../bindings/rtc/sprd,sc2731-rtc.yaml         | 49 +++++++++++++++++++
 .../bindings/rtc/sprd,sc27xx-rtc.txt          | 26 ----------
 2 files changed, 49 insertions(+), 26 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml
 delete mode 100644 Documentation/devicetree/bindings/rtc/sprd,sc27xx-rtc.txt
Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml new file +49 -0
new file mode 100644
index 000000000000..f3d20e976965
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/sprd,sc2731-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Spreadtrum SC2731 Real Time Clock
+
+maintainers:
+  - Orson Zhai <[email protected]>
+  - Baolin Wang <[email protected]>
+  - Chunyan Zhang <[email protected]>
+
+properties:
+  compatible:
+    const: sprd,sc2731-rtc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+allOf:
+  - $ref: rtc.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    pmic {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      rtc@280 {
+        compatible = "sprd,sc2731-rtc";
+        reg = <0x280>;
+        interrupt-parent = <&sc2731_pmic>;
+        interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+      };
+    };
+...
Documentation/devicetree/bindings/rtc/sprd,sc27xx-rtc.txt deleted +0 -26
deleted file mode 100644
index 1f5754299d31..000000000000
@@ -1,26 +0,0 @@
-Spreadtrum SC27xx Real Time Clock
-
-Required properties:
-- compatible: should be "sprd,sc2731-rtc".
-- reg: address offset of rtc register.
-- interrupts: rtc alarm interrupt.
-
-Example:
-
-	sc2731_pmic: pmic@0 {
-		compatible = "sprd,sc2731";
-		reg = <0>;
-		spi-max-frequency = <26000000>;
-		interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
-		interrupt-controller;
-		#interrupt-cells = <2>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		rtc@280 {
-			compatible = "sprd,sc2731-rtc";
-			reg = <0x280>;
-			interrupt-parent = <&sc2731_pmic>;
-			interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
-		};
-	};
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Stanislav Jakubek

Convert the Spreadtrum SC2731 RTC bindings to DT schema. Rename file to match compatible.

---
 .../bindings/rtc/sprd,sc2731-rtc.yaml         | 49 +++++++++++++++++++
 .../bindings/rtc/sprd,sc27xx-rtc.txt          | 26 ----------
 2 files changed, 49 insertions(+), 26 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml
 delete mode 100644 Documentation/devicetree/bindings/rtc/sprd,sc27xx-rtc.txt
Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml new file +2 -0
new file mode 100644
index 000000000000..f3d20e976965
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2

Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml line 12

Quoted 10 lines
Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml new file +10 -0
+---
+$id: http://devicetree.org/schemas/rtc/sprd,sc2731-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Spreadtrum SC2731 Real Time Clock
+
+maintainers:
+  - Orson Zhai <[email protected]>
+  - Baolin Wang <[email protected]>
+  - Chunyan Zhang <[email protected]>

This could just go to trivial-rtc.yaml.

Best regards,
Krzysztof