Home
last modified time | relevance | path

Searched hist:e2b018cb (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/power/supply/
H A Dbq27xxx_battery.ce2b018cb Mon Jan 02 03:13:26 CST 2023 Sicelo A. Mhlongo <absicsz@gmail.com> power: supply: bq27xxx: fix reporting critical level

The EDV1/SOC1 flag is set when the battery voltage drops below the
threshold set in EEPROM. From observing the capacity_level reported by
the driver, and reading the datasheet, EDV1 remains set even when
EDVF/SOCF gets set. Thus, bq27xxx_battery_capacity_level() never reaches
the CAPACITY_LEVEL_CRITICAL code path, since CAPACITY_LEVEL_LOW takes
precedence.

This commit fixes the issue by swapping the order in which the flags are
tested. It was tested with bq27200 in the Nokia N900.

Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>