mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Cc: "Uwe Kleine-König" <ukleinek@kernel.org>,
	"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>,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org
Subject: Re: [hwmon-next PATCH v4 3/4] hwmon: (adt7470) Expose fan control via PWM framework
Date: Wed, 29 Jul 2026 13:23:31 -0700	[thread overview]
Message-ID: <d0625bd7-b5e0-4419-bcdd-9f7a5f8c38fa@roeck-us.net> (raw)
In-Reply-To: <CAJq09z5diKf9HpJ0B_7tyo2-2wPfojyG4pRY1qhRQ3fzx0Gr4A@mail.gmail.com>

On 7/29/26 12:05, Luiz Angelo Daros de Luca wrote:
> Hi Guenter, Uwe,
> 
> Thank you both for the detailed reviews. I hope I'll address all the
> points discussed in the next version.
> 
>>>> No, I won't accept this. It has to be either or. A pwm channel modeled as pwm
>>>> subsystem channel must not be visible via hwmon attributes.
>>>
>>> I didn't look in detail, but maybe my red line is a bit more lax. IMHO
>>> it's not OK to be able to modify a setting that results from pushing
>>> hwmon knobs using PWM operations or vice-versa. Switching between
>>> exclusive use at runtime is IMHO ok.
>>>
>> It is my call to make, and my call is either-or to avoid confusion.
> 
> Guenter, I agree and followed your strict "either-or" directive. If
> the device is bound via the PWM framework (i.e., #pwm-cells is present
> in the DT), the driver completely hides all legacy hwmon PWM
> attributes.
> 

Yes, that is what I am looking for, assuming it is per channel.
We do not want to unconditionally disable automatic fan control support
by the chip just because a single channel is used as generic PWM controller.

> One implementation detail: currently, the driver hides the hwmon
> attributes only if #pwm-cells is present and IS_REACHABLE(CONFIG_PWM)
> is true. If the DTS has #pwm-cells but the PWM framework is disabled
> in the kernel, it emits a dev_warn and falls back to exposing the
> hwmon attributes. Please let me know if you would prefer to
> unconditionally hide the hwmon attributes merely based on the presence
> of the DT property, regardless of the CONFIG_PWM state.
> 
No, that would be overkill.

Thanks,
Guenter


  reply	other threads:[~2026-07-29 20:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29  4:46 [hwmon-next PATCH v4 0/4] hwmon: (adt7470) Add PWM provider and thermal sensor support Luiz Angelo Daros de Luca
2026-07-29  4:46 ` [hwmon-next PATCH v4 1/4] dt-bindings: hwmon: add adi,adt7470 Luiz Angelo Daros de Luca
2026-07-29  4:46 ` [hwmon-next PATCH v4 2/4] hwmon: (adt7470) Add ADT7470_PWM_MAX macro Luiz Angelo Daros de Luca
2026-07-29  4:46 ` [hwmon-next PATCH v4 3/4] hwmon: (adt7470) Expose fan control via PWM framework Luiz Angelo Daros de Luca
2026-07-29  5:56   ` Guenter Roeck
2026-07-29 11:49     ` Uwe Kleine-König
2026-07-29 14:22       ` Guenter Roeck
2026-07-29 19:05         ` Luiz Angelo Daros de Luca
2026-07-29 20:23           ` Guenter Roeck [this message]
2026-07-29 21:34           ` Uwe Kleine-König
2026-07-29 11:47   ` Uwe Kleine-König
2026-07-29  4:46 ` [hwmon-next PATCH v4 4/4] hwmon: (adt7470) Add thermal zone sensor support Luiz Angelo Daros de Luca

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=d0625bd7-b5e0-4419-bcdd-9f7a5f8c38fa@roeck-us.net \
    --to=linux@roeck-us.net \
    --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=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

all inboxes | Powered by JetHome®