diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-12-10 15:19:18 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-12-10 15:19:18 +0100 |
commit | 2ade0c1d9d93b7642212657ef76f4a1e30233711 (patch) | |
tree | 63bc720c0ffe5f4760cac4ed617b9870b050175e /drivers/power/ds2782_battery.c | |
parent | 504499f22c08a03e2e19dc88d31aa0ecd2ac815e (diff) | |
parent | 6313e3c21743cc88bb5bd8aa72948ee1e83937b6 (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/power/ds2782_battery.c')
-rw-r--r-- | drivers/power/ds2782_battery.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c index 84d3c43cf2b..6957e8af644 100644 --- a/drivers/power/ds2782_battery.c +++ b/drivers/power/ds2782_battery.c @@ -44,8 +44,8 @@ struct ds278x_info; struct ds278x_battery_ops { int (*get_battery_current)(struct ds278x_info *info, int *current_uA); - int (*get_battery_voltage)(struct ds278x_info *info, int *voltage_uA); - int (*get_battery_capacity)(struct ds278x_info *info, int *capacity_uA); + int (*get_battery_voltage)(struct ds278x_info *info, int *voltage_uV); + int (*get_battery_capacity)(struct ds278x_info *info, int *capacity); }; #define to_ds278x_info(x) container_of(x, struct ds278x_info, battery) @@ -137,7 +137,7 @@ static int ds2782_get_current(struct ds278x_info *info, int *current_uA) return 0; } -static int ds2782_get_voltage(struct ds278x_info *info, int *voltage_uA) +static int ds2782_get_voltage(struct ds278x_info *info, int *voltage_uV) { s16 raw; int err; @@ -149,7 +149,7 @@ static int ds2782_get_voltage(struct ds278x_info *info, int *voltage_uA) err = ds278x_read_reg16(info, DS278x_REG_VOLT_MSB, &raw); if (err) return err; - *voltage_uA = (raw / 32) * 4800; + *voltage_uV = (raw / 32) * 4800; return 0; } @@ -177,7 +177,7 @@ static int ds2786_get_current(struct ds278x_info *info, int *current_uA) return 0; } -static int ds2786_get_voltage(struct ds278x_info *info, int *voltage_uA) +static int ds2786_get_voltage(struct ds278x_info *info, int *voltage_uV) { s16 raw; int err; @@ -189,7 +189,7 @@ static int ds2786_get_voltage(struct ds278x_info *info, int *voltage_uA) err = ds278x_read_reg16(info, DS278x_REG_VOLT_MSB, &raw); if (err) return err; - *voltage_uA = (raw / 8) * 1220; + *voltage_uV = (raw / 8) * 1220; return 0; } |