mfd: pm8xxx-misc: Add API to control HSED BIAS lines
Qualcomm PMIC's support 3 HSED BIAS lines which as used
as Micrphone bias. The API adds ability to control (enable/disable)
these bias lines.
CRs-Fixed: 359206
Change-Id: If7603028bb040c3679c042307b8950bbd3f12c4d
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 77683ce..c4b0ea4 100644
--- a/include/linux/mfd/pm8xxx/misc.h
+++ b/include/linux/mfd/pm8xxx/misc.h
@@ -89,6 +89,12 @@
XO_DIV_64,
};
+enum pm8xxx_hsed_bias {
+ PM8XXX_HSED_BIAS0,
+ PM8XXX_HSED_BIAS1,
+ PM8XXX_HSED_BIAS2,
+};
+
#if defined(CONFIG_MFD_PM8XXX_MISC) || defined(CONFIG_MFD_PM8XXX_MISC_MODULE)
/**
@@ -210,6 +216,14 @@
enum pm8xxx_aux_clk_div divider,
bool enable);
+/**
+ * pm8xxx_hsed_bias_control - Control the HSED_BIAS signal
+ * @bias: the bias line to be controlled (of the 3)
+ * @enable: enable/disable the bias line
+ *
+ * RETURNS: an appropriate -ERRNO error value on error, or zero for success.
+ */
+int pm8xxx_hsed_bias_control(enum pm8xxx_hsed_bias bias, bool enable);
#else
static inline int pm8xxx_reset_pwr_off(int reset)
@@ -259,6 +273,11 @@
{
return -ENODEV;
}
+static inline int pm8xxx_hsed_bias_control(enum pm8xxx_hsed_bias bias,
+ bool enable)
+{
+ return -ENODEV;
+}
#endif