Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 168e68d0 authored by Yuanjiang Yu's avatar Yuanjiang Yu Committed by Sebastian Reichel
Browse files

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: default avatarYuanjiang Yu <yuanjiang.yu@unisoc.com>
Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 7cff19b9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1098,7 +1098,8 @@ static int sc27xx_fgu_suspend(struct device *dev)
	 * If we are charging, then no need to enable the FGU interrupts to
	 * adjust the battery capacity.
	 */
	if (status != POWER_SUPPLY_STATUS_NOT_CHARGING)
	if (status != POWER_SUPPLY_STATUS_NOT_CHARGING &&
	    status != POWER_SUPPLY_STATUS_DISCHARGING)
		return 0;

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