Re: [PATCH v3] hwmon: (cros_ec) Add set and get target fan RPM function

From: Sung-Chi Li
Date: Tue Mar 25 2025 - 22:44:49 EST


On Tue, Mar 25, 2025 at 05:55:07AM -0700, Guenter Roeck wrote:
> On 3/25/25 00:16, Sung-Chi Li wrote:
>
> >
> > Currently, when sending the fan control setting to EC, EC will switch to manual
> > fan control automatically. When system suspends or shuts down, fans are going
> > back to automatic control (based on current EC implementation).
> >
> > Do you mean the driver should not change the fan control method if there is no
> > pwmY_enable implemented, or it is the user that should first explicitly set the
> > fan to manualy mode, then the user can specify the desired fan speed?
>
> The user should first set the fan control method to manual mode.
>
> Unless I am missing something, setting manual mode means that pwmY_enable does have
> to be implemented.
>
> Note that the suspend/resume behavior is unexpected. The user would assume that the fan
> control method is still in the same mode after resume. If resume reverts to automatic mode,
> there should be a suspend/resume handler which restores the mode on resume.
>
> Thanks,
> Guenter
>

Thank you for the clarification, I think it is better to implement some missing
EC control points (For 1. getting a fan PWM value, and 2. for getting individual
fan target speed) first. After that, I will continue working on this seris.
Thanks all for these details that I missed.