aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/ab8500_fg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index adc02004e7a3..1601d27ce5d4 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -36,7 +36,7 @@
36 36
37#define MILLI_TO_MICRO 1000 37#define MILLI_TO_MICRO 1000
38#define FG_LSB_IN_MA 1627 38#define FG_LSB_IN_MA 1627
39#define QLSB_NANO_AMP_HOURS_X10 1129 39#define QLSB_NANO_AMP_HOURS_X10 1071
40#define INS_CURR_TIMEOUT (3 * HZ) 40#define INS_CURR_TIMEOUT (3 * HZ)
41 41
42#define SEC_TO_SAMPLE(S) (S * 4) 42#define SEC_TO_SAMPLE(S) (S * 4)
@@ -672,11 +672,11 @@ int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *res)
672 /* 672 /*
673 * Convert to unit value in mA 673 * Convert to unit value in mA
674 * Full scale input voltage is 674 * Full scale input voltage is
675 * 66.660mV => LSB = 66.660mV/(4096*res) = 1.627mA 675 * 63.160mV => LSB = 63.160mV/(4096*res) = 1.542mA
676 * Given a 250ms conversion cycle time the LSB corresponds 676 * Given a 250ms conversion cycle time the LSB corresponds
677 * to 112.9 nAh. Convert to current by dividing by the conversion 677 * to 107.1 nAh. Convert to current by dividing by the conversion
678 * time in hours (250ms = 1 / (3600 * 4)h) 678 * time in hours (250ms = 1 / (3600 * 4)h)
679 * 112.9nAh assumes 10mOhm, but fg_res is in 0.1mOhm 679 * 107.1nAh assumes 10mOhm, but fg_res is in 0.1mOhm
680 */ 680 */
681 val = (val * QLSB_NANO_AMP_HOURS_X10 * 36 * 4) / 681 val = (val * QLSB_NANO_AMP_HOURS_X10 * 36 * 4) /
682 (1000 * di->bm->fg_res); 682 (1000 * di->bm->fg_res);