From: Greg Meiste Date: Wed, 7 Jul 2010 21:41:05 +0000 (-0500) Subject: [ARM] tegra: stingray: Export charging GPIOs X-Git-Tag: firefly_0821_release~9834^2~800 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0c63e93484c49657a075d006356ffdbec001ddb6;p=firefly-linux-kernel-4.4.55.git [ARM] tegra: stingray: Export charging GPIOs The factory needs to be able to control the charging IC during the device testing before the device is allowed to ship. Change-Id: I1d7f3edd8dfbc06a9c557c82bc3c88f2873ab414 Signed-off-by: Greg Meiste --- diff --git a/arch/arm/mach-tegra/board-stingray.c b/arch/arm/mach-tegra/board-stingray.c index 6cf6cff4cc86..c4f78c5a2a1a 100644 --- a/arch/arm/mach-tegra/board-stingray.c +++ b/arch/arm/mach-tegra/board-stingray.c @@ -565,15 +565,33 @@ static void __init tegra_stingray_init(void) /* Enable charging */ tegra_gpio_enable(TEGRA_GPIO_PV5); - tegra_gpio_enable(TEGRA_GPIO_PV6); + gpio_request(TEGRA_GPIO_PV5, "chg_stat1"); + 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_export(TEGRA_GPIO_PV6, false); + tegra_gpio_enable(TEGRA_GPIO_PJ0); gpio_request(TEGRA_GPIO_PJ0, "chg_disable"); gpio_direction_output(TEGRA_GPIO_PJ0, 0); - } else + gpio_export(TEGRA_GPIO_PJ0, false); + } else { + tegra_gpio_enable(TEGRA_GPIO_PV6); + gpio_request(TEGRA_GPIO_PV6, "chg_detect"); + gpio_export(TEGRA_GPIO_PV6, false); + tegra_gpio_enable(TEGRA_GPIO_PD1); + gpio_request(TEGRA_GPIO_PD1, "chg_stat2"); + 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); + } stingray_pinmux_init();