power: charge animation: print reason of exit charge
This is helpful to know charge state. Change-Id: I96401b67220a0ebb782c5da1f8001b3bf4682c06 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
parent
d08ee36254
commit
7ae458341f
|
|
@ -351,7 +351,7 @@ static int charge_animation_show(struct udevice *dev)
|
|||
|
||||
/* If there is preboot command, exit */
|
||||
if (preboot) {
|
||||
debug("exit charge, due to preboot: %s\n", preboot);
|
||||
printf("Exit charge: due to preboot cmd '%s'\n", preboot);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -360,7 +360,7 @@ static int charge_animation_show(struct udevice *dev)
|
|||
boot_mode = rockchip_get_boot_mode();
|
||||
if ((boot_mode != BOOT_MODE_CHARGING) &&
|
||||
(boot_mode != BOOT_MODE_UNDEFINE)) {
|
||||
debug("exit charge, due to boot mode: %d\n", boot_mode);
|
||||
printf("Exit charge: due to boot mode\n");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -368,7 +368,7 @@ static int charge_animation_show(struct udevice *dev)
|
|||
/* Not charger online, exit */
|
||||
charging = fuel_gauge_get_chrg_online(fg);
|
||||
if (charging <= 0) {
|
||||
debug("exit charge, due to charger offline\n");
|
||||
printf("Exit charge: due to charger offline\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -380,7 +380,7 @@ static int charge_animation_show(struct udevice *dev)
|
|||
|
||||
/* Not enable U-Boot charge, exit */
|
||||
if (!pdata->uboot_charge) {
|
||||
debug("exit charge, due to not enable uboot charge\n");
|
||||
printf("Exit charge: due to not enable uboot charge\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue