From: Greg Meiste Date: Tue, 31 Aug 2010 16:56:55 +0000 (-0500) Subject: [ARM] tegra: stingray: CHG_DISABLE is connected to PS7 on P2 X-Git-Tag: firefly_0821_release~9834^2~581 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d6f7c9b3c7f64f707cf93e8605fbd83d59ced7e0;p=firefly-linux-kernel-4.4.55.git [ARM] tegra: stingray: CHG_DISABLE is connected to PS7 on P2 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 --- diff --git a/arch/arm/mach-tegra/board-stingray.c b/arch/arm/mach-tegra/board-stingray.c index efb34c9aeffc..6a78a9b0f7b4 100644 --- a/arch/arm/mach-tegra/board-stingray.c +++ b/arch/arm/mach-tegra/board-stingray.c @@ -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 */