[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1360932310-30065-6-git-send-email-lee.jones@linaro.org>
Date: Fri, 15 Feb 2013 12:44:35 +0000
From: Lee Jones <lee.jones@...aro.org>
To: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: arnd@...db.de, linus.walleij@...ricsson.com,
cbouatmailru@...il.com, sameo@...ux.intel.com,
Martin Bergstrom <martin.bergstrom@...ricsson.com>,
Lee Jones <lee.jones@...aro.org>
Subject: [PATCH 05/40] ab8500-fg: Report unscaled capacity
From: Martin Bergstrom <martin.bergstrom@...ricsson.com>
Unscaled capacity should be reported for POWER_SUPPLY_PROP_CAPACITY.
Signed-off-by: Martin Bergstrom <martin.bergstrom@...ricsson.com>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@...ricsson.com>
Tested-by: Jonas ABERG <jonas.aberg@...ricsson.com>
---
drivers/power/ab8500_fg.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index 9d33546..44d8faa 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -2153,9 +2153,7 @@ static int ab8500_fg_get_property(struct power_supply *psy,
val->intval = di->bat_cap.prev_mah;
break;
case POWER_SUPPLY_PROP_CAPACITY:
- if (di->bm->capacity_scaling)
- val->intval = di->bat_cap.cap_scale.scaled_cap;
- else if (di->flags.batt_unknown && !di->bm->chg_unknown_bat &&
+ if (di->flags.batt_unknown && !di->bm->chg_unknown_bat &&
di->flags.batt_id_received)
val->intval = 100;
else
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists