Skip to content

Commit 168e68d

Browse files
Yuanjiang Yusre
authored andcommitted
power: supply: sc27xx: Fix conditon to enable the FGU interrupt
We should allow to enable FGU interrupt to adjust the battery capacity, when charging status is POWER_SUPPLY_STATUS_DISCHARGING. Signed-off-by: Yuanjiang Yu <[email protected]> Signed-off-by: Baolin Wang <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 7cff19b commit 168e68d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/power/supply/sc27xx_fuel_gauge.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,8 @@ static int sc27xx_fgu_suspend(struct device *dev)
10981098
* If we are charging, then no need to enable the FGU interrupts to
10991099
* adjust the battery capacity.
11001100
*/
1101-
if (status != POWER_SUPPLY_STATUS_NOT_CHARGING)
1101+
if (status != POWER_SUPPLY_STATUS_NOT_CHARGING &&
1102+
status != POWER_SUPPLY_STATUS_DISCHARGING)
11021103
return 0;
11031104

11041105
ret = regmap_update_bits(data->regmap, data->base + SC27XX_FGU_INT_EN,

0 commit comments

Comments
 (0)