power: supply: axp288_fuel_gauge: Sort the DMI blacklist alphabetically
PATCH 1/2 power: supply: axp288_fuel_gauge: Sort the DMI blacklist alphabetically
The blacklist is getting big enough that it is good to have some sort of fixed order for it, sort it alphabetically.
--- drivers/power/supply/axp288_fuel_gauge.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/power/supply/axp288_fuel_gauge.c +7 -6
@@ -674,6 +674,7 @@ static void fuel_gauge_init_irq(struct axp288_fg_info *info)/* * Some devices have no battery (HDMI sticks) and the axp288 battery's * detection reports one despite it not being there. +* Please keep this listed sorted alphabetically. */ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = { {
@@ -696,6 +697,12 @@ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = { DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"), }, }, + { +/* ECS EF20EA */ + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"), + }, + }, {/* Intel Cherry Trail Compute Stick, Windows version */ .matches = {
@@ -719,12 +726,6 @@ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = { DMI_MATCH(DMI_BOARD_VERSION, "V1.1"), }, }, - { -/* ECS EF20EA */ - .matches = { - DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"), - }, - }, {} };
Signature · 1 line
2.23.0
PATCH 2/2 power: supply: axp288_fuel_gauge: Add Minix Neo Z83-4 to the blacklist
The Minix Neo Z83-4 is another mini PC using the AXP288 PMIC where the EFI code does not disable the charger part of the PMIC causing us to report battery readings (of always 100%) to userspace even though there is no battery in this wall-outlet powered device.
Add it to the blacklist to avoid the bogus battery status reporting.
--- drivers/power/supply/axp288_fuel_gauge.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/power/supply/axp288_fuel_gauge.c +7 -0
@@ -726,6 +726,13 @@ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = { DMI_MATCH(DMI_BOARD_VERSION, "V1.1"), }, }, + { + /* Minix Neo Z83-4 mini PC */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "MINIX"), + DMI_MATCH(DMI_PRODUCT_NAME, "Z83-4"), + } + }, {} };
Signature · 1 line
2.23.0
Sebastian Reichel
maintainerRe: [PATCH 2/2] power: supply: axp288_fuel_gauge: Add Minix Neo Z83-4 to the blacklist
Hi,
Quoted 9 lines · Hans de Goede
The Minix Neo Z83-4 is another mini PC using the AXP288 PMIC where the EFI code does not disable the charger part of the PMIC causing us to report battery readings (of always 100%) to userspace even though there is no battery in this wall-outlet powered device.
Add it to the blacklist to avoid the bogus battery status reporting.
Signed-off-by Hans de Goede <[email protected]>---
Thanks, queued.
-- Sebastian
Quoted 24 lines
drivers/power/supply/axp288_fuel_gauge.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/power/supply/axp288_fuel_gauge.c +7
-0@@ -726,6 +726,13 @@ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = { DMI_MATCH(DMI_BOARD_VERSION, "V1.1"), }, }, + { + /* Minix Neo Z83-4 mini PC */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "MINIX"), + DMI_MATCH(DMI_PRODUCT_NAME, "Z83-4"), + } + }, {} };Signature · 1 line
2.23.0
Sebastian Reichel
maintainerHi,
Quoted 5 lines · Hans de Goede
The blacklist is getting big enough that it is good to have some sort of fixed order for it, sort it alphabetically.
Signed-off-by Hans de Goede <[email protected]>---
Thanks, queued.
-- Sebastian
Quoted 44 lines
drivers/power/supply/axp288_fuel_gauge.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)drivers/power/supply/axp288_fuel_gauge.c +7
-6@@ -674,6 +674,7 @@ static void fuel_gauge_init_irq(struct axp288_fg_info *info)/* * Some devices have no battery (HDMI sticks) and the axp288 battery's * detection reports one despite it not being there. +* Please keep this listed sorted alphabetically. */ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = { {@@ -696,6 +697,12 @@ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = { DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"), }, }, + { +/* ECS EF20EA */ + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"), + }, + }, {/* Intel Cherry Trail Compute Stick, Windows version */ .matches = {@@ -719,12 +726,6 @@ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = { DMI_MATCH(DMI_BOARD_VERSION, "V1.1"), }, }, - { -/* ECS EF20EA */ - .matches = { - DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"), - }, - }, {} };Signature · 1 line
2.23.0