Re: [PATCH] platform/x86: thinkpad acpi: Fix fan speed reporting on X9 Gen 1
From: Huang Wei
Date: Fri Nov 27 2026 - 02:02:11 EST
On Thu, Nov 26, 2026 at 08:59:37AM +0000, Vishnu Sankar wrote:
> On the ThinkPad X9-14 Gen 1 and X9-15 Gen 1, the EC reports fan1 RPM
> in registers 0x84/0x85 and fan2 RPM in 0x82/0x83, and does not use
> bit 0 of 0x31 as a fan select. As a result fan2 reports fan1's speed,
> and every fan read overwrites an EC-owned bit.
For context from the other side of this history: we ran into the X9-14
Gen 1 EC layout back in August from the thermal side (bug 221228),
tried to reuse the non-standard quirk-table offsets at the time, and
reverted after the EC data showed the X9 has its own register layout -
so it's good to see the fan side done right this time, based on what
the EC actually implements.
Verified against the current source:
- The new quirk bits (TPACPI_FAN_2REG 0x0100, TPACPI_FAN_UNLATCH 0x0200)
don't collide with the existing fan quirk flags (0x0002/0x0004).
- With 2REG, fan_select_fan1()/fan_select_fan2() become no-ops, which
removes both problems in one go: fan2 no longer aliases fan1's
registers, and the 0x31 writes that clobbered an EC-owned bit are
gone.
- The UNLATCH re-read (MSB, LSB, MSB again until stable) is the right
guard for a non-latching register pair.
One thing worth a line in the commit message, maybe: the unlatched
path reads the MSB first, while the latched path keeps the "read 0x84
before 0x85" ordering that older EC firmware requires. Your testing
shows the X9 EC doesn't have that old quirk, but a note that the read
order is intentionally different would save the next person some
archaeology.
Either way, that's a nit, not an objection:
Reviewed-by: Huang Wei <huangwei@xxxxxxxxxx>