dev : pmic : add helper function for pmi8950 pon reason
Check for USB In / DC In bits of the PON register for PMI8950.
8952 Based targets uses PMI8950, hence add an API to return
the appropriate PON reason.
Change-Id: I01b2df4909f7fef45ae5aa1ea2591ce893ea3f0d
diff --git a/dev/pmic/pm8x41/include/pm8x41_hw.h b/dev/pmic/pm8x41/include/pm8x41_hw.h
index 44e9599..0a8e2e8 100644
--- a/dev/pmic/pm8x41/include/pm8x41_hw.h
+++ b/dev/pmic/pm8x41/include/pm8x41_hw.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -9,7 +9,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
- * * Neither the name of The Linux Foundation, Inc. nor the names of its
+ * * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@ -91,6 +91,13 @@
#define S2_RESET_TYPE_WARM 0x1
#define PON_RESIN_N_RESET_S2_TIMER_MAX_VALUE 0x7
+/* USB Peripheral registers */
+#define SMBCHGL_USB_ICL_STS_2 0x1309
+
+/* USB Peripheral register bits */
+#define USBIN_ACTIVE_PWR_SRC BIT(0)
+#define DCIN_ACTIVE_PWR_SRC BIT(1)
+
/* MPP registers */
#define MPP_DIG_VIN_CTL 0x41
#define MPP_MODE_CTL 0x40