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:
Joseph Chen 2018-12-04 14:59:17 +08:00
parent d08ee36254
commit 7ae458341f
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}