power: supply: axp288_fuel_gauge: Add a no_current_sense_res module_param
authorHans de Goede <hdegoede@redhat.com>
Thu, 6 Jan 2022 11:06:08 +0000 (12:06 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 1 Feb 2022 13:29:34 +0000 (14:29 +0100)
commit210bc22c5d3d894cd032e0957035933945266d71
tree51bf659cc216de38f0536070bf2d7ac36fabc5b2
parent30abb3d07929137bf72327560e1595508a692c4e
power: supply: axp288_fuel_gauge: Add a no_current_sense_res module_param

Some boards with an AXP288 fuel-gauge appear to have a broken (approx.
2 milli-ohm instead of 10) current sense resistor.

This makes the coulomb-counter part of the fuel-gauge useless, but the
OCV based capacity reporting is still working. Add a no_current_sense_res
module_param to disable use of the coulomb-counter using parts of the
fuel-gauge to allow users to work around this.

Note this is a module parameter and not done through DMI quirks, since
this seems to be a defect on some boards, not something which all boards
of the same model share.

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