[ARM] tegra: stingray: CHG_DISABLE is connected to PS7 on P2
authorGreg Meiste <w30289@motorola.com>
Tue, 31 Aug 2010 16:56:55 +0000 (11:56 -0500)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:51:09 +0000 (16:51 -0700)
On P2 hardware, PS7 is now connected to CHG_DISABLE.  HS_DET_EN has not
been connected (or needed) since M1, so audio should not be controlling
PS7.

Change-Id: I19b96295cb956bffdd1f4b0e7ba48b1a0bec3242
Signed-off-by: Greg Meiste <w30289@motorola.com>
arch/arm/mach-tegra/board-stingray.c

index efb34c9aeffc7f4bcd0dbcb9cc577ee47b7e4377..6a78a9b0f7b4c8fd53a51be80a7cc7e27f68ba5c 100644 (file)
@@ -258,7 +258,7 @@ static struct cpcap_audio_platform_data cpcap_audio_pdata = {
        .regulator = "vaudio",
        .state = &stingray_cpcap_audio_state,
        .speaker_gpio = TEGRA_GPIO_PR3,
-       .headset_gpio = TEGRA_GPIO_PS7,
+       .headset_gpio = -1,
 };
 
 static struct platform_device cpcap_audio_device = {
@@ -942,10 +942,17 @@ static void __init tegra_stingray_init(void)
                gpio_direction_input(TEGRA_GPIO_PD1);
                gpio_export(TEGRA_GPIO_PD1, false);
 
-               tegra_gpio_enable(TEGRA_GPIO_PI4);
-               gpio_request(TEGRA_GPIO_PI4, "chg_disable");
-               gpio_direction_output(TEGRA_GPIO_PI4, 0);
-               gpio_export(TEGRA_GPIO_PI4, false);
+               if (stingray_revision() >= STINGRAY_REVISION_P2) {
+                       tegra_gpio_enable(TEGRA_GPIO_PS7);
+                       gpio_request(TEGRA_GPIO_PS7, "chg_disable");
+                       gpio_direction_output(TEGRA_GPIO_PS7, 0);
+                       gpio_export(TEGRA_GPIO_PS7, false);
+               } else {
+                       tegra_gpio_enable(TEGRA_GPIO_PI4);
+                       gpio_request(TEGRA_GPIO_PI4, "chg_disable");
+                       gpio_direction_output(TEGRA_GPIO_PI4, 0);
+                       gpio_export(TEGRA_GPIO_PI4, false);
+               }
        }
 
        /* Enable charge LEDs */