diff mbox series

[V2,1/2] dt-bindings: rtc: atcrtc100: Add atcrtc100 bindings

Message ID 20240617082507.3968910-2-cl634@andestech.com
State New
Headers show
Series Add andes atcrtc100 RTC driver | expand

Commit Message

CL Wang June 17, 2024, 8:25 a.m. UTC
Add YAML bindings for Andes atcrtc100 RTC.

Signed-off-by: CL Wang <cl634@andestech.com>
---
 .../bindings/rtc/andes,atcrtc100-rtc.yaml     | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/andes,atcrtc100-rtc.yaml

Comments

Krzysztof Kozlowski June 17, 2024, 8:52 a.m. UTC | #1
On 17/06/2024 10:25, CL Wang wrote:
> Add YAML bindings for Andes atcrtc100 RTC.

A nit, subject: drop second/last, redundant "bindings". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18

> 
> Signed-off-by: CL Wang <cl634@andestech.com>
> ---
>  .../bindings/rtc/andes,atcrtc100-rtc.yaml     | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/rtc/andes,atcrtc100-rtc.yaml
> 
> diff --git a/Documentation/devicetree/bindings/rtc/andes,atcrtc100-rtc.yaml b/Documentation/devicetree/bindings/rtc/andes,atcrtc100-rtc.yaml
> new file mode 100644
> index 000000000000..86cecb30c889
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/andes,atcrtc100-rtc.yaml

Use compatible as filename.

> @@ -0,0 +1,39 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/andes,atcrtc100-rtc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Andes, ATCRTC100 on-SoC RTC
> +
> +allOf:
> +  - $ref: rtc.yaml#

allOf goes after maintainers.

> +
> +maintainers:
> +  - CL Wang <cl634@andestech.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - andestech,atcrtc100
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    minItems: 2

This must be specific. Describe the items instead (items: with -
description: for each).

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +additionalProperties: false

Instead:
unevaluatedProperties: false



Best regards,
Krzysztof
Krzysztof Kozlowski June 17, 2024, 8:55 a.m. UTC | #2
On 17/06/2024 10:25, CL Wang wrote:
> Add YAML bindings for Andes atcrtc100 RTC.
> 
> Signed-off-by: CL Wang <cl634@andestech.com>

I should have ignored this patch... Not tested.

<form letter>
Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.

Tools like b4 or scripts/get_maintainer.pl provide you proper list of
people, so fix your workflow. Tools might also fail if you work on some
ancient tree (don't, instead use mainline), work on fork of kernel
(don't, instead use mainline) or you ignore some maintainers (really
don't). Just use b4 and everything should be fine, although remember
about `b4 prep --auto-to-cc` if you added new patches to the patchset.

You missed at least devicetree list (maybe more), so this won't be
tested by automated tooling. Performing review on untested code might be
a waste of time, thus I will skip this patch entirely till you follow
the process allowing the patch to be tested.

Please kindly resend and include all necessary To/Cc entries.
</form letter>

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/rtc/andes,atcrtc100-rtc.yaml b/Documentation/devicetree/bindings/rtc/andes,atcrtc100-rtc.yaml
new file mode 100644
index 000000000000..86cecb30c889
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/andes,atcrtc100-rtc.yaml
@@ -0,0 +1,39 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/andes,atcrtc100-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Andes, ATCRTC100 on-SoC RTC
+
+allOf:
+  - $ref: rtc.yaml#
+
+maintainers:
+  - CL Wang <cl634@andestech.com>
+
+properties:
+  compatible:
+    enum:
+      - andestech,atcrtc100
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    minItems: 2
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    rtc@f0300000 {
+        compatible = "andestech,atcrtc100";
+        reg = <0xf0300000 0x100>;
+        interrupts = <1>, <2>;
+    };