Skip to content
Commit e2b018cb authored by Sicelo A. Mhlongo's avatar Sicelo A. Mhlongo Committed by Sebastian Reichel
Browse files

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: default avatarSicelo A. Mhlongo <absicsz@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 4651b6b7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment