msm: 8930: Add GPIO configuration for headset detection
Headset detection on 8930 uses GPIO to detect when a plug
gets inserted or removed. Add configuration to enable
GPIO based headset detection
Change-Id: I11e05ee712143ae638e65eef0ebd54b89de30fd2
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8930-gpiomux.c b/arch/arm/mach-msm/board-8930-gpiomux.c
index 854f318..cd4aff8 100644
--- a/arch/arm/mach-msm/board-8930-gpiomux.c
+++ b/arch/arm/mach-msm/board-8930-gpiomux.c
@@ -88,6 +88,12 @@
},
};
+static struct gpiomux_setting audio_mbhc = {
+ .func = GPIOMUX_FUNC_GPIO,
+ .drv = GPIOMUX_DRV_8MA,
+ .pull = GPIOMUX_PULL_NONE,
+};
+
#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
static struct gpiomux_setting gpio_eth_config = {
.pull = GPIOMUX_PULL_NONE,
@@ -374,6 +380,15 @@
},
};
+static struct msm_gpiomux_config msm8960_audio_mbhc_configs[] __initdata = {
+ {
+ .gpio = 37,
+ .settings = {
+ [GPIOMUX_SUSPENDED] = &audio_mbhc,
+ },
+ },
+};
+
static struct msm_gpiomux_config msm8960_audio_auxpcm_configs[] __initdata = {
{
.gpio = 63,
@@ -618,6 +633,9 @@
msm_gpiomux_install(msm8960_audio_codec_configs,
ARRAY_SIZE(msm8960_audio_codec_configs));
+ msm_gpiomux_install(msm8960_audio_mbhc_configs,
+ ARRAY_SIZE(msm8960_audio_mbhc_configs));
+
msm_gpiomux_install(msm8960_audio_auxpcm_configs,
ARRAY_SIZE(msm8960_audio_auxpcm_configs));