mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
power: rk816-battery: add POWER_SUPPLY_PROP_CHARGE_FULL for CTS.
Change-Id: Ibffd62eaafd42553f2b739bd5d2b9009ac705880 Signed-off-by: Shunqing Chen <csq@rock-chips.com>
This commit is contained in:
@@ -1057,6 +1057,7 @@ static enum power_supply_property rk816_bat_props[] = {
|
||||
POWER_SUPPLY_PROP_CAPACITY,
|
||||
POWER_SUPPLY_PROP_TEMP,
|
||||
POWER_SUPPLY_PROP_CHARGE_COUNTER,
|
||||
POWER_SUPPLY_PROP_CHARGE_FULL,
|
||||
};
|
||||
|
||||
static int rk816_battery_get_property(struct power_supply *psy,
|
||||
@@ -1103,6 +1104,9 @@ static int rk816_battery_get_property(struct power_supply *psy,
|
||||
case POWER_SUPPLY_PROP_CHARGE_COUNTER:
|
||||
val->intval = di->charge_count;
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_CHARGE_FULL:
|
||||
val->intval = di->pdata->design_capacity * 1000;/* uAh */
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user