[PATCH v1 1/2] dt-bindings: iio: temperature: Add support for NCT7718W

Ming Yu posted 2 patches 1 year, 2 months ago
[PATCH v1 1/2] dt-bindings: iio: temperature: Add support for NCT7718W
Posted by Ming Yu 1 year, 2 months ago
Add devicetree binding document for Nuvoton NCT7718W thermal sensor.

Signed-off-by: Ming Yu <tmyu0@nuvoton.com>
---
 .../iio/temperature/nuvoton,nct7718.yaml      | 44 +++++++++++++++++++
 MAINTAINERS                                   |  6 +++
 2 files changed, 50 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml

diff --git a/Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml b/Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml
new file mode 100644
index 000000000000..a3573e3d454d
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/temperature/nuvoton,nct7718.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton NCT7718W Thermal Sensor IC
+
+maintainers:
+  - Ming Yu <tmyu0@nuvoton.com>
+
+description:
+  https://www.nuvoton.com/resource-files/Nuvoton_NCT7718W_Datasheet_V11.pdf
+
+properties:
+  compatible:
+    const: nuvoton,nct7718
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        temp-sensor@4c {
+            compatible = "nuvoton,nct7718";
+            reg = <0x4c>;
+            interrupt-parent = <&gpio0>;
+            interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
+        };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 67d2159406c2..6d147ce6b060 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16541,6 +16541,12 @@ F:	drivers/nubus/
 F:	include/linux/nubus.h
 F:	include/uapi/linux/nubus.h
 
+NUVOTON NCT7718W TEMPERATURE SENSOR DRIVER
+M:	Ming Yu <tmyu0@nuvoton.com>
+L:	linux-iio@vger.kernel.org
+S:	Supported
+F:	Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml
+
 NVIDIA (rivafb and nvidiafb) FRAMEBUFFER DRIVER
 M:	Antonino Daplas <adaplas@gmail.com>
 L:	linux-fbdev@vger.kernel.org
-- 
2.34.1
Re: [PATCH v1 1/2] dt-bindings: iio: temperature: Add support for NCT7718W
Posted by Conor Dooley 1 year, 2 months ago
On Tue, Nov 26, 2024 at 03:40:04PM +0800, Ming Yu wrote:
> Add devicetree binding document for Nuvoton NCT7718W thermal sensor.
> 
> Signed-off-by: Ming Yu <tmyu0@nuvoton.com>
> ---
>  .../iio/temperature/nuvoton,nct7718.yaml      | 44 +++++++++++++++++++
>  MAINTAINERS                                   |  6 +++
>  2 files changed, 50 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml b/Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml
> new file mode 100644
> index 000000000000..a3573e3d454d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml
> @@ -0,0 +1,44 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/temperature/nuvoton,nct7718.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Nuvoton NCT7718W Thermal Sensor IC
> +
> +maintainers:
> +  - Ming Yu <tmyu0@nuvoton.com>
> +
> +description:
> +  https://www.nuvoton.com/resource-files/Nuvoton_NCT7718W_Datasheet_V11.pdf
> +
> +properties:
> +  compatible:
> +    const: nuvoton,nct7718
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg

Please add the vdd supply as a required property.

> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        temp-sensor@4c {

The generic node name is actually temperature-sensor.

Thanks,
Conor.
Re: [PATCH v1 1/2] dt-bindings: iio: temperature: Add support for NCT7718W
Posted by Ming Yu 1 year, 2 months ago
Dear Conor,

Thank you for your comments,
I will make the modifications in the next patch.

Best regards,
Ming.

Conor Dooley <conor@kernel.org> 於 2024年11月27日 週三 上午1:58寫道:
>
> On Tue, Nov 26, 2024 at 03:40:04PM +0800, Ming Yu wrote:
> > Add devicetree binding document for Nuvoton NCT7718W thermal sensor.
> >
> > Signed-off-by: Ming Yu <tmyu0@nuvoton.com>
> > ---
> >  .../iio/temperature/nuvoton,nct7718.yaml      | 44 +++++++++++++++++++
> >  MAINTAINERS                                   |  6 +++
> >  2 files changed, 50 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml b/Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml
> > new file mode 100644
> > index 000000000000..a3573e3d454d
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/temperature/nuvoton,nct7718.yaml
> > @@ -0,0 +1,44 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/temperature/nuvoton,nct7718.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Nuvoton NCT7718W Thermal Sensor IC
> > +
> > +maintainers:
> > +  - Ming Yu <tmyu0@nuvoton.com>
> > +
> > +description:
> > +  https://www.nuvoton.com/resource-files/Nuvoton_NCT7718W_Datasheet_V11.pdf
> > +
> > +properties:
> > +  compatible:
> > +    const: nuvoton,nct7718
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
>
> Please add the vdd supply as a required property.
>
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        temp-sensor@4c {
>
> The generic node name is actually temperature-sensor.
>
> Thanks,
> Conor.