[PATCH v3 1/2] acpi: battery: Introduce Valve steamdeck devices quirk
From: Umang Jain
Date: Wed Oct 14 2026 - 16:45:27 EST
Introduce a battery quirk for Valve Steamdeck devices
ACPI_BATTERY_QUIRK_VALVE_STEAMDECK. This is required to detect
if a low-power supply unit is connected to the device, which can
report charging status through sysfs as "charging", even though in
reality, it is discharging. We shall read Battery Charge Time ("_BCT")
information to handle these cases, in a subsequent commit.
Signed-off-by: Umang Jain <uajain@xxxxxxxxxx>
---
drivers/acpi/battery.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 670853ec3a4d..fa20900bea0e 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -94,6 +94,14 @@ enum {
* on a full charge, but showing degradation in full charge cap.
*/
ACPI_BATTERY_QUIRK_DEGRADED_FULL_CHARGE,
+ /*
+ * Valve steamdeck devices can get discharged even when battery status
+ * is charging. This happens typically when low power supply unit is
+ * connected. To accurately determine this scenario, we shall read
+ * battery charge time ("_BCT"). This is the key differentiator to
+ * determine whether the steamdeck is actually charging or not.
+ */
+ ACPI_BATTERY_QUIRK_VALVE_STEAMDECK,
};
struct acpi_battery {
@@ -1057,6 +1065,18 @@ static void acpi_battery_quirks(struct acpi_battery *battery)
set_bit(ACPI_BATTERY_QUIRK_DEGRADED_FULL_CHARGE, &battery->flags);
battery->capacity_now = battery->full_charge_capacity;
}
+
+ if (test_bit(ACPI_BATTERY_QUIRK_VALVE_STEAMDECK, &battery->flags))
+ return;
+
+ if (dmi_name_in_vendors("Valve")) {
+ const char *name;
+
+ name = dmi_get_system_info(DMI_PRODUCT_NAME);
+ if ((name && (!strncmp("Jupiter", name, 7))) ||
+ (name && (!strncmp("Galileo", name, 7))))
+ set_bit(ACPI_BATTERY_QUIRK_VALVE_STEAMDECK, &battery->flags);
+ }
}
static int acpi_battery_update(struct acpi_battery *battery, bool resume)
--
2.55.0