From c1717516549d16f9230d6e1123c647f2d3c7b62e Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Fri, 16 Jan 2015 17:12:52 -0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/242890 Reviewed-by: Randall Spangler --- driver/battery/bq27621_g1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'driver/battery') 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)) /* -- cgit v1.2.1