linux/drivers/platform
Jonathan Teh f7224958b9 platform/x86: thinkpad_acpi: Fix errors reading battery thresholds
[ Upstream commit 53e977b1d5 ]

Check whether the battery supports the relevant charge threshold before
reading the value to silence these errors:

thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND
ACPI: \_SB_.PCI0.LPC_.EC__.HKEY: BCTG: evaluate failed
thinkpad_acpi: acpi_evalf(BCSG, dd, ...) failed: AE_NOT_FOUND
ACPI: \_SB_.PCI0.LPC_.EC__.HKEY: BCSG: evaluate failed

when reading the charge thresholds via sysfs on platforms that do not
support them such as the ThinkPad T400.

Fixes: 2801b9683f ("thinkpad_acpi: Add support for battery thresholds")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=202619
Signed-off-by: Jonathan Teh <jonathan.teh@outlook.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://patch.msgid.link/MI0P293MB01967B206E1CA6F337EBFB12926CA@MI0P293MB0196.ITAP293.PROD.OUTLOOK.COM
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-04-18 10:33:09 +02:00
..
chrome platform/chrome: cros_ec_lightbar: Fix response size initialization 2026-03-04 07:19:32 -05:00
goldfish platform/goldfish: Convert pipe tasklet to threaded irq 2021-01-27 14:57:06 +01:00
mellanox platform/mellanox: mlxbf-tmfifo: fix vring_desc.len assignment 2025-07-10 15:57:43 +02:00
mips platform: mips: cpu_hwmon: Disable driver on unsupported hardware 2024-08-19 05:45:20 +02:00
olpc platform/olpc: Fix uninitialized data in debugfs write 2022-08-17 14:23:58 +02:00
surface platform/surface: aggregator_registry: Add support for Surface Laptop Go 3 2024-10-17 15:10:33 +02:00
x86 platform/x86: thinkpad_acpi: Fix errors reading battery thresholds 2026-04-18 10:33:09 +02:00
Kconfig platform: Add Surface platform directory 2020-10-27 12:51:03 +01:00
Makefile platform: Add Surface platform directory 2020-10-27 12:51:03 +01:00