power: supply: axp288_fuel_gauge: Make "T3 MRD" no_battery_list DMI entry more generic
authorHans de Goede <hdegoede@redhat.com>
Thu, 17 Jun 2021 19:27:02 +0000 (21:27 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 29 Jun 2021 22:08:52 +0000 (00:08 +0200)
commit3a06b912a5ce494d7b7300b12719c562be7b566f
tree8e87aa0cde3adf6eb85f39d95c0faf5a4bd1a92b
parent0973e96b4bbd19aa50881a8e0e4653b824420de6
power: supply: axp288_fuel_gauge: Make "T3 MRD" no_battery_list DMI entry more generic

It turns out that the "T3 MRD" DMI_BOARD_NAME value is used in a lot of
different Cherry Trail x5-z8300 / x5-z8350 based Mini-PC / HDMI-stick
models from Ace PC / Meegopad / MinisForum / Wintel (and likely also
other vendors).

Most of the other DMI strings on these boxes unfortunately contain various
generic values like "Default string" or "$(DEFAULT_STRING)", so we cannot
match on them. These devices do have their chassis-type correctly set to a
value of "3" (desktop) which is a pleasant surprise, so also match on that.

This should avoid the quirk accidentally also getting applied to laptops /
tablets (which do actually have a battery). Although in my quite large
database of Bay and Cherry Trail based devices DMIdecode dumps I don't
have any laptops / tables with a board-name of "T3 MRD", so this should
not be an issue.

BugLink: https://askubuntu.com/questions/1206714/how-can-a-mini-pc-be-stopped-from-being-detected-as-a-laptop-with-a-battery/
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/axp288_fuel_gauge.c