summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2010-06-17 14:16:19 +0530
committerGary King <gking@nvidia.com>2010-06-18 14:35:48 -0700
commit98e7f2cfa2fa0a62bf09e04a90719f04a8472588 (patch)
tree19cc88c9af6bd86a3844b055226294a62c763200 /arch
parentdcb48435e04dba5aafe87cd2ebaa1e0f09bf90cb (diff)
[arm/tegra]serial: Power control api for bluesleep power management.
Adding apis for following function to hooking up tegra serial driver with bluesleep power management: - Clock off. - Clock on. - Setting flow control to desired state. - Checking for tx fifo status. Following 4 state of uart state machine is developed to achieve this: UART_CLOSED, UART_OPENED, UART_SUSPEND, UART_CLOCK_OFF. The transitions of states are as follows: UART_CLOSED: the init state on which resource is allocated but not opened by client or when device is closed. UART_OPENED: Able to do data transfer. CLOSED to OPENED by opening the port. CLOCK_OFF to OPENED by calling function tegra_uart_request_clock_on(). SUSPEND to OPENED by calling resume(). UART_CLOCK_OFF: The controller clock is disabled and so no data transfer can happen. At this state, controller is not ready for deep power down. OPENED to CLOCK_OFF by calling tegra_uart_request_clock_off(). Can not go to this state from CLOSED and SUSPEND. UART_SUSPEND: The controller is in suspended state and ready for deep power down. UART_CLOCK_OFF to SUSPEND: OPENED to SUSPEND. Change-Id: Ib0c40547665181cadd172840be9aed2cc18ba448 Reviewed-on: http://git-master/r/2819 Reviewed-by: Anantha Idapalapati <aidapalapati@nvidia.com> Tested-by: Anantha Idapalapati <aidapalapati@nvidia.com> Reviewed-by: Udaykumar Rameshchan Raval <uraval@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/include/mach/serial.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/serial.h b/arch/arm/mach-tegra/include/mach/serial.h
index c77afa190998..fb4c92a9902c 100644
--- a/arch/arm/mach-tegra/include/mach/serial.h
+++ b/arch/arm/mach-tegra/include/mach/serial.h
@@ -24,6 +24,7 @@
#include <linux/types.h>
#include <linux/serial_8250.h>
+#include <linux/serial_core.h>
#include <mach/pinmux.h>
@@ -33,4 +34,18 @@ struct tegra_serial_platform_data {
int nr_pins;
};
+/* Switch off the clock of the uart controller. */
+void tegra_uart_request_clock_off(struct uart_port *uport);
+
+/* Switch on the clock of the uart controller */
+void tegra_uart_request_clock_on(struct uart_port *uport);
+
+/* Set the modem control signals state of uart controller. */
+void tegra_uart_set_mctrl(struct uart_port *uport, unsigned int mctrl);
+
+/* Return the status of the transmit fifo whether empty or not.
+ * Return 0 if tx fifo is not empty.
+ * Return TIOCSER_TEMT if tx fifo is empty */
+int tegra_uart_is_tx_empty(struct uart_port *uport);
+
#endif