Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320488
b: refs/heads/master
c: 5fc55bc
h: refs/heads/master
v: v3
  • Loading branch information
Ramakrishna Pallala authored and Anton Vorontsov committed Jun 19, 2012
1 parent 9b660b4 commit 0355125
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19dd6bcd1136d254c1f12b0f69e827c3e1679b43
refs/heads/master: 5fc55bc8225d5a5c13b978e3e3dbf51e6cd6a333
8 changes: 8 additions & 0 deletions trunk/drivers/power/max17042_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ static enum power_supply_property max17042_battery_props[] = {
POWER_SUPPLY_PROP_VOLTAGE_OCV,
POWER_SUPPLY_PROP_CAPACITY,
POWER_SUPPLY_PROP_CHARGE_FULL,
POWER_SUPPLY_PROP_CHARGE_COUNTER,
POWER_SUPPLY_PROP_TEMP,
POWER_SUPPLY_PROP_CURRENT_NOW,
POWER_SUPPLY_PROP_CURRENT_AVG,
Expand Down Expand Up @@ -199,6 +200,13 @@ static int max17042_get_property(struct power_supply *psy,
if (ret < 0)
return ret;

val->intval = ret * 1000 / 2;
break;
case POWER_SUPPLY_PROP_CHARGE_COUNTER:
ret = max17042_read_reg(chip->client, MAX17042_QH);
if (ret < 0)
return ret;

val->intval = ret * 1000 / 2;
break;
case POWER_SUPPLY_PROP_TEMP:
Expand Down

0 comments on commit 0355125

Please sign in to comment.