summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-loki-power.c
diff options
context:
space:
mode:
authorAnkita Garg <ankitag@nvidia.com>2014-01-15 15:10:23 -0800
committerDiwakar Tundlam <dtundlam@nvidia.com>2014-02-13 14:29:04 -0800
commit56180cdc957e1d1d09f990ab7737f2694b3c4b9f (patch)
tree7187e99ff4b9ab0102c38389d4bb2e85795a84e8 /arch/arm/mach-tegra/board-loki-power.c
parent3dfcb7ad7771d0910b2fa76a45022fce9a5ebc3e (diff)
arm: tegra: loki: Support to read battery temp through PMIC
This change enables reading the battery temperature through PMIC ADC. The adc value conversion to temperature is performed using a look-up table that maps the adc values to temp. The conversion table is based on values generated for Loki P2530 board. More details on the source of the table can be found in the bug. Bug 1408758 Change-Id: I24aa6eb4f23f9fb465da2e28105da5ecdd113683 Signed-off-by: Ankita Garg <ankitag@nvidia.com> Reviewed-on: http://git-master/r/356182 Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-loki-power.c')
-rw-r--r--arch/arm/mach-tegra/board-loki-power.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-loki-power.c b/arch/arm/mach-tegra/board-loki-power.c
index 5506867e893e..f67d93c2463e 100644
--- a/arch/arm/mach-tegra/board-loki-power.c
+++ b/arch/arm/mach-tegra/board-loki-power.c
@@ -369,6 +369,7 @@ static struct palmas_reg_init *loki_reg_init[PALMAS_NUM_REGS] = {
static struct iio_map palmas_adc_iio_maps[] = {
PALMAS_GPADC_IIO_MAP(IN1, "generic-adc-thermal.0", "thermistor"),
PALMAS_GPADC_IIO_MAP(IN3, "generic-adc-thermal.1", "tdiode"),
+ PALMAS_GPADC_IIO_MAP(IN4, "generic-adc-thermal.2", "tbat"),
PALMAS_GPADC_IIO_MAP(NULL, NULL, NULL),
};