dm: fuel gauge: rename fuel_gauge_get_soc() to fuel_gauge_update_get_soc()

New name is more accurate about internal implementation..

Change-Id: I16891f5f614fbb17f1e65e04ef4d8a713c8624f3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2019-08-02 09:43:41 +08:00 committed by Jianhong Chen
parent 01c5bab161
commit 4f9cab2711
3 changed files with 5 additions and 5 deletions

View File

@ -377,7 +377,7 @@ static int charge_extrem_low_power(struct udevice *dev)
* Just for fuel gauge to update something important, * Just for fuel gauge to update something important,
* including charge current, coulometer or other. * including charge current, coulometer or other.
*/ */
soc = fuel_gauge_get_soc(fg); soc = fuel_gauge_update_get_soc(fg);
if (soc < 0 || soc > 100) { if (soc < 0 || soc > 100) {
printf("get soc failed: %d\n", soc); printf("get soc failed: %d\n", soc);
continue; continue;
@ -559,7 +559,7 @@ static int charge_animation_show(struct udevice *dev)
debug("step2 (%d)... show_idx=%d\n", screen_on, show_idx); debug("step2 (%d)... show_idx=%d\n", screen_on, show_idx);
/* Step2: get soc and voltage */ /* Step2: get soc and voltage */
soc = fuel_gauge_get_soc(fg); soc = fuel_gauge_update_get_soc(fg);
if (soc < 0 || soc > 100) { if (soc < 0 || soc > 100) {
printf("get soc failed: %d\n", soc); printf("get soc failed: %d\n", soc);
continue; continue;
@ -847,7 +847,7 @@ static int charge_animation_probe(struct udevice *dev)
} }
/* Initialize charge current */ /* Initialize charge current */
soc = fuel_gauge_get_soc(priv->fg); soc = fuel_gauge_update_get_soc(priv->fg);
if (soc < 0 || soc > 100) { if (soc < 0 || soc > 100) {
debug("get soc failed: %d\n", soc); debug("get soc failed: %d\n", soc);
return -EINVAL; return -EINVAL;

View File

@ -50,7 +50,7 @@ int fuel_gauge_get_voltage(struct udevice *dev)
return ops->get_voltage(dev); return ops->get_voltage(dev);
} }
int fuel_gauge_get_soc(struct udevice *dev) int fuel_gauge_update_get_soc(struct udevice *dev)
{ {
const struct dm_fuel_gauge_ops *ops = dev_get_driver_ops(dev); const struct dm_fuel_gauge_ops *ops = dev_get_driver_ops(dev);

View File

@ -22,7 +22,7 @@ struct dm_fuel_gauge_ops {
int fuel_gauge_capability(struct udevice *dev); int fuel_gauge_capability(struct udevice *dev);
int fuel_gauge_bat_is_exist(struct udevice *dev); int fuel_gauge_bat_is_exist(struct udevice *dev);
int fuel_gauge_get_soc(struct udevice *dev); int fuel_gauge_update_get_soc(struct udevice *dev);
int fuel_gauge_get_voltage(struct udevice *dev); int fuel_gauge_get_voltage(struct udevice *dev);
int fuel_gauge_get_current(struct udevice *dev); int fuel_gauge_get_current(struct udevice *dev);
bool fuel_gauge_get_chrg_online(struct udevice *dev); bool fuel_gauge_get_chrg_online(struct udevice *dev);