target: msm8952: Fix PON USB reason for QM215
PON USB reason is not read from the right address for
QM215. Fix it.
Change-Id: I72d7a0e068cd5a90633a07e77e8115cdbdb1a920
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
diff --git a/target/msm8952/init.c b/target/msm8952/init.c
index 7c94d06..30116e7 100644
--- a/target/msm8952/init.c
+++ b/target/msm8952/init.c
@@ -255,6 +255,10 @@
usb_present_sts = !(USBIN_UV_RT_STS_PMI632 &
pm8x41_reg_read(SMBCHG_USB_RT_STS));
}
+ else if (pmic == PMIC_IS_PM8916) {
+ pon_reason = pm8x41_get_pon_reason();
+ usb_present_sts = (pon_reason & USB_CHG);
+ }
else
{
pon_reason = pm8950_get_pon_reason();
@@ -462,6 +466,11 @@
usb_present_sts = (!(USBIN_UV_RT_STS &
pm8x41_reg_read(SMBCHG_USB_RT_STS)));
}
+ else {
+ if (pmic == PMIC_IS_PM8916) {
+ usb_present_sts = (pon_reason & USB_CHG);
+ }
+ }
dprintf(INFO, "%s : pon_reason is:0x%x cold_boot:%d usb_sts:%d\n", __func__,
pon_reason, is_cold_boot, usb_present_sts);