Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367491
b: refs/heads/master
c: 0577610
h: refs/heads/master
i:
  367489: 9f08d65
  367487: 9186cc3
v: v3
  • Loading branch information
lme00437 authored and Lee Jones committed Mar 7, 2013
1 parent dd07a9c commit 426adfa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4d3b4aa58ac9e18029c4d0259630414cffd3ba76
refs/heads/master: 0577610e0e6b431a1503cc5d78e8178e0dd59948
8 changes: 4 additions & 4 deletions trunk/drivers/power/ab8500_fg.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#define MILLI_TO_MICRO 1000
#define FG_LSB_IN_MA 1627
#define QLSB_NANO_AMP_HOURS_X10 1129
#define QLSB_NANO_AMP_HOURS_X10 1071
#define INS_CURR_TIMEOUT (3 * HZ)

#define SEC_TO_SAMPLE(S) (S * 4)
Expand Down Expand Up @@ -672,11 +672,11 @@ int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *res)
/*
* Convert to unit value in mA
* Full scale input voltage is
* 66.660mV => LSB = 66.660mV/(4096*res) = 1.627mA
* 63.160mV => LSB = 63.160mV/(4096*res) = 1.542mA
* Given a 250ms conversion cycle time the LSB corresponds
* to 112.9 nAh. Convert to current by dividing by the conversion
* to 107.1 nAh. Convert to current by dividing by the conversion
* time in hours (250ms = 1 / (3600 * 4)h)
* 112.9nAh assumes 10mOhm, but fg_res is in 0.1mOhm
* 107.1nAh assumes 10mOhm, but fg_res is in 0.1mOhm
*/
val = (val * QLSB_NANO_AMP_HOURS_X10 * 36 * 4) /
(1000 * di->bm->fg_res);
Expand Down

0 comments on commit 426adfa

Please sign in to comment.