Skip to content

Commit 49e7430

Browse files
mrhpearsonopsiff
authored andcommitted
platform/x86: thinkpad_acpi: Ignore battery threshold change event notification
[ Upstream commit 29e4e6b ] If user modifies the battery charge threshold an ACPI event is generated. Confirmed with Lenovo FW team this is only generated on user event. As no action is needed, ignore the event and prevent spurious kernel logs. Reported-by: Derek Barbosa <debarbos@redhat.com> Closes: https://lore.kernel.org/platform-driver-x86/7e9a1c47-5d9c-4978-af20-3949d53fb5dc@app.fastmail.com/T/#m5f5b9ae31d3fbf30d7d9a9d76c15fb3502dfd903 Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20250517023348.2962591-1-mpearson-lenovo@squebb.ca 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> (cherry picked from commit 513b27dbd126b8a838b601754cb3ae9cd91d2e95)
1 parent 7dc2849 commit 49e7430

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ enum tpacpi_hkey_event_t {
212212
/* Thermal events */
213213
TP_HKEY_EV_ALARM_BAT_HOT = 0x6011, /* battery too hot */
214214
TP_HKEY_EV_ALARM_BAT_XHOT = 0x6012, /* battery critically hot */
215+
TP_HKEY_EV_ALARM_BAT_LIM_CHANGE = 0x6013, /* battery charge limit changed*/
215216
TP_HKEY_EV_ALARM_SENSOR_HOT = 0x6021, /* sensor too hot */
216217
TP_HKEY_EV_ALARM_SENSOR_XHOT = 0x6022, /* sensor critically hot */
217218
TP_HKEY_EV_THM_TABLE_CHANGED = 0x6030, /* windows; thermal table changed */
@@ -3942,6 +3943,10 @@ static bool hotkey_notify_6xxx(const u32 hkey,
39423943
pr_alert("THERMAL EMERGENCY: battery is extremely hot!\n");
39433944
/* recommended action: immediate sleep/hibernate */
39443945
break;
3946+
case TP_HKEY_EV_ALARM_BAT_LIM_CHANGE:
3947+
pr_debug("Battery Info: battery charge threshold changed\n");
3948+
/* User changed charging threshold. No action needed */
3949+
return true;
39453950
case TP_HKEY_EV_ALARM_SENSOR_HOT:
39463951
pr_crit("THERMAL ALARM: a sensor reports something is too hot!\n");
39473952
/* recommended action: warn user through gui, that */

0 commit comments

Comments
 (0)