mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e
@ 2025-02-21 16:48 Mingcong Bai
  2025-02-21 16:53 ` Mingcong Bai
  2025-03-03 12:46 ` Ilpo Järvinen
  0 siblings, 2 replies; 3+ messages in thread
From: Mingcong Bai @ 2025-02-21 16:48 UTC (permalink / raw)
  To: linux-kernel, platform-driver-x86, ibm-acpi-devel
  Cc: Kexy Biscuit, Mingcong Bai, Fan Yang, Xi Ruoyao,
	Henrique de Moraes Holschuh, Hans de Goede, Ilpo Järvinen

Based on the dmesg messages from the original reporter:

[    4.964073] ACPI: \_SB_.PCI0.LPCB.EC__.HKEY: BCTG evaluated but flagged as error
[    4.964083] thinkpad_acpi: Error probing battery 2

Lenovo ThinkPad X131e also needs this battery quirk.

Reported-by: Fan Yang <804284660@qq.com>
Tested-by: Fan Yang <804284660@qq.com>
Co-developed-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
---
 drivers/platform/x86/thinkpad_acpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 1fcb0f99695a7..64765c6939a50 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -9960,6 +9960,7 @@ static const struct tpacpi_quirk battery_quirk_table[] __initconst = {
 	 * Individual addressing is broken on models that expose the
 	 * primary battery as BAT1.
 	 */
+	TPACPI_Q_LNV('G', '8', true),       /* ThinkPad X131e */
 	TPACPI_Q_LNV('8', 'F', true),       /* Thinkpad X120e */
 	TPACPI_Q_LNV('J', '7', true),       /* B5400 */
 	TPACPI_Q_LNV('J', 'I', true),       /* Thinkpad 11e */
-- 
2.48.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e
  2025-02-21 16:48 [PATCH] platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e Mingcong Bai
@ 2025-02-21 16:53 ` Mingcong Bai
  2025-03-03 12:46 ` Ilpo Järvinen
  1 sibling, 0 replies; 3+ messages in thread
From: Mingcong Bai @ 2025-02-21 16:53 UTC (permalink / raw)
  To: linux-kernel, platform-driver-x86, ibm-acpi-devel
  Cc: Kexy Biscuit, Fan Yang, Xi Ruoyao, Henrique de Moraes Holschuh,
	Hans de Goede, Ilpo Järvinen, stable

Hi all,

在 2025/2/22 00:48, Mingcong Bai 写道:
> Based on the dmesg messages from the original reporter:
> 
> [    4.964073] ACPI: \_SB_.PCI0.LPCB.EC__.HKEY: BCTG evaluated but flagged as error
> [    4.964083] thinkpad_acpi: Error probing battery 2
> 
> Lenovo ThinkPad X131e also needs this battery quirk.
> 
> Reported-by: Fan Yang <804284660@qq.com>
> Tested-by: Fan Yang <804284660@qq.com>
> Co-developed-by: Xi Ruoyao <xry111@xry111.site>
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
> ---
>   drivers/platform/x86/thinkpad_acpi.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index 1fcb0f99695a7..64765c6939a50 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -9960,6 +9960,7 @@ static const struct tpacpi_quirk battery_quirk_table[] __initconst = {
>   	 * Individual addressing is broken on models that expose the
>   	 * primary battery as BAT1.
>   	 */
> +	TPACPI_Q_LNV('G', '8', true),       /* ThinkPad X131e */
>   	TPACPI_Q_LNV('8', 'F', true),       /* Thinkpad X120e */
>   	TPACPI_Q_LNV('J', '7', true),       /* B5400 */
>   	TPACPI_Q_LNV('J', 'I', true),       /* Thinkpad 11e */

I forgot to include a Cc to stable. This issue dates back to as far as 
5.19 (the oldest version available in our distro repository).

Cc: stable@vger.kernel.org

Best Regards,
Mingcong Bai

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e
  2025-02-21 16:48 [PATCH] platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e Mingcong Bai
  2025-02-21 16:53 ` Mingcong Bai
@ 2025-03-03 12:46 ` Ilpo Järvinen
  1 sibling, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2025-03-03 12:46 UTC (permalink / raw)
  To: linux-kernel, platform-driver-x86, ibm-acpi-devel, Mingcong Bai
  Cc: Kexy Biscuit, Fan Yang, Xi Ruoyao, Henrique de Moraes Holschuh,
	Hans de Goede

On Sat, 22 Feb 2025 00:48:24 +0800, Mingcong Bai wrote:

> Based on the dmesg messages from the original reporter:
> 
> [    4.964073] ACPI: \_SB_.PCI0.LPCB.EC__.HKEY: BCTG evaluated but flagged as error
> [    4.964083] thinkpad_acpi: Error probing battery 2
> 
> Lenovo ThinkPad X131e also needs this battery quirk.
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo-fixes branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e
      commit: d0d10eaedcb53740883d7e5d53c5e15c879b48fb

--
 i.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-03 12:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-21 16:48 [PATCH] platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e Mingcong Bai
2025-02-21 16:53 ` Mingcong Bai
2025-03-03 12:46 ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®