From: Greg Meiste Date: Thu, 5 Aug 2010 15:38:12 +0000 (-0500) Subject: [ARM] tegra: stingray: Configure Charge LED X-Git-Tag: firefly_0821_release~9834^2~727 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=243777788c80b313d4bb57aa65e17536171c16cd;p=firefly-linux-kernel-4.4.55.git [ARM] tegra: stingray: Configure Charge LED Configure GPIO_PZ5 to control the charge LED. For now, charge LEDs are enabled when device is powered up. GPIO is also exported to enable factory testing. Change-Id: I6bf7345cc795d57c1312c2c14ab1c74863a421ce Signed-off-by: Greg Meiste --- diff --git a/arch/arm/mach-tegra/board-stingray.c b/arch/arm/mach-tegra/board-stingray.c index 949238cc4135..4312cbbcd0ad 100644 --- a/arch/arm/mach-tegra/board-stingray.c +++ b/arch/arm/mach-tegra/board-stingray.c @@ -861,6 +861,17 @@ static void __init tegra_stingray_init(void) gpio_export(TEGRA_GPIO_PI4, false); } + /* Enable charge LEDs */ + if (stingray_revision() >= STINGRAY_REVISION_P0) { + /* Set the SYS_CLK_REQ override bit to allow PZ5 to be used + as a GPIO. */ + writel(0, IO_TO_VIRT(TEGRA_PMC_BASE + 0x01C)); + tegra_gpio_enable(TEGRA_GPIO_PZ5); + gpio_request(TEGRA_GPIO_PZ5, "chg_led_disable"); + gpio_direction_output(TEGRA_GPIO_PZ5, 0); + gpio_export(TEGRA_GPIO_PZ5, false); + } + stingray_pinmux_init(); tegra_clk_init_from_table(stingray_clk_init_table);