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

Commit 2278a16b authored by Rama Krishna Phani A's avatar Rama Krishna Phani A Committed by Siddartha Mohanadoss
Browse files

hwmon: qpnp-adc-voltage: Update default scale function for VADC



ADC channel values that uses absolute calibration and default
scale function are out of range.

Scale voltage should be multiplied by thousand for non absolute
channels that uses default scale function. Update the condition
accordingly.

Change-Id: Ibfa35109e4bf930bb495fff8fa6494d51b12a76b
Signed-off-by: default avatarRama Krishna Phani A <rphani@codeaurora.org>
parent 718b9859
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1186,6 +1186,7 @@ int32_t qpnp_adc_scale_default(struct qpnp_vadc_chip *vadc,
	} else {
		qpnp_adc_scale_with_calib_param(adc_code, adc_properties,
					chan_properties, &scale_voltage);
		if (!chan_properties->calib_type == CALIB_ABSOLUTE)
			scale_voltage *= 1000;
	}