Lines Matching refs:uart

46 	struct tegra_uart *uart;  in tegra_uart_probe()  local
51 uart = devm_kzalloc(&pdev->dev, sizeof(*uart), GFP_KERNEL); in tegra_uart_probe()
52 if (!uart) in tegra_uart_probe()
91 uart->rst = devm_reset_control_get_optional_shared(&pdev->dev, NULL); in tegra_uart_probe()
92 if (IS_ERR(uart->rst)) in tegra_uart_probe()
93 return PTR_ERR(uart->rst); in tegra_uart_probe()
97 uart->clk = devm_clk_get(&pdev->dev, NULL); in tegra_uart_probe()
98 if (IS_ERR(uart->clk)) { in tegra_uart_probe()
103 ret = clk_prepare_enable(uart->clk); in tegra_uart_probe()
107 port->uartclk = clk_get_rate(uart->clk); in tegra_uart_probe()
110 ret = reset_control_deassert(uart->rst); in tegra_uart_probe()
118 platform_set_drvdata(pdev, uart); in tegra_uart_probe()
119 uart->line = ret; in tegra_uart_probe()
124 reset_control_assert(uart->rst); in tegra_uart_probe()
126 clk_disable_unprepare(uart->clk); in tegra_uart_probe()
133 struct tegra_uart *uart = platform_get_drvdata(pdev); in tegra_uart_remove() local
135 serial8250_unregister_port(uart->line); in tegra_uart_remove()
136 reset_control_assert(uart->rst); in tegra_uart_remove()
137 clk_disable_unprepare(uart->clk); in tegra_uart_remove()
145 struct tegra_uart *uart = dev_get_drvdata(dev); in tegra_uart_suspend() local
146 struct uart_8250_port *port8250 = serial8250_get_port(uart->line); in tegra_uart_suspend()
149 serial8250_suspend_port(uart->line); in tegra_uart_suspend()
152 clk_disable_unprepare(uart->clk); in tegra_uart_suspend()
159 struct tegra_uart *uart = dev_get_drvdata(dev); in tegra_uart_resume() local
160 struct uart_8250_port *port8250 = serial8250_get_port(uart->line); in tegra_uart_resume()
164 clk_prepare_enable(uart->clk); in tegra_uart_resume()
166 serial8250_resume_port(uart->line); in tegra_uart_resume()