mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
Merge "power: smb5-lib: Improve the charge-termination WA handling"
This commit is contained in:
commit
2940ea5d3d
1 changed files with 4 additions and 1 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/pmic-voter.h>
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/usb/typec.h>
|
||||
#include <linux/alarmtimer.h>
|
||||
#include "smb5-lib.h"
|
||||
#include "smb5-reg.h"
|
||||
#include "schgm-flash.h"
|
||||
|
|
@ -5205,7 +5206,9 @@ static void smblib_eval_chg_termination(struct smb_charger *chg, u8 batt_status)
|
|||
* battery. Trigger the charge termination WA once charging is completed
|
||||
* to prevent overcharing.
|
||||
*/
|
||||
if ((batt_status == TERMINATE_CHARGE) && (pval.intval == 100)) {
|
||||
if ((batt_status == TERMINATE_CHARGE) && (pval.intval == 100) &&
|
||||
(ktime_to_ms(alarm_expires_remaining(/* alarm not pending */
|
||||
&chg->chg_termination_alarm)) <= 0)) {
|
||||
chg->cc_soc_ref = 0;
|
||||
chg->last_cc_soc = 0;
|
||||
chg->term_vbat_uv = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue