target: msm8226: Add support to read the power on reason.
Change-Id: I28a254c2bf1036d9982a0c107d0898d38b4d6f90
diff --git a/target/msm8226/init.c b/target/msm8226/init.c
index f9eb9b9..ff6bf3b 100644
--- a/target/msm8226/init.c
+++ b/target/msm8226/init.c
@@ -270,3 +270,18 @@
val |= SESS_VLD_CTRL;
writel(val, USB_USBCMD);
}
+
+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;
+}