Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297961
b: refs/heads/master
c: 6e0e60c
h: refs/heads/master
i:
  297959: a088442
v: v3
  • Loading branch information
MyungJoo Ham authored and Anton Vorontsov committed Mar 26, 2012
1 parent 09ce3ac commit 188118b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 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: 3124c4a080f9263abb667a827d30c9e81c9e5a21
refs/heads/master: 6e0e60cd0d688d0d1af85ef2abb8e363595af988
7 changes: 2 additions & 5 deletions trunk/drivers/power/max17042_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,11 @@ static int max17042_get_property(struct power_supply *psy,
val->intval = ret >> 8;
break;
case POWER_SUPPLY_PROP_CHARGE_FULL:
ret = max17042_read_reg(chip->client, MAX17042_RepSOC);
ret = max17042_read_reg(chip->client, MAX17042_FullCAP);
if (ret < 0)
return ret;

if ((ret >> 8) >= MAX17042_BATTERY_FULL)
val->intval = 1;
else if (ret >= 0)
val->intval = 0;
val->intval = ret * 1000 / 2;
break;
case POWER_SUPPLY_PROP_TEMP:
ret = max17042_read_reg(chip->client, MAX17042_TEMP);
Expand Down

0 comments on commit 188118b

Please sign in to comment.