summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@chromium.org>2015-01-16 17:12:52 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-24 00:32:29 +0000
commitc1717516549d16f9230d6e1123c647f2d3c7b62e (patch)
tree0f5899b1cf6c623e84a36f05584b9db421c76420
parent4ada7739f96152ca688617c291c572417e34240c (diff)
downloadchrome-ec-c1717516549d16f9230d6e1123c647f2d3c7b62e.tar.gz
driver: BQ27621 scaling bug fix
Design capacity and Design Energy need to be multiplied by the scaling factor. BUG=None TEST=Manual test with hadoken without charging enabled. Observed the battery level decreasing. BRANCH=NONE Change-Id: Icb5f74766c2416128277df4fe1bb00fc7307f5e5 Signed-off-by: Myles Watson <mylesgw@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/242890 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--driver/battery/bq27621_g1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/battery/bq27621_g1.c b/driver/battery/bq27621_g1.c
index 12e7e42892..e08e700522 100644
--- a/driver/battery/bq27621_g1.c
+++ b/driver/battery/bq27621_g1.c
@@ -128,9 +128,9 @@
#define BQ27621_TAPER_RATE ((int)(BQ27621_DESIGN_CAPACITY/ \
(0.1 * BQ27621_TAPER_CURRENT)))
-#define BQ27621_SCALED_DESIGN_CAPACITY ((int)(BQ27621_DESIGN_CAPACITY / \
+#define BQ27621_SCALED_DESIGN_CAPACITY ((int)(BQ27621_DESIGN_CAPACITY * \
BQ27621_SCALE_FACTOR))
-#define BQ27621_SCALED_DESIGN_ENERGY ((int)(BQ27621_DESIGN_CAPACITY / \
+#define BQ27621_SCALED_DESIGN_ENERGY ((int)(BQ27621_DESIGN_CAPACITY * \
BQ27621_SCALE_FACTOR))
/*