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

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

Merge "power: bcl_peripheral: Update the ADC to vbat conversion formula"

parents 095af2aa 516699a6
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -22,3 +22,11 @@
&ibb_regulator {
	qcom,qpnp-ibb-discharge-resistor = <300>;
};

&spmi_bus {
	qcom,pmi8994@2 {
		bcl@4200 {
			qcom,inhibit-derating-ua = <0>;
		};
	};
};
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ static void convert_adc_to_vbat_val(int *val)
	if (!bcl_perph)
		return;
	perph_data = &bcl_perph->param[BCL_PARAM_VOLTAGE];
	*val = (*val * perph_data->scaling_factor)
	*val = ((*val + 2) * perph_data->scaling_factor)
		* (100 + (perph_data->gain_factor_num * perph_data->gain)
		* BCL_CONSTANT_NUM  / perph_data->gain_factor_den)
		/ 100;