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

Commit 2c4c40ac authored by Rupesh Kumar's avatar Rupesh Kumar Committed by Lee Jones
Browse files

ab8500-btemp: Defer btemp filtering while initialising



Due to btemp filtering enabled during init, temp values reported
to charge algorithm driver started from 0. As a result,charge
algorithm was going into wrong state and charging was stopped.

Signed-off-by: default avatarRupesh Kumar <rupesh.kumar@stericsson.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Reviewed-by: default avatarMarcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: default avatarMartin SJOBLOM <martin.w.sjoblom@stericsson.com>
Reviewed-by: default avatarPhilippe LANGLAIS <philippe.langlais@stericsson.com>
parent db43e6c4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -609,7 +609,6 @@ static void ab8500_btemp_periodic_work(struct work_struct *work)
		struct ab8500_btemp, btemp_periodic_work.work);

	if (!di->initialized) {
		di->initialized = true;
		/* Identify the battery */
		if (ab8500_btemp_id(di) < 0)
			dev_warn(di->dev, "failed to identify the battery\n");
@@ -622,8 +621,9 @@ static void ab8500_btemp_periodic_work(struct work_struct *work)
	 * same temperature. Else only allow 1 degree change from previous
	 * reported value in the direction of the new measurement.
	 */
	if (bat_temp == di->prev_bat_temp || !di->initialized) {
		if (di->bat_temp != di->prev_bat_temp || !di->initialized) {
	if ((bat_temp == di->prev_bat_temp) || !di->initialized) {
		if ((di->bat_temp != di->prev_bat_temp) || !di->initialized) {
			di->initialized = true;
			di->bat_temp = bat_temp;
			power_supply_changed(&di->btemp_psy);
		}