Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217405
b: refs/heads/master
c: 353f867
h: refs/heads/master
i:
  217403: 28688d6
v: v3
  • Loading branch information
Ryan Mallon authored and Anton Vorontsov committed Oct 6, 2010
1 parent 8bcbb30 commit 4f8c9b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2e727f1787e311087950711451e6eec82c05d81c
refs/heads/master: 353f867b5536e55e46801562987d605778cf262b
12 changes: 6 additions & 6 deletions trunk/drivers/power/ds2782_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit 4f8c9b0

Please sign in to comment.