From 25a71aee7f0fabe764a00d9cb5ab28530b40a8d4 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 16 Jun 2010 14:18:51 +0530 Subject: [arm/tegra] hsuart: Configuring tristate correctly. To enable the tristate of the pin, the argument should be either TEGRA_TRI_TRISTATE or true and for setting it to normal, the argument should be either false or the TEGRA_TRI_NORMAL. The code was passing the value of the argument in reverse, for tristate it was passing the false and for normal it was true. Passing the correct argument value for setting the tristate and normal. Change-Id: I3f83ae7672dc4323f695e57c46c3878316a03324 Reviewed-on: http://git-master/r/2749 Reviewed-by: Anantha Idapalapati Tested-by: Anantha Idapalapati Reviewed-by: Suresh Mangipudi Tested-by: Suresh Mangipudi Reviewed-by: Gary King --- drivers/serial/tegra_hsuart.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/serial/tegra_hsuart.c b/drivers/serial/tegra_hsuart.c index 8d1a58ee117d..a39877cb3b64 100644 --- a/drivers/serial/tegra_hsuart.c +++ b/drivers/serial/tegra_hsuart.c @@ -537,6 +537,8 @@ static void tegra_uart_hw_deinit(struct tegra_uart_port *t) clk_disable(t->clk); t->baud = 0; + if (t->pinmux) + tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, TEGRA_TRI_TRISTATE); } static void tegra_uart_free_rx_dma(struct tegra_uart_port *t) @@ -567,7 +569,7 @@ static int tegra_uart_hw_init(struct tegra_uart_port *t) t->baud = 0; if (t->pinmux) - tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, true); + tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, TEGRA_TRI_NORMAL); clk_enable(t->clk); msleep(10); @@ -1123,7 +1125,7 @@ static int tegra_uart_suspend(struct platform_device *pdev, pm_message_t state) u = &t->uport; uart_suspend_port(&tegra_uart_driver, u); if (t->pinmux) - tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, false); + tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, TEGRA_TRI_TRISTATE); return 0; } @@ -1139,7 +1141,7 @@ static int tegra_uart_resume(struct platform_device *pdev) u = &t->uport; dev_err(t->uport.dev, "tegra_uart_resume called\n"); if (t->pinmux) - tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, true); + tegra_pinmux_config_tristate_table(t->pinmux, t->nr_pins, TEGRA_TRI_NORMAL); uart_resume_port(&tegra_uart_driver, u); return 0; } -- cgit v1.2.3