hwmon: qpnp-adc-current: Add temperature compensation
Add temperature compensation parameters for PM8026 2.1.
Compensate the vbatt voltage for temperature variance above
25degC. Add similar compensation for current compensation.
Also update using the revid api's to check for PMIC revision
instead of using peripheral revision registers. Using
revid PMIC api's makes it easy to follow on what PMIC versions
are the temperature compensation being applied to. Depending
on VADC/IADC revision registers alone may not suffice since
there is no correlation between the individual peripheral
revision and the PMIC number. You could have the same
VADC revision on different PMIC's and to avoid such a
scenario use the PMIC revid.
Change-Id: I90adb1130b2e2461f762df774ddcd018e806cf78
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
6 files changed