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

Commit d4cdfa3f authored by Ram Chandrasekar's avatar Ram Chandrasekar Committed by Gerrit - the friendly Code Review server
Browse files

power: bcl_peripheral: Account derated threshold for false trigger



Use derated battery current threshold value for
determining false trigger. Otherwise a trigger from
deadtime threshold will be ignored by the driver.

CRs-Fixed: 808415
Change-Id: I309de953f76a8202dbd205f1716d20c5d8a5f62f
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent f989dc68
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -662,6 +662,8 @@ static irqreturn_t bcl_handle_ibat(int irq, void *data)
			pr_err("Error clearing max/min reg. err:%d\n", ret);
		thresh_value = perph_data->high_trip;
		convert_adc_to_ibat_val(&thresh_value);
		/* Account threshold trip from PBS threshold for dead time */
		thresh_value -= perph_data->inhibit_derating_ua;
		if (perph_data->trip_val < thresh_value) {
			pr_debug("False Ibat high trip. ibat:%d ibat_thresh_val:%d\n",
				perph_data->trip_val, thresh_value);