diff options
author | Ryan Mallon <ryan@bluewatersys.com> | 2010-10-01 17:17:42 -0400 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2010-10-06 09:36:49 -0400 |
commit | 353f867b5536e55e46801562987d605778cf262b (patch) | |
tree | 41cb17647562119fe83941ec2a4fa1bd8031634e | |
parent | 2e727f1787e311087950711451e6eec82c05d81c (diff) |
ds2782_battery: Fix units
Correct the unit names in the ds2782 battery driver. Changes voltage_uA
to voltage_uV and capacity_uA to capacity.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Yulia Vilensky <vilensky@compulab.co.il>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
-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 84d3c43cf2bc..6957e8af6449 100644 --- a/drivers/power/ds2782_battery.c +++ b/drivers/power/ds2782_battery.c | |||
@@ -44,8 +44,8 @@ struct ds278x_info; | |||
44 | 44 | ||
45 | struct ds278x_battery_ops { | 45 | struct ds278x_battery_ops { |
46 | int (*get_battery_current)(struct ds278x_info *info, int *current_uA); | 46 | int (*get_battery_current)(struct ds278x_info *info, int *current_uA); |
47 | int (*get_battery_voltage)(struct ds278x_info *info, int *voltage_uA); | 47 | int (*get_battery_voltage)(struct ds278x_info *info, int *voltage_uV); |
48 | int (*get_battery_capacity)(struct ds278x_info *info, int *capacity_uA); | 48 | int (*get_battery_capacity)(struct ds278x_info *info, int *capacity); |
49 | }; | 49 | }; |
50 | 50 | ||
51 | #define to_ds278x_info(x) container_of(x, struct ds278x_info, battery) | 51 | #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) | |||
137 | return 0; | 137 | return 0; |
138 | } | 138 | } |
139 | 139 | ||
140 | static int ds2782_get_voltage(struct ds278x_info *info, int *voltage_uA) | 140 | static int ds2782_get_voltage(struct ds278x_info *info, int *voltage_uV) |
141 | { | 141 | { |
142 | s16 raw; | 142 | s16 raw; |
143 | int err; | 143 | int err; |
@@ -149,7 +149,7 @@ static int ds2782_get_voltage(struct ds278x_info *info, int *voltage_uA) | |||
149 | err = ds278x_read_reg16(info, DS278x_REG_VOLT_MSB, &raw); | 149 | err = ds278x_read_reg16(info, DS278x_REG_VOLT_MSB, &raw); |
150 | if (err) | 150 | if (err) |
151 | return err; | 151 | return err; |
152 | *voltage_uA = (raw / 32) * 4800; | 152 | *voltage_uV = (raw / 32) * 4800; |
153 | return 0; | 153 | return 0; |
154 | } | 154 | } |
155 | 155 | ||
@@ -177,7 +177,7 @@ static int ds2786_get_current(struct ds278x_info *info, int *current_uA) | |||
177 | return 0; | 177 | return 0; |
178 | } | 178 | } |
179 | 179 | ||
180 | static int ds2786_get_voltage(struct ds278x_info *info, int *voltage_uA) | 180 | static int ds2786_get_voltage(struct ds278x_info *info, int *voltage_uV) |
181 | { | 181 | { |
182 | s16 raw; | 182 | s16 raw; |
183 | int err; | 183 | int err; |
@@ -189,7 +189,7 @@ static int ds2786_get_voltage(struct ds278x_info *info, int *voltage_uA) | |||
189 | err = ds278x_read_reg16(info, DS278x_REG_VOLT_MSB, &raw); | 189 | err = ds278x_read_reg16(info, DS278x_REG_VOLT_MSB, &raw); |
190 | if (err) | 190 | if (err) |
191 | return err; | 191 | return err; |
192 | *voltage_uA = (raw / 8) * 1220; | 192 | *voltage_uV = (raw / 8) * 1220; |
193 | return 0; | 193 | return 0; |
194 | } | 194 | } |
195 | 195 | ||