arm: tegra: Support for headset/headphone jack detection
Vinod G [Wed, 23 Feb 2011 18:42:02 +0000 (10:42 -0800)]
Added the support to do jack detection through gpio.

Original-Change-Id: I324234e5c87a7d3f660a1e33f5d4ddbb287f62e1
Reviewed-on: http://git-master/r/20605
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Tested-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Original-Change-Id: Ie579d2dfad980fe417e1a03564228ea4ae7d5e80

Rebase-Id: Rba65065582aaebf8227d86b023308419093c5f7a

arch/arm/mach-tegra/board-cardhu.c

index 464723e..f19ac23 100644 (file)
@@ -189,6 +189,12 @@ static struct tegra_i2c_platform_data cardhu_i2c5_platform_data = {
 };
 
 
+struct tegra_wired_jack_conf audio_wr_jack_conf = {
+       .hp_det_n = TEGRA_GPIO_PW2,
+       .en_mic_ext = TEGRA_GPIO_PX1,
+       .en_mic_int = TEGRA_GPIO_PX0,
+};
+
 static void cardhu_i2c_init(void)
 {
        tegra_i2c_device1.dev.platform_data = &cardhu_i2c1_platform_data;
@@ -386,6 +392,7 @@ static void __init tegra_cardhu_init(void)
        cardhu_sensors_init();
        cardhu_bt_rfkill();
        cardhu_sata_init();
+       audio_wired_jack_init();
 }
 
 static void __init tegra_cardhu_reserve(void)