Re: [PATCH] [RFC] hwmon: nct6775: Register fan PWMs as PWM chip
From: Richard Weinberger
Date: Fri Feb 27 2026 - 02:47:17 EST
Hello Guenter,
----- Ursprüngliche Mail -----
> Von: "Guenter Roeck" <linux@xxxxxxxxxxxx>
>> - 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?
Also for ACPI data, what exactly do you have in mind?
> - If a pwm channel is configured as pwmchip, it must not be used for fan
> control, meaning the hwmon properties associated with that channel
> must not be created.
Ok.
> This will retain current functionality while enabling support for using
> pwm channels for purposes other than fan control.
>
> Thanks,
> Guenter