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

From: Antheas Kapenekakis

Date: Sat Sep 26 2026 - 17:53:13 EST


On Sat, 26 Sept 2026 at 23:36, Alexei Solcanu <alexei.solcanu@xxxxx> wrote:
>
> On Sat, 26 Sept 2026 at 22:32, Antheas Kapenekakis <lkml@xxxxxxxxxxx> wrote:
> > in my view adding all these functions is unneeded complexity. There
> > should be some simpler ternary way.
>
> Ok, I'll inline them as ternaries in v3.
>
> > Are you sure the correct number of fans are populated for each device
> > because of the visible entry? If yes, it is fine for this hunk. If no,
> > needs dynamic population for the struct in probe.
>
> Yes. The hwmon core only creates the attributes for which is_visible()
> returns non-zero. On the Win 5 both channels show up and work
> independently. Loading the driver on it with gpd_fan_board=win_mini
> works as expected: only fan1_input, pwm1 and pwm1_enable are created.
>
> > You also add a board match for win5, but doesnt the duo have two fans?
> [...]
> > Verify which duo-like devices implement two fans, it should be all of
> > them. I think Cryolitia has a Duo. Win Max 3 according to my GPD
> > contact has a duo layout. Unfortunately, I have no users so no DMI. So
> > it is at least Duo, Win Max 3, and Win5. Then make it so only these 3
> > devices (which should need no separation) report two fans and two fan
> > speeds throughout the driver.
>
> Agreed. In v3 I'll drop the separate win5 board and give the duo board
> data two channels instead, so the Duo and the Win 5 share it.
>
> I don't have a Win Max 3, so I can't add its DMI string, but I'll add
> the duo board data to gpd_module_drvdata, so gpd_fan_board=duo can be
> used on it until it has a DMI entry.
>
> I only have a Win 5, so I can't verify the Duo. On the Win 5 the
> second fan's RPM is at 0x0476/0x0477. Cryolitia, could you confirm
> that the Duo uses the same register?

Actually, recalling what we said last year duo had the new layout but
only one fan if I recall. Cryolitia can confirm. Then, only Max 3
needs confirming but even then you still need the new quirk so most of
this patch is good as is

Best,
Antheas

>