Skip to content

Commit b4b163b

Browse files
mrhpearsongregkh
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 <[email protected]> Closes: https://lore.kernel.org/platform-driver-x86/[email protected]/T/#m5f5b9ae31d3fbf30d7d9a9d76c15fb3502dfd903 Signed-off-by: Mark Pearson <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Armin Wolf <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent f9adb4a commit b4b163b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ enum tpacpi_hkey_event_t {
232232
/* Thermal events */
233233
TP_HKEY_EV_ALARM_BAT_HOT = 0x6011, /* battery too hot */
234234
TP_HKEY_EV_ALARM_BAT_XHOT = 0x6012, /* battery critically hot */
235+
TP_HKEY_EV_ALARM_BAT_LIM_CHANGE = 0x6013, /* battery charge limit changed*/
235236
TP_HKEY_EV_ALARM_SENSOR_HOT = 0x6021, /* sensor too hot */
236237
TP_HKEY_EV_ALARM_SENSOR_XHOT = 0x6022, /* sensor critically hot */
237238
TP_HKEY_EV_THM_TABLE_CHANGED = 0x6030, /* windows; thermal table changed */
@@ -3778,6 +3779,10 @@ static bool hotkey_notify_6xxx(const u32 hkey, bool *send_acpi_ev)
37783779
pr_alert("THERMAL EMERGENCY: battery is extremely hot!\n");
37793780
/* recommended action: immediate sleep/hibernate */
37803781
break;
3782+
case TP_HKEY_EV_ALARM_BAT_LIM_CHANGE:
3783+
pr_debug("Battery Info: battery charge threshold changed\n");
3784+
/* User changed charging threshold. No action needed */
3785+
return true;
37813786
case TP_HKEY_EV_ALARM_SENSOR_HOT:
37823787
pr_crit("THERMAL ALARM: a sensor reports something is too hot!\n");
37833788
/* recommended action: warn user through gui, that */

0 commit comments

Comments
 (0)