From: "Uwe Kleine-König" <ukleinek@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Richard Weinberger <richard@nod.at>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-pwm <linux-pwm@vger.kernel.org>,
linux-hwmon <linux-hwmon@vger.kernel.org>,
julian friedrich <julian.friedrich@frequentis.com>
Subject: Re: [PATCH] [RFC] hwmon: nct6775: Register fan PWMs as PWM chip
Date: Fri, 27 Feb 2026 21:02:09 +0100 [thread overview]
Message-ID: <aaH3ZgfMiYuRhvp4@monoceros> (raw)
In-Reply-To: <163f68da-c31b-4ee6-a187-a81d14202311@roeck-us.net>
[-- Attachment #1: Type: text/plain, Size: 2914 bytes --]
Hello,
On Fri, Feb 27, 2026 at 12:17:00AM -0800, Guenter Roeck wrote:
> Hi Richard,
>
> On 2/26/26 23:46, Richard Weinberger wrote:
> > Hello Guenter,
> >
> > ----- Ursprüngliche Mail -----
> > > Von: "Guenter Roeck" <linux@roeck-us.net>
> > > > - Exporting a PWM for external use is only allowed when the fan mode
> > > > is set to manual or off.
> > > > - As soon as a PWM is exported, changing its configuration is no
> > > > longer possible through the hwmon sysfs interface, reading is
> > > > still allowed.
> > > > - Changing the PWM period is not supported. IMHO, it is too risky
> > > > since the PWMs usually control system fans and similar components.
> > > > - Reading and decoding the current PWM period is only supported for
> > > > one chip variant so far, for all other chips, a fixed period of
> > > > 100ms is assumed.
> > > >
> > >
> > > This is a good start, but I'll want to see stronger safeguards.
> > > - Creating a pwmchip entry for a pwm channel must be triggered by
> > > device property data, obtained either from devicetree or through
> > > DMI or through device properties embedded in ACPI data. For each
> > > channel, this must be confirmed by checking that the channel is
> > > not associated with a fan control channel.
> >
> > In my case it's a x86 based industrial PC with direct access.
> > What safeguard do you suggest in this case? A module parameter?
> >
>
> Presumably it has DMI information or some other means to identify the system.
> That information can be used to set device properties, which would then be used
> in the probe function to determine if a channel is modeled as pwm channel.
> See device_add_software_node() and friends to get an idea how that works.
>
> How exactly those properties would look like needs to be documented in
> nuvoton,nct6775.yaml. I'd assume that the pwm channels would be described
> in there just like for any other pwm chips.
>
> > Also for ACPI data, what exactly do you have in mind?
> >
> ACPI can be used to provide devicetree properties. The information is embedded
> in the DSDT table. Conceptually that is identical to devicetree data. That is
> not something you need to be concerned about unless you are responsible for that
> system and in control of the firmware. Technically the company selling that
> industrial PC should provide the information in the DSDT table, but of course
> that needs to be standardized first (and then they would have to actually use it).
That would imply that derRichard has to update the BIOS, or at least
fake some ACPI tables, right?
For me it would be good enough if the first consumer of a channel "wins"
and others get a -EBUSY. Compared to describing that in dt or acpi this
has the advantage that the use can be changed without a reboot.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-02-27 20:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 12:51 [PATCH] [RFC] hwmon: nct6775: Register fan PWMs as PWM chip Richard Weinberger
2026-02-26 17:54 ` Uwe Kleine-König
2026-02-26 18:36 ` Richard Weinberger
2026-02-27 19:57 ` Uwe Kleine-König
2026-02-26 22:38 ` Guenter Roeck
2026-02-27 7:46 ` Richard Weinberger
2026-02-27 8:17 ` Guenter Roeck
2026-02-27 20:02 ` Uwe Kleine-König [this message]
2026-02-27 20:59 ` Guenter Roeck
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=aaH3ZgfMiYuRhvp4@monoceros \
--to=ukleinek@kernel.org \
--cc=julian.friedrich@frequentis.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=richard@nod.at \
/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