summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/max17048_battery.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/power/max17048_battery.c b/drivers/power/max17048_battery.c
index c3ed6715e356..8345dc7b14a6 100644
--- a/drivers/power/max17048_battery.c
+++ b/drivers/power/max17048_battery.c
@@ -206,7 +206,8 @@ static int max17048_get_property(struct power_supply *psy,
val->intval = chip->status;
break;
case POWER_SUPPLY_PROP_VOLTAGE_NOW:
- val->intval = chip->vcell;
+ /* unit is uV */
+ val->intval = chip->vcell * 1000;
break;
case POWER_SUPPLY_PROP_CAPACITY:
val->intval = chip->soc;
@@ -218,7 +219,8 @@ static int max17048_get_property(struct power_supply *psy,
val->intval = chip->capacity_level;
break;
case POWER_SUPPLY_PROP_VOLTAGE_OCV:
- val->intval = max17048_get_ocv(chip);
+ /* unit is uV */
+ val->intval = max17048_get_ocv(chip) * 1000;
break;
case POWER_SUPPLY_PROP_TEMP:
/* show 1 places of decimals, 681 means 68.1C */