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

Commit ca7f9efe authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qpnp-fg: fix capacity learning wake-up source handling"

parents 7d3f9aa5 a24252e6
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -3028,11 +3028,8 @@ static void fg_cap_learning_work(struct work_struct *work)
		goto fail;
	}

	if (chip->wa_flag & USE_CC_SOC_REG) {
		mutex_unlock(&chip->learning_data.learning_lock);
		fg_relax(&chip->capacity_learning_wakeup_source);
		return;
	}
	if (chip->wa_flag & USE_CC_SOC_REG)
		goto fail;

	fg_mem_lock(chip);

@@ -3063,6 +3060,8 @@ static void fg_cap_learning_work(struct work_struct *work)
		pr_info("total_cc_uah = %lld\n", chip->learning_data.cc_uah);

fail:
	if (chip->wa_flag & USE_CC_SOC_REG)
		fg_relax(&chip->capacity_learning_wakeup_source);
	mutex_unlock(&chip->learning_data.learning_lock);
	return;