Skip to contentSkip to conversation

power: supply: axp288_fuel_gauge: Deny ROCK Pi X

PATCH Applied Guoyi Zhang 3 participants 3 messages Feb 21, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: supply: axp288_fuel_gauge: Deny ROCK Pi X

The ROCK Pi X is a single board computer without batteries using the AXP288 PMIC where the EFI code does not disable the charger part of the PMIC causing us to report a discharging battery with a continuously consumed battery charge to userspace.

Add it to the deny-list to avoid the bogus battery status reporting.

---
 drivers/power/supply/axp288_fuel_gauge.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/power/supply/axp288_fuel_gauge.c +8 -0
index 3be6f3b10..8f67f5d0d 100644
@@ -599,6 +599,14 @@ static const struct dmi_system_id axp288_quirks[] = {
 		},
 		.driver_data = NULL,
 	},
+	{
+		/* Radxa ROCK Pi X Single Board Computer */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_NAME, "ROCK Pi X"),
+			DMI_MATCH(DMI_BOARD_VENDOR, "Radxa"),
+		},
+		.driver_data = (void *)AXP288_QUIRK_NO_BATTERY,
+	},
 	{
 		/*
 		 * Various Ace PC/Meegopad/MinisForum/Wintel Mini-PCs/HDMI-sticks
Signature · 1 line
2.43.2
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 8 lines · Guoyi Zhang

The ROCK Pi X is a single board computer without batteries using the AXP288 PMIC where the EFI code does not disable the charger part of the PMIC causing us to report a discharging battery with a continuously consumed battery charge to userspace.

Add it to the deny-list to avoid the bogus battery status reporting.

Thanks, patch looks good to me:

Regards,

Hans

Quoted 23 lines
---
 drivers/power/supply/axp288_fuel_gauge.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/power/supply/axp288_fuel_gauge.c +8 -0
index 3be6f3b10..8f67f5d0d 100644
@@ -599,6 +599,14 @@ static const struct dmi_system_id axp288_quirks[] = {
 		},
 		.driver_data = NULL,
 	},
+	{
+		/* Radxa ROCK Pi X Single Board Computer */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_NAME, "ROCK Pi X"),
+			DMI_MATCH(DMI_BOARD_VENDOR, "Radxa"),
+		},
+		.driver_data = (void *)AXP288_QUIRK_NO_BATTERY,
+	},
 	{
 		/*
 		 * Various Ace PC/Meegopad/MinisForum/Wintel Mini-PCs/HDMI-sticks
#2 lore raw
In reply to Guoyi Zhang
Quoted 8 lines · Guoyi Zhang

The ROCK Pi X is a single board computer without batteries using the AXP288 PMIC where the EFI code does not disable the charger part of the PMIC causing us to report a discharging battery with a continuously consumed battery charge to userspace.

Add it to the deny-list to avoid the bogus battery status reporting.

[...]

Applied, thanks!

[1/1] power: supply: axp288_fuel_gauge: Deny ROCK Pi X

      commit: 9e6047c01159697cfd2f9b7788af9fe90fc7f544

Best regards,

Signature · 1 line
Sebastian Reichel <[email protected]>