msm8974: Detect boot/poweron reason of the target
Bootup reason is read from PMIC registers and returned to
the function update_cmdline().
Change-Id: I9b7bd9e1eaafd8496d86c97ad45238059f3a64cc
diff --git a/target/msm8974/init.c b/target/msm8974/init.c
index e2e0222..35f00e6 100644
--- a/target/msm8974/init.c
+++ b/target/msm8974/init.c
@@ -281,3 +281,16 @@
return 0;
}
}
+
+unsigned target_pause_for_battery_charge(void)
+{
+ uint8_t pon_reason = pm8x41_get_pon_reason();
+
+ /* This function will always return 0 to facilitate
+ * automated testing/reboot with usb connected.
+ * uncomment if this feature is needed */
+ /* if ((pon_reason == USB_CHG) || (pon_reason == DC_CHG))
+ return 1;*/
+
+ return 0;
+}