aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/serial_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r--include/linux/serial_core.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index c6690a2a27fb..87d4bbc773fc 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -29,7 +29,6 @@
29#include <linux/tty.h> 29#include <linux/tty.h>
30#include <linux/mutex.h> 30#include <linux/mutex.h>
31#include <linux/sysrq.h> 31#include <linux/sysrq.h>
32#include <linux/pps_kernel.h>
33#include <uapi/linux/serial_core.h> 32#include <uapi/linux/serial_core.h>
34 33
35struct uart_port; 34struct uart_port;
@@ -37,8 +36,8 @@ struct serial_struct;
37struct device; 36struct device;
38 37
39/* 38/*
40 * This structure describes all the operations that can be 39 * This structure describes all the operations that can be done on the
41 * done on the physical hardware. 40 * physical hardware. See Documentation/serial/driver for details.
42 */ 41 */
43struct uart_ops { 42struct uart_ops {
44 unsigned int (*tx_empty)(struct uart_port *); 43 unsigned int (*tx_empty)(struct uart_port *);
@@ -65,7 +64,7 @@ struct uart_ops {
65 /* 64 /*
66 * Return a string describing the type of the port 65 * Return a string describing the type of the port
67 */ 66 */
68 const char *(*type)(struct uart_port *); 67 const char *(*type)(struct uart_port *);
69 68
70 /* 69 /*
71 * Release IO and memory resources used by the port. 70 * Release IO and memory resources used by the port.
@@ -83,7 +82,7 @@ struct uart_ops {
83 int (*ioctl)(struct uart_port *, unsigned int, unsigned long); 82 int (*ioctl)(struct uart_port *, unsigned int, unsigned long);
84#ifdef CONFIG_CONSOLE_POLL 83#ifdef CONFIG_CONSOLE_POLL
85 int (*poll_init)(struct uart_port *); 84 int (*poll_init)(struct uart_port *);
86 void (*poll_put_char)(struct uart_port *, unsigned char); 85 void (*poll_put_char)(struct uart_port *, unsigned char);
87 int (*poll_get_char)(struct uart_port *); 86 int (*poll_get_char)(struct uart_port *);
88#endif 87#endif
89}; 88};
@@ -134,9 +133,8 @@ struct uart_port {
134#define UPIO_HUB6 (1) 133#define UPIO_HUB6 (1)
135#define UPIO_MEM (2) 134#define UPIO_MEM (2)
136#define UPIO_MEM32 (3) 135#define UPIO_MEM32 (3)
137#define UPIO_AU (4) /* Au1x00 type IO */ 136#define UPIO_AU (4) /* Au1x00 and RT288x type IO */
138#define UPIO_TSI (5) /* Tsi108/109 type IO */ 137#define UPIO_TSI (5) /* Tsi108/109 type IO */
139#define UPIO_RM9000 (6) /* RM9000 type IO */
140 138
141 unsigned int read_status_mask; /* driver specific */ 139 unsigned int read_status_mask; /* driver specific */
142 unsigned int ignore_status_mask; /* driver specific */ 140 unsigned int ignore_status_mask; /* driver specific */
@@ -208,13 +206,25 @@ static inline void serial_port_out(struct uart_port *up, int offset, int value)
208 up->serial_out(up, offset, value); 206 up->serial_out(up, offset, value);
209} 207}
210 208
209/**
210 * enum uart_pm_state - power states for UARTs
211 * @UART_PM_STATE_ON: UART is powered, up and operational
212 * @UART_PM_STATE_OFF: UART is powered off
213 * @UART_PM_STATE_UNDEFINED: sentinel
214 */
215enum uart_pm_state {
216 UART_PM_STATE_ON = 0,
217 UART_PM_STATE_OFF = 3, /* number taken from ACPI */
218 UART_PM_STATE_UNDEFINED,
219};
220
211/* 221/*
212 * This is the state information which is persistent across opens. 222 * This is the state information which is persistent across opens.
213 */ 223 */
214struct uart_state { 224struct uart_state {
215 struct tty_port port; 225 struct tty_port port;
216 226
217 int pm_state; 227 enum uart_pm_state pm_state;
218 struct circ_buf xmit; 228 struct circ_buf xmit;
219 229
220 struct uart_port *uart_port; 230 struct uart_port *uart_port;