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 <yuanjiang.yu@unisoc.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* 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,