From f33f61bdb7ca6d5ebe7a78f9d8694b91360279ac Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 04 Dec 2023 07:10:27 +0000
Subject: [PATCH] add gpio
---
u-boot/drivers/power/charge_animation.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/u-boot/drivers/power/charge_animation.c b/u-boot/drivers/power/charge_animation.c
index c16f40e..63c99a7 100644
--- a/u-boot/drivers/power/charge_animation.c
+++ b/u-boot/drivers/power/charge_animation.c
@@ -499,6 +499,7 @@
struct charge_animation_priv *priv = dev_get_priv(dev);
struct udevice *fg = priv->fg;
int voltage, soc, charging = 1;
+ int first_poll_fg = 1;
static int timer_initialized;
voltage = fuel_gauge_get_voltage(fg);
@@ -506,6 +507,11 @@
return -EINVAL;
while (voltage < pdata->low_power_voltage + 50) {
+ if (!first_poll_fg)
+ mdelay(FUEL_GAUGE_POLL_MS);
+
+ first_poll_fg = 0;
+
/* Check charger online */
charging = fg_charger_get_chrg_online(dev);
if (charging <= 0) {
--
Gitblit v1.6.2