power: fg_cw201x: add capability callback

This is only a fuel gauge IC.

Change-Id: I003dee494aa89b388f5ef68381ce16227d7f9c65
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2019-06-14 19:14:39 +08:00 committed by Jianhong Chen
parent 8d8025afc0
commit 9d985d6e93
1 changed files with 6 additions and 0 deletions

View File

@ -301,7 +301,13 @@ static bool cw201x_update_get_chrg_online(struct udevice *dev)
return cw201x_check_charge(cw201x);
}
static int cw201x_capability(struct udevice *dev)
{
return FG_CAP_FUEL_GAUGE;
}
static struct dm_fuel_gauge_ops cw201x_fg_ops = {
.capability = cw201x_capability,
.get_soc = cw201x_update_get_soc,
.get_voltage = cw201x_update_get_voltage,
.get_chrg_online = cw201x_update_get_chrg_online,