2022-07-12 07:45:32

by Li-hao Kuo

[permalink] [raw]
Subject: [PATCH v10 2/2] dt-bindings: thermal: Add Sunplus schema

Add bindings for Sunplus thermal driver

Signed-off-by: Li-hao Kuo <[email protected]>
---
Changes in v10:
- Fix wrong indentation.
- Change the setting of compatible.
- Mosdify the setting of remove funciton.

.../bindings/thermal/sunplus,thermal.yaml | 43 ++++++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 44 insertions(+)
create mode 100644 Documentation/devicetree/bindings/thermal/sunplus,thermal.yaml

diff --git a/Documentation/devicetree/bindings/thermal/sunplus,thermal.yaml b/Documentation/devicetree/bindings/thermal/sunplus,thermal.yaml
new file mode 100644
index 0000000..52094da
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/sunplus,thermal.yaml
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright (C) Sunplus Co., Ltd.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/sunplus,thermal.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sunplus Thermal controller
+
+maintainers:
+ - Li-hao Kuo <[email protected]>
+
+properties:
+ compatible:
+ enum:
+ - sunplus,sp7021-thermal
+
+ reg:
+ maxItems: 1
+
+ nvmem-cells:
+ maxItems: 1
+
+ nvmem-cell-names:
+ const: calib
+
+required:
+ - compatible
+ - reg
+ - nvmem-cells
+ - nvmem-cell-names
+
+additionalProperties: false
+
+examples:
+ - |
+ thermal@9c000280 {
+ compatible = "sunplus,sp7021-thermal";
+ reg = <0x9c000280 0xc>;
+ nvmem-cells = <&calib>;
+ nvmem-cell-names = "calib";
+ };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 23bde07..a8c44eb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19107,6 +19107,7 @@ SUNPLUS THERMAL DRIVER
M: Li-hao Kuo <[email protected]>
L: [email protected]
S: Maintained
+F: Documentation/devicetree/bindings/thermal/sunplus_thermal.yaml
F: drivers/thermal/sunplus_thermal.c

SUNPLUS UART DRIVER
--
2.7.4


2022-07-13 08:46:32

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v10 2/2] dt-bindings: thermal: Add Sunplus schema

On 12/07/2022 09:30, Li-hao Kuo wrote:
> Add bindings for Sunplus thermal driver
>
> Signed-off-by: Li-hao Kuo <[email protected]>
> ---
> Changes in v10:
> - Fix wrong indentation.
> - Change the setting of compatible.
> - Mosdify the setting of remove funciton.
>
> .../bindings/thermal/sunplus,thermal.yaml | 43 ++++++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 44 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/thermal/sunplus,thermal.yaml
>
> diff --git a/Documentation/devicetree/bindings/thermal/sunplus,thermal.yaml b/Documentation/devicetree/bindings/thermal/sunplus,thermal.yaml
> new file mode 100644
> index 0000000..52094da
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/thermal/sunplus,thermal.yaml
> @@ -0,0 +1,43 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright (C) Sunplus Co., Ltd.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/thermal/sunplus,thermal.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Sunplus Thermal controller
> +
> +maintainers:
> + - Li-hao Kuo <[email protected]>
> +
> +properties:
> + compatible:
> + enum:
> + - sunplus,sp7021-thermal
> +
> + reg:
> + maxItems: 1
> +
> + nvmem-cells:
> + maxItems: 1
> +
> + nvmem-cell-names:
> + const: calib
> +
> +required:
> + - compatible
> + - reg
> + - nvmem-cells
> + - nvmem-cell-names
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + thermal@9c000280 {
> + compatible = "sunplus,sp7021-thermal";
> + reg = <0x9c000280 0xc>;
> + nvmem-cells = <&calib>;
> + nvmem-cell-names = "calib";
> + };
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 23bde07..a8c44eb 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -19107,6 +19107,7 @@ SUNPLUS THERMAL DRIVER
> M: Li-hao Kuo <[email protected]>
> L: [email protected]
> S: Maintained
> +F: Documentation/devicetree/bindings/thermal/sunplus_thermal.yaml

Not a correct path anymore.

Around v7 I asked to name the file either sunplus,thermal.yaml or
sunplus,sp7021-thermal.yaml, but actually that was my mistake a bit
which I learnt later. The only recommended name is the latter, based on
compatible, so:
sunplus,sp7021-thermal.yaml

Please name the bindings "sunplus,sp7021-thermal.yaml", change the $id
and maintainers entry to new filename.

Best regards,
Krzysztof