| .. | .. |
|---|
| 499 | 499 | struct charge_animation_priv *priv = dev_get_priv(dev); |
|---|
| 500 | 500 | struct udevice *fg = priv->fg; |
|---|
| 501 | 501 | int voltage, soc, charging = 1; |
|---|
| 502 | + int first_poll_fg = 1; |
|---|
| 502 | 503 | static int timer_initialized; |
|---|
| 503 | 504 | |
|---|
| 504 | 505 | voltage = fuel_gauge_get_voltage(fg); |
|---|
| .. | .. |
|---|
| 506 | 507 | return -EINVAL; |
|---|
| 507 | 508 | |
|---|
| 508 | 509 | while (voltage < pdata->low_power_voltage + 50) { |
|---|
| 510 | + if (!first_poll_fg) |
|---|
| 511 | + mdelay(FUEL_GAUGE_POLL_MS); |
|---|
| 512 | + |
|---|
| 513 | + first_poll_fg = 0; |
|---|
| 514 | + |
|---|
| 509 | 515 | /* Check charger online */ |
|---|
| 510 | 516 | charging = fg_charger_get_chrg_online(dev); |
|---|
| 511 | 517 | if (charging <= 0) { |
|---|