From 04dd17822334871b23ea2862f7798fb0e0007777 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Sat, 11 May 2024 08:53:19 +0000
Subject: [PATCH] change otg to host mode
---
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