mfd: pm8xxx-misc: Add pm8xxx stay on API
The API configures the PMIC to ignore the PS_HOLD low
signal, which can be used during debugging.
Change-Id: I162657934e34da081eb897d64ffed36ad48e4eff
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
diff --git a/include/linux/mfd/pm8xxx/misc.h b/include/linux/mfd/pm8xxx/misc.h
index 52fe31a..32189b2 100644
--- a/include/linux/mfd/pm8xxx/misc.h
+++ b/include/linux/mfd/pm8xxx/misc.h
@@ -147,6 +147,19 @@
*/
int pm8xxx_hard_reset_config(enum pm8xxx_pon_config config);
+/**
+ * pm8xxx_stay_on - enables stay_on feature
+ *
+ * PMIC stay-on feature allows PMIC to ignore MSM PS_HOLD=low
+ * signal so that some special functions like debugging could be
+ * performed.
+ *
+ * This feature should not be used in any product release.
+ *
+ * RETURNS: an appropriate -ERRNO error value on error, or zero for success.
+ */
+int pm8xxx_stay_on(void);
+
#else
static inline int pm8xxx_reset_pwr_off(int reset)
@@ -179,6 +192,10 @@
{
return -ENODEV;
}
+static inline int pm8xxx_stay_on(void)
+{
+ return -ENODEV;
+}
#endif
#endif