Re: [PATCH v2 2/2] dt-bindings: rtc: Convert Sunplus RTC to json-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 09, 2021 at 02:38:18PM +0800, Vincent Shih wrote:
> Convert Sunplus RTC to json-schema

You are adding, not converting.

> 
> Signed-off-by: Vincent Shih <vincent.shih@xxxxxxxxxxx>

The author (From) must match S-o-b.

> ---
> Changes in v2:
>  - Removed the header file of dt-bindings/clock/sp-sp7021.h
>  - Removed the header file of dt-bindings/reset/sp-sp7021.h
>  - Modified some statements after removing the header files
> 
>  .../bindings/rtc/sunplus,sp7021-rtc.yaml           | 56 ++++++++++++++++++++++
>  MAINTAINERS                                        |  1 +
>  2 files changed, 57 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/rtc/sunplus,sp7021-rtc.yaml
> 
> diff --git a/Documentation/devicetree/bindings/rtc/sunplus,sp7021-rtc.yaml b/Documentation/devicetree/bindings/rtc/sunplus,sp7021-rtc.yaml
> new file mode 100644
> index 0000000..e74e015
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/sunplus,sp7021-rtc.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright (C) Sunplus Co., Ltd. 2021
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/sunplus,sp7021-rtc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Sunplus SP7021 Real Time Clock controller
> +
> +maintainers:
> +  - Vincent Shih <vincent.shih@xxxxxxxxxxx>
> +
> +properties:
> +  compatible:
> +    const: sunplus,sp7021-rtc
> +
> +  reg:
> +    maxItems: 1
> +
> +  reg-names:
> +    items:
> +      - const: rtc_reg

reg-names is kind of pointless here. At a minimum, '_reg' is redundant.

> +
> +  clocks:
> +    maxItems: 1
> +
> +  resets:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - clocks
> +  - resets
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    rtc: serial@9c003A00 {

rtc@9c003a00

> +        compatible = "sunplus,sp7021-rtc";
> +        reg = <0x9c003A00 0x80>;

Use consistent case for hex (lower case).

> +        reg-names = "rtc_reg";
> +        clocks = <&clkc 0x12>;
> +        resets = <&rstc 0x02>;
> +        interrupt-parent = <&intc>;
> +        interrupts = <163 IRQ_TYPE_EDGE_RISING>;
> +    };
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 6c1a535..c6774d1 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -17949,6 +17949,7 @@ SUNPLUS RTC DRIVER
>  M:	Vincent Shih <vincent.shih@xxxxxxxxxxx>
>  L:	linux-rtc@xxxxxxxxxxxxxxx
>  S:	Maintained
> +F:	Documentation/devicetree/bindings/rtc/sunplus,sp7021-rtc.yaml
>  F:	drivers/rtc/rtc-sunplus.c
>  
>  SUPERH
> -- 
> 2.7.4
> 
> 



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux