Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Cc: "Guenter Roeck" <linux@roeck-us.net>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Chris Packham" <chris.packham@alliedtelesis.co.nz>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Darrick J. Wong" <djwong@us.ibm.com>,
	"Uwe Kleine-König" <ukleinek@kernel.org>,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org
Subject: Re: [PATCH v2 1/6] dt-bindings: hwmon: add binding for adi,adt7470
Date: Mon, 20 Jul 2026 08:47:37 +0200	[thread overview]
Message-ID: <20260720-placid-fanatic-shrimp-d2bcd2@quoll> (raw)
In-Reply-To: <20260717-adt7470_thermalzone-v2-1-a55147958fad@gmail.com>

On Fri, Jul 17, 2026 at 05:59:14PM -0300, Luiz Angelo Daros de Luca wrote:
> The Analog Devices ADT7470 is a temperature monitor and PWM fan
> controller. It supports up to 10 external temperature sensors and
> up to 4 PWM fan outputs.

A nit, subject: drop second/last, redundant "binding for". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v7.1-rc7/source/Documentation/devicetree/bindings/submitting-patches.rst#L23

> 
> Add the YAML device tree binding documentation for it. This includes

s/YAML//
There is no YAML in Devicetree.

> support for the thermal framework by defining the "#thermal-sensor-cells"
> property, and support for the PWM subsystem by defining the "#pwm-cells"
> property.
> 
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
> ---
>  .../devicetree/bindings/hwmon/adi,adt7470.yaml     | 62 ++++++++++++++++++++++
>  1 file changed, 62 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/adi,adt7470.yaml b/Documentation/devicetree/bindings/hwmon/adi,adt7470.yaml
> new file mode 100644
> index 000000000000..14bb6359c91f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/adi,adt7470.yaml
> @@ -0,0 +1,62 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hwmon/adi,adt7470.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices ADT7470 hwmon sensor
> +
> +maintainers:
> +  - Luiz Angelo Daros de Luca <luizluca@gmail.com>
> +
> +description: |

Do not need '|' unless you need to preserve formatting.

> +  The ADT7470 is a temperature monitor and multiple PWM outputs.
> +  It supports monitoring up to 10 external temperature sensors and controlling
> +  up to four fans.

"controling fans" is confusing and suggests this is a fan controller, so
you would need to reference proper schema for that. It is just PWM
output, no? PWM output could also go to LEDs or motors (well, fan is a
motor).

> +
> +properties:
> +  compatible:
> +    const: adi,adt7470
> +
> +  reg:
> +    maxItems: 1
> +
> +  "#pwm-cells":
> +    const: 2
> +    description: |
> +      Number of cells in a PWM specifier.
> +      - The first cell is the PWM channel (0 to 3).
> +      - The second cell is the PWM period in nanoseconds.
> +
> +  "#thermal-sensor-cells":
> +    const: 1
> +    description: |

Do not need '|' unless you need to preserve formatting.

> +      Number of cells required to uniquely identify the temperature sensors.
> +      Valid index values are 0 to 9, corresponding to temp1 through temp10.
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        adt7470: hwmon@2f {
> +            compatible = "adi,adt7470";
> +            reg = <0x2f>;
> +            #pwm-cells = <2>;
> +            #thermal-sensor-cells = <1>;
> +        };
> +    };
> +
> +    fan0 {

Drio the node, not relevant. And then drop adt7470 label from hwmon
node.

> +        compatible = "pwm-fan";
> +        /* Connects to PWM channel 0 with a 50000 ns (20 kHz) period */
> +        pwms = <&adt7470 0 50000>;
> +        cooling-levels = <0 100 150 255>;
> +    };
> 
> -- 
> 2.55.0
> 

  parent reply	other threads:[~2026-07-20  6:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 20:59 [PATCH v2 0/6] hwmon: (adt7470) Add thermal zone and PWM provider support Luiz Angelo Daros de Luca
2026-07-17 20:59 ` [PATCH v2 1/6] dt-bindings: hwmon: add binding for adi,adt7470 Luiz Angelo Daros de Luca
2026-07-17 21:04   ` sashiko-bot
2026-07-20  3:23     ` Luiz Angelo Daros de Luca
2026-07-20  6:47   ` Krzysztof Kozlowski [this message]
2026-07-20 14:24     ` Guenter Roeck
2026-07-21  2:12       ` Luiz Angelo Daros de Luca
2026-07-23  6:10         ` Uwe Kleine-König
2026-07-20 10:03   ` Uwe Kleine-König
2026-07-23  2:48     ` Luiz Angelo Daros de Luca
2026-07-23  6:05       ` Uwe Kleine-König
2026-07-17 20:59 ` [PATCH v2 2/6] hwmon: (adt7470) Fix fans stuck in manual mode on I2C errors Luiz Angelo Daros de Luca
2026-07-17 21:10   ` sashiko-bot
2026-07-17 20:59 ` [PATCH v2 3/6] hwmon: (adt7470) Fix busy-loop and I2C flooding in update thread Luiz Angelo Daros de Luca
2026-07-17 21:12   ` sashiko-bot
2026-07-17 20:59 ` [PATCH v2 4/6] hwmon: (adt7470) Add ADT7470_PWM_MAX macro Luiz Angelo Daros de Luca
2026-07-17 21:05   ` sashiko-bot
2026-07-17 20:59 ` [PATCH v2 5/6] hwmon: (adt7470) Register as a PWM provider Luiz Angelo Daros de Luca
2026-07-17 21:17   ` sashiko-bot
2026-07-19 14:49   ` Guenter Roeck
2026-07-19 17:04   ` Uwe Kleine-König
2026-07-17 20:59 ` [PATCH v2 6/6] hwmon: (adt7470) Add thermal zone sensor support Luiz Angelo Daros de Luca
2026-07-17 21:09   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260720-placid-fanatic-shrimp-d2bcd2@quoll \
    --to=krzk@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=djwong@us.ibm.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=luizluca@gmail.com \
    --cc=robh@kernel.org \
    --cc=ukleinek@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox