All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Vishnu Sankar <vishnuocv@gmail.com>
Cc: Huang Wei <huangwei@kylinos.cn>, Hans de Goede <hansg@kernel.org>,
	 Mark Pearson <mpearson-lenovo@squebb.ca>,
	 "Derek J . Clark" <derekjohn.clark@gmail.com>,
	Rong Zhang <i@rong.moe>,
	 Henrique de Moraes Holschuch <hmh@hmh.eng.br>,
	 platform-driver-x86@vger.kernel.org,
	ibm-acpi-devel@lists.sourceforge.net,
	 LKML <linux-kernel@vger.kernel.org>,
	klorico2@lenovo.com,  vsankar@lenovo.com
Subject: Re: [PATCH] platform/x86: thinkpad acpi: Fix fan speed reporting on X9 Gen 1
Date: Tue, 1 Dec 2026 01:08:49 +0200 (EET)	[thread overview]
Message-ID: <4ae33045-26bf-3cab-e914-51e46ba3cb10@linux.intel.com> (raw)
In-Reply-To: <CABxCQKtECpcti+Hos+o5GUNQv2AqAZE1Pyf_DrR7aMzX=3WF=g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2418 bytes --]

On Tue, 1 Dec 2026, Vishnu Sankar wrote:

> Hi Huang Wei,
> 
> Thanks for the review.
> 
> On Fri, Nov 27, 2026 at 4:02 PM Huang Wei <huangwei@kylinos.cn> wrote:
> >
> > 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.
> >
> Thanks for the review, and for the background from the thermal side.
> 
> Yes. The X9 EC does not latch, so the LSB-first rule doesn't
> apply there, but that isn't obvious from the code.
> 
> Hans, Ilpo, I can either send a v2 adding a short comment in
> fan_read_rpm(), or a small
> follow-up patch on top if you'd rather take this one as is. Whichever
> is easier for you.
> > Either way, that's a nit, not an objection:
> >
> > Reviewed-by: Huang Wei <huangwei@kylinos.cn>

v2 is easier for me. Thanks.

-- 
 i.

  reply	other threads:[~2026-11-30 23:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  8:59 [PATCH] platform/x86: thinkpad_acpi: Fix fan speed reporting on X9 Gen 1 Vishnu Sankar
2026-11-27  1:57 ` Mark Pearson
2026-11-27  7:01 ` [PATCH] platform/x86: thinkpad acpi: " Huang Wei
2026-11-30 23:03   ` Vishnu Sankar
2026-11-30 23:08     ` Ilpo Järvinen [this message]
2026-11-27 13:25 ` [PATCH] platform/x86: thinkpad_acpi: " Rong Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ae33045-26bf-3cab-e914-51e46ba3cb10@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=derekjohn.clark@gmail.com \
    --cc=hansg@kernel.org \
    --cc=hmh@hmh.eng.br \
    --cc=huangwei@kylinos.cn \
    --cc=i@rong.moe \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=klorico2@lenovo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpearson-lenovo@squebb.ca \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=vishnuocv@gmail.com \
    --cc=vsankar@lenovo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.