power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist
Subsystems (4)
PATCH 1/1 power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist
The ACEPC T8 and T11 Cherry Trail Z8350 mini PCs use an AXP288 and as PCs, rather then portables, they does not have a battery. Still for some reason the AXP288 not only thinks there is a battery, it actually thinks it is discharging while the PC is running, slowly going to 0% full, causing userspace to shutdown the system due to the battery being critically low after a while.
This commit adds the ACEPC T8 and T11 to the axp288 fuel-gauge driver blacklist, so that we stop reporting bogus battery readings on this device.
--- drivers/power/supply/axp288_fuel_gauge.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/power/supply/axp288_fuel_gauge.c +20 -0
@@ -685,6 +685,26 @@ static void fuel_gauge_init_irq(struct axp288_fg_info *info)* detection reports one despite it not being there. */ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = { + { +/* ACEPC T8 Cherry Trail Z8350 mini PC */ + .matches = { +DMI_EXACT_MATCH (DMI_BOARD_VENDOR ,"To be filled by O.E.M." ), +DMI_EXACT_MATCH (DMI_BOARD_NAME ,"Cherry Trail CR" ), +DMI_EXACT_MATCH (DMI_PRODUCT_SKU ,"T8" ), +/* also match on somewhat unique bios-version */ +DMI_EXACT_MATCH (DMI_BIOS_VERSION ,"1.000" ), + }, + }, + { +/* ACEPC T11 Cherry Trail Z8350 mini PC */ + .matches = { +DMI_EXACT_MATCH (DMI_BOARD_VENDOR ,"To be filled by O.E.M." ), +DMI_EXACT_MATCH (DMI_BOARD_NAME ,"Cherry Trail CR" ), +DMI_EXACT_MATCH (DMI_PRODUCT_SKU ,"T11" ), +/* also match on somewhat unique bios-version */ +DMI_EXACT_MATCH (DMI_BIOS_VERSION ,"1.000" ), + }, + }, {/* Intel Cherry Trail Compute Stick, Windows version */ .matches = {
Signature · 1 line
2.21.0
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
Quoted 20 lines · Sasha Levin
Hi,
[This is an automated email]
This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all
The bot has tested the following trees: v5.0.9, v4.19.36, v4.14.113, v4.9.170, v4.4.178, v3.18.138.
v5.0.9: Build OK!
v4.19.36: Build OK!
v4.14.113: Failed to apply! Possible dependencies:
b60c75b6a502("power: supply:axp288_fuel_gauge: Do not register our psy on (some) HDMI sticks")v4.9.170: Failed to apply! Possible dependencies:
b60c75b6a502("power: supply:axp288_fuel_gauge: Do not register our psy on (some) HDMI sticks")v4.4.178: Failed to apply! Possible dependencies:
b60c75b6a502("power: supply:axp288_fuel_gauge: Do not register our psy on (some) HDMI sticks")
Quoted 7 lines
v3.18.138: Failed to apply! Possible dependencies:
5a5bf49088f4 ("X-Power AXP288 PMIC Fuel Gauge Driver") b60c75b6a502 ("power: supply: axp288_fuel_gauge: Do not register our psy on (some) HDMI sticks") c1a281e34dae ("power: Add support for DA9150 Charger")How should we proceed with this patch?
Just applying it to 4.19.x and 5.0.x is fine.
Regards,
Hans
Hi,
Quoted 7 lines · Hans de Goede
The ACEPC T8 and T11 Cherry Trail Z8350 mini PCs use an AXP288 and as PCs, rather then portables, they does not have a battery. Still for some reason the AXP288 not only thinks there is a battery, it actually thinks it is discharging while the PC is running, slowly going to 0% full, causing userspace to shutdown the system due to the battery being critically low after a while.
Quoted 7 lines
This commit adds the ACEPC T8 and T11 to the axp288 fuel-gauge driver blacklist, so that we stop reporting bogus battery readings on this device.
Signed-off-by Hans de Goede <[email protected]>---
Thanks, you made my day 😂. Queued to power-supply's for-next branch.
-- Sebastian
Quoted 37 lines
drivers/power/supply/axp288_fuel_gauge.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)drivers/power/supply/axp288_fuel_gauge.c +20
-0@@ -685,6 +685,26 @@ static void fuel_gauge_init_irq(struct axp288_fg_info *info)* detection reports one despite it not being there. */ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = { + { +/* ACEPC T8 Cherry Trail Z8350 mini PC */ + .matches = { +DMI_EXACT_MATCH (DMI_BOARD_VENDOR ,"To be filled by O.E.M." ), +DMI_EXACT_MATCH (DMI_BOARD_NAME ,"Cherry Trail CR" ), +DMI_EXACT_MATCH (DMI_PRODUCT_SKU ,"T8" ), +/* also match on somewhat unique bios-version */ +DMI_EXACT_MATCH (DMI_BIOS_VERSION ,"1.000" ), + }, + }, + { +/* ACEPC T11 Cherry Trail Z8350 mini PC */ + .matches = { +DMI_EXACT_MATCH (DMI_BOARD_VENDOR ,"To be filled by O.E.M." ), +DMI_EXACT_MATCH (DMI_BOARD_NAME ,"Cherry Trail CR" ), +DMI_EXACT_MATCH (DMI_PRODUCT_SKU ,"T11" ), +/* also match on somewhat unique bios-version */ +DMI_EXACT_MATCH (DMI_BIOS_VERSION ,"1.000" ), + }, + }, {/* Intel Cherry Trail Compute Stick, Windows version */ .matches = {Signature · 1 line
2.21.0