From 2c8013f76a30ede3d564355d874872c22619817d Mon Sep 17 00:00:00 2001 From: Greg Meiste Date: Mon, 19 Jul 2010 17:58:34 -0500 Subject: [PATCH] [ARM] tegra: stingray: Configure charger lines as inputs Do not assume the lines are input by default. Several of the lines were found to be set to outputs, causing issues with charger detection. Change-Id: Ia41702c4efa76cf3b96475e798bcef0f29c9387c Signed-off-by: Greg Meiste --- arch/arm/mach-tegra/board-stingray-pinmux.c | 2 +- arch/arm/mach-tegra/board-stingray.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-tegra/board-stingray-pinmux.c b/arch/arm/mach-tegra/board-stingray-pinmux.c index 96fa48b44725..e2adcdaff7a6 100644 --- a/arch/arm/mach-tegra/board-stingray-pinmux.c +++ b/arch/arm/mach-tegra/board-stingray-pinmux.c @@ -110,7 +110,7 @@ static __initdata struct tegra_pingroup_config stingray_pinmux[] = { {TEGRA_PINGROUP_SDC, TEGRA_MUX_SDIO3, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_SDD, TEGRA_MUX_SDIO3, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_SDIO1, TEGRA_MUX_UARTE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, - {TEGRA_PINGROUP_SLXA, TEGRA_MUX_PCIE, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, + {TEGRA_PINGROUP_SLXA, TEGRA_MUX_PCIE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_SLXC, TEGRA_MUX_SPI4, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_SLXD, TEGRA_MUX_SPI4, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_SLXK, TEGRA_MUX_PCIE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, diff --git a/arch/arm/mach-tegra/board-stingray.c b/arch/arm/mach-tegra/board-stingray.c index 122ca7496376..3bccd2ca10a2 100644 --- a/arch/arm/mach-tegra/board-stingray.c +++ b/arch/arm/mach-tegra/board-stingray.c @@ -570,12 +570,14 @@ static void __init tegra_stingray_init(void) /* Enable charging */ tegra_gpio_enable(TEGRA_GPIO_PV5); gpio_request(TEGRA_GPIO_PV5, "chg_stat1"); + gpio_direction_input(TEGRA_GPIO_PV5); gpio_export(TEGRA_GPIO_PV5, false); if (stingray_revision() <= STINGRAY_REVISION_P0) { bq24617_device.resource = bq24617_resources_m1_p0; tegra_gpio_enable(TEGRA_GPIO_PV6); gpio_request(TEGRA_GPIO_PV6, "chg_stat2"); + gpio_direction_input(TEGRA_GPIO_PV6); gpio_export(TEGRA_GPIO_PV6, false); tegra_gpio_enable(TEGRA_GPIO_PJ0); @@ -585,10 +587,12 @@ static void __init tegra_stingray_init(void) } else { tegra_gpio_enable(TEGRA_GPIO_PV6); gpio_request(TEGRA_GPIO_PV6, "chg_detect"); + gpio_direction_input(TEGRA_GPIO_PV6); gpio_export(TEGRA_GPIO_PV6, false); tegra_gpio_enable(TEGRA_GPIO_PD1); gpio_request(TEGRA_GPIO_PD1, "chg_stat2"); + gpio_direction_input(TEGRA_GPIO_PD1); gpio_export(TEGRA_GPIO_PD1, false); tegra_gpio_enable(TEGRA_GPIO_PI4); -- 2.34.1