unsigned target_pause_for_
Battery_charge(void)
{
&n
BSP; uint32_t p
MIC = target_get_
PMIC();
uint8_t pon_reason = pm8x41_get_pon_reason();
uint8_t is_cold_boot = pm8x41_get_is_cold_boot();
bool usb_present_sts = 1;
if (target_is_pmi_
enabled())
{
if (pmic == PMIC_IS_
PMI632)
usb_present_sts = !(USBIN_UV_RT_STS_PMI632 &
pm8x41_reg_read(SMBCHG_USB_RT_STS));
else
usb_present_sts = !(USBIN_UV_RT_STS &
pm8x41_reg_read(SMBCHG_USB_RT_STS));
}
d
printf(INFO, "%s : pon_reason is:0x%x cold_boot:%d usb_sts:%d\n", __func__,
pon_reason, is_cold_boot, usb_present_sts);
/* In case of
FASTBOOT reboot,
adb reboot or if we see the
power key
* pressed we do not want go into charger mode.
* fastboot reboot is w
arm boot with PON hard reset bit not set
* adb reboot is a cold boot with PON hard reset bit set
*/
if (is_cold_boot &&
(!(pon_reason & HARD_RST)) &&
(!(pon_reason & KPDPWR_N)) &&
usb_present_sts)
return 1;
else
return 0;
}
想弄关机充电,但是进入target_pause_for_battery_charge 时候无论是否插着usb开机打印都如下,哪位大神给点建议呀,没有手册

target_pause_for_battery_charge : pon_reason is:0x80 cold_boot:1 usb_sts:1