ASoC: Tegra: Enable wake source of HP GPIO
Lei Fan [Wed, 16 Apr 2014 07:17:17 +0000 (15:17 +0800)]
Enable the GPIO for headset detection work as LP0 wake source.
Bug 1499477

Change-Id: I91ae32f8d687f3de4548b23464072e24adacb201
Signed-off-by: Lei Fan <leif@nvidia.com>
Reviewed-on: http://git-master/r/396887
Reviewed-by: Vijay Mali <vmali@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Martin Chi <mchi@nvidia.com>
Reviewed-on: http://git-master/r/409967
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>

sound/soc/tegra/tegra_rt5640.c

index 72d9240..065681b 100644 (file)
@@ -39,6 +39,7 @@
 #ifdef CONFIG_SWITCH
 #include <linux/switch.h>
 #endif
+#include <linux/interrupt.h>
 #include <mach/tegra_asoc_pdata.h>
 #include <mach/gpio-tegra.h>
 #include <mach/tegra_rt5640_pdata.h>
@@ -1562,6 +1563,7 @@ static int tegra_rt5640_init(struct snd_soc_pcm_runtime *rtd)
                                        1,
                                        &tegra_rt5640_hp_jack_gpio);
                machine->gpio_requested |= GPIO_HP_DET;
+               enable_irq_wake(gpio_to_irq(tegra_rt5640_hp_jack_gpio.gpio));
        }
 
        /* Add call mode switch control */