Re: [PATCH v2 2/2] hwmon: (gpd-fan) Register both fans on the GPD Win 5

From: Guenter Roeck

Date: Mon Sep 28 2026 - 07:05:49 EST


On Sat, Sep 26, 2026 at 04:11:21PM -0400, Alexei Solcanu via B4 Relay wrote:
> From: Alexei Solcanu <alexei.solcanu@xxxxx>
>
> The GPD Win 5 uses gpd_duo_drvdata, which exposes a single fan and pwm
> channel: pwm1 writes the same duty cycle to both fans, and fan1_input
> only reads the first fan's RPM.
>
> The two fans have independent registers. Fan 1 uses duty cycle 0x047A
> and RPM 0x0478/0x0479, fan 2 uses duty cycle 0x047B and RPM
> 0x0476/0x0477. A duty cycle of 0 returns that fan to EC control.
>
> Add separate board data for the Win 5 and register fan1/pwm1 and
> fan2/pwm2, one channel per fan. Boards with a single fan are unchanged.
>
> This changes behaviour on the Win 5: pwm1 and pwm1_enable now control
> only the first fan. The second fan stays under EC control unless pwm2
> and pwm2_enable are used.
>
> The GPD Duo keeps a single channel, since it is untested and its
> second fan's RPM register is unknown.
>
> Tested on a GPD Win 5 (G1618-05).
>
> Suggested-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> Assisted-by: LLM
> Signed-off-by: Alexei Solcanu <alexei.solcanu@xxxxx>

Another patch new revision sent as reply of a previous one.

Where does that idea come from ? Can _someone_ please let me know ?
It seems like a contagious disease, but no one is willing to admit
where they caught it.

Guenter