]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitfa7dab8e3c47ef2cefeebc7311ed4577c0fe1375
tree51bf659cc216de38f0536070bf2d7ac36fabc5b2
parent05c8074db97b46d3b77388f626fca8015abe34e5
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