]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
power: lc709203f: report voltage/current in uV/uA
authorLaxman Dewangan <ldewangan@nvidia.com>
Tue, 15 Apr 2014 10:48:49 +0000 (16:18 +0530)
committerRiham Haidar <rhaidar@nvidia.com>
Tue, 6 May 2014 17:50:26 +0000 (10:50 -0700)
As per unit details for power supply, all voltage and current
should be in uV and uA respectively until specified.

Hence changing the voltage_now to uV and current_now to uA.

bug 1499795

Change-Id: I20b2d1b81ff4be7652a41d84fdd7a79efbb0f5e5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/396752
Reviewed-on: http://git-master/r/405644
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

drivers/power/lc709203f_battery.c

index f31e98e4a3bb053a466434be91b8eeca55876494..46cf2a6ec0d677ee7197712c40c9521b6e9fe462 100644 (file)
@@ -237,7 +237,7 @@ static int lc709203f_get_property(struct power_supply *psy,
                val->intval = chip->status;
                break;
        case POWER_SUPPLY_PROP_VOLTAGE_NOW:
-               val->intval = chip->vcell;
+               val->intval = 1000 * chip->vcell;
                break;
        case POWER_SUPPLY_PROP_CAPACITY:
                val->intval = chip->soc;
@@ -273,7 +273,7 @@ static int lc709203f_get_property(struct power_supply *psy,
                val->intval = 0;
                ret = battery_gauge_get_battery_current(chip->bg_dev, &curr_ma);
                if (!ret)
-                       val->intval = curr_ma;
+                       val->intval = 1000 * curr_ma;
                break;
        default:
                ret = -EINVAL;