Devicetree
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: vjardin@free.fr
Cc: Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Michael Shych <michaelsh@nvidia.com>,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: hwmon: microchip,emc2305: add vcc-supply and #cooling-cells
Date: Mon, 24 Aug 2026 18:00:06 +0100	[thread overview]
Message-ID: <20260824-flashcard-renewably-badc0e011949@spud> (raw)
In-Reply-To: <20260824-for-upstream-dt-emc2305-vcc-cooling-v1-1-cd3b53dfb5d4@free.fr>

[-- Attachment #1: Type: text/plain, Size: 2333 bytes --]

On Mon, Aug 24, 2026 at 05:42:59PM +0200, Vincent Jardin via B4 Relay wrote:
> From: Vincent Jardin <vjardin@free.fr>
> 
> Both properties are missing, so a board that supplies either fails with
> dtbs_check:
> 
>   fan-controller@2c (microchip,emc2305): '#cooling-cells', 'vcc-supply'
>   do not match any of the regexes: '^fan@[0-4]$', '^pinctrl-[0-9]+$'
> 
> The #cooling-cells property belongs to the controller node, which is
> where the driver actually registers.
> 
> Two cells is what that registration needs: a cooling-maps entry
> references the fan as <&emc2305 min max>.
> 
> Two cells also documents what the driver supports today. The
> pwm-separate path registers one cooling device per PWM against the same
> node, and they all get cdev_id 0, so no cell count can tell them apart.
> That is a driver issue, noted here but not addressed.
> 
> The examples in this binding put that property on the fan@N subnodes
> instead, which does not match what the driver does: they are left alone
> here rather than changed blind.

That seems correct though and putting it in the device node when there's 4
fans that could interact with different zones seems wrong. Shouldn't the
driver be fixed instead?

> vcc-supply describes the chip's own rail, which matters on boards where
> the sensor sits behind a switched supply.
> 
> Signed-off-by: Vincent Jardin <vjardin@free.fr>
> ---
>  Documentation/devicetree/bindings/hwmon/microchip,emc2305.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/microchip,emc2305.yaml b/Documentation/devicetree/bindings/hwmon/microchip,emc2305.yaml
> index 8c2548539d7fd..47640214de100 100644
> --- a/Documentation/devicetree/bindings/hwmon/microchip,emc2305.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/microchip,emc2305.yaml
> @@ -44,6 +44,11 @@ properties:
>             - 0 (Open-Drain)
>             - 1 (Push-Pull)
>  
> +  vcc-supply: true
> +
> +  "#cooling-cells":
> +    const: 2
> +
>  patternProperties:
>    '^fan@[0-4]$':
>      $ref: fan-common.yaml#
> 
> ---
> base-commit: 0a0d1d55dad570724bf8c7ea83409639cfb4be9b
> change-id: 20260824-for-upstream-dt-emc2305-vcc-cooling-251655c99ef8
> 
> Best regards,
> -- 
> Vincent Jardin <vjardin@free.fr>
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2026-08-24 17:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24 15:42 [PATCH] dt-bindings: hwmon: microchip,emc2305: add vcc-supply and #cooling-cells Vincent Jardin via B4 Relay
2026-08-24 15:56 ` sashiko-bot
2026-08-24 17:00 ` Conor Dooley [this message]
2026-08-24 17:36   ` Guenter Roeck
2026-08-24 22:20     ` Vincent Jardin
2026-08-24 22:19   ` Vincent Jardin

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=20260824-flashcard-renewably-badc0e011949@spud \
    --to=conor@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=michaelsh@nvidia.com \
    --cc=robh@kernel.org \
    --cc=vjardin@free.fr \
    /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