Re: [RESEND PATCH v2] hwmon: (max6639) : Allow setting target RPM

From: Guenter Roeck
Date: Mon Apr 07 2025 - 18:54:21 EST


On Fri, Apr 04, 2025 at 05:26:45PM +0530, Your Name wrote:
> From: Naresh Solanki <naresh.solanki@xxxxxxxxxxxxx>
>
> Currently, during startup, the fan is set to its maximum RPM by default,
> which may not be suitable for all use cases.
> This patch introduces support for specifying a target RPM via the Device
> Tree property "target-rpm".
>
> Changes:
> - Added `target_rpm` field to `max6639_data` structure to store the
> target RPM for each fan channel.
> - Modified `max6639_probe_child_from_dt()` to read the `"target-rpm"`
> property from the Device Tree and set `target_rpm` accordingly.
> - Updated `max6639_init_client()` to use `target_rpm` to compute the
> initial PWM duty cycle instead of defaulting to full speed (120/120).
>
> Behavior:
> - If `"target-rpm"` is specified, the fan speed is set accordingly.
> - If `"target-rpm"` is not specified, the previous behavior (full speed
> at startup) is retained.
>
> This allows better control over fan speed during system initialization.
>
> Signed-off-by: Naresh Solanki <naresh.solanki@xxxxxxxxxxxxx>

Applied.

Thanks,
Guenter