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

Commit be0ba3f8 authored by David Keitel's avatar David Keitel Committed by Gerrit - the friendly Code Review server
Browse files

power: qpnp-charger: report trickle charging correctly



When trickle charging the battery FET is off. Fix
the charging report logic to address this and
correctly report the trickle charging status.

Change-Id: I46a13c219e8147e36f8bf3fd749b496c0af9ca11
CRs-Fixed: 587259
Signed-off-by: default avatarDavid Keitel <dkeitel@codeaurora.org>
parent a525e5d0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -2030,7 +2030,7 @@ get_prop_batt_status(struct qpnp_chg_chip *chip)
		return POWER_SUPPLY_CHARGE_TYPE_NONE;
	}

	if (chgr_sts & TRKL_CHG_ON_IRQ && bat_if_sts & BAT_FET_ON_IRQ)
	if ((chgr_sts & TRKL_CHG_ON_IRQ) && !(bat_if_sts & BAT_FET_ON_IRQ))
		return POWER_SUPPLY_STATUS_CHARGING;
	if (chgr_sts & FAST_CHG_ON_IRQ && bat_if_sts & BAT_FET_ON_IRQ)
		return POWER_SUPPLY_STATUS_CHARGING;