Skip to content

Commit

Permalink
battery_v2: sm5713_fuelgauge: Use CHARGE_FULL capacity for CHARGE_COU…
Browse files Browse the repository at this point in the history
…NTER

Change-Id: Id43d7f233e9492d609eaf2510e85dee8f962c192
  • Loading branch information
Linux4 authored and cat658011 committed Jun 19, 2024
1 parent b9fc772 commit 3366715
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/battery_v2/sm5713_fuelgauge.c
Original file line number Diff line number Diff line change
Expand Up @@ -2513,8 +2513,8 @@ static int sm5713_fg_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_CHARGE_ENABLED:
break;
case POWER_SUPPLY_PROP_CHARGE_COUNTER:
val->intval =
fuelgauge->battery_data->Capacity * fuelgauge->raw_capacity; //uAh
psy_do_property("battery", get, POWER_SUPPLY_PROP_CHARGE_FULL, value);
val->intval = value.intval/1000 * fuelgauge->raw_capacity; //uAh
break;
#if defined(CONFIG_BATTERY_AGE_FORECAST)
case POWER_SUPPLY_PROP_CAPACITY_LEVEL:
Expand Down

0 comments on commit 3366715

Please sign in to comment.