1 /*
2  * Copyright (C) 2008 Google, Inc.
3  * Author: Nick Pelly <npelly@google.com>
4  *
5  * This software is licensed under the terms of the GNU General Public
6  * License version 2, as published by the Free Software Foundation, and
7  * may be copied, distributed, and modified under those terms.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  */
14 
15 #ifndef __ASM_ARCH_MSM_SERIAL_HS_H
16 #define __ASM_ARCH_MSM_SERIAL_HS_H
17 
18 #include <linux/serial_core.h>
19 
20 /* API to request the uart clock off or on for low power management
21  * Clients should call request_clock_off() when no uart data is expected,
22  * and must call request_clock_on() before any further uart data can be
23  * received. */
24 extern void msm_hs_request_clock_off(struct uart_port *uport);
25 extern void msm_hs_request_clock_on(struct uart_port *uport);
26 
27 /**
28  * struct msm_serial_hs_platform_data
29  * @rx_wakeup_irq: Rx activity irq
30  * @rx_to_inject: extra character to be inserted to Rx tty on wakeup
31  * @inject_rx: 1 = insert rx_to_inject. 0 = do not insert extra character
32  * @exit_lpm_cb: function called before every Tx transaction
33  *
34  * This is an optional structure required for UART Rx GPIO IRQ based
35  * wakeup from low power state. UART wakeup can be triggered by RX activity
36  * (using a wakeup GPIO on the UART RX pin). This should only be used if
37  * there is not a wakeup GPIO on the UART CTS, and the first RX byte is
38  * known (eg., with the Bluetooth Texas Instruments HCILL protocol),
39  * since the first RX byte will always be lost. RTS will be asserted even
40  * while the UART is clocked off in this mode of operation.
41  */
42 struct msm_serial_hs_platform_data {
43 	int rx_wakeup_irq;
44 	unsigned char inject_rx_on_wakeup;
45 	char rx_to_inject;
46 	void (*exit_lpm_cb)(struct uart_port *);
47 };
48 
49 #endif
50