diff options
author | Kevin Cernekee <cernekee@gmail.com> | 2012-12-26 23:43:42 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-16 00:57:44 -0500 |
commit | e759d7c53b39a43fc908425bf9985b8b7d930550 (patch) | |
tree | 1dda0be7eed24d1ac06d43e8dbdd63a924280608 | |
parent | ef4f527c48c8fcbb5e35dafaef4f9097f5e9d901 (diff) |
tty: Update serial core API documentation
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | Documentation/serial/driver | 39 | ||||
-rw-r--r-- | include/linux/serial_core.h | 8 |
2 files changed, 43 insertions, 4 deletions
diff --git a/Documentation/serial/driver b/Documentation/serial/driver index a6ef8dc436f1..067c47d46917 100644 --- a/Documentation/serial/driver +++ b/Documentation/serial/driver | |||
@@ -133,6 +133,16 @@ hardware. | |||
133 | Interrupts: locally disabled. | 133 | Interrupts: locally disabled. |
134 | This call must not sleep | 134 | This call must not sleep |
135 | 135 | ||
136 | send_xchar(port,ch) | ||
137 | Transmit a high priority character, even if the port is stopped. | ||
138 | This is used to implement XON/XOFF flow control and tcflow(). If | ||
139 | the serial driver does not implement this function, the tty core | ||
140 | will append the character to the circular buffer and then call | ||
141 | start_tx() / stop_tx() to flush the data out. | ||
142 | |||
143 | Locking: none. | ||
144 | Interrupts: caller dependent. | ||
145 | |||
136 | stop_rx(port) | 146 | stop_rx(port) |
137 | Stop receiving characters; the port is in the process of | 147 | Stop receiving characters; the port is in the process of |
138 | being closed. | 148 | being closed. |
@@ -254,6 +264,10 @@ hardware. | |||
254 | Locking: none. | 264 | Locking: none. |
255 | Interrupts: caller dependent. | 265 | Interrupts: caller dependent. |
256 | 266 | ||
267 | set_wake(port,state) | ||
268 | Enable/disable power management wakeup on serial activity. Not | ||
269 | currently implemented. | ||
270 | |||
257 | type(port) | 271 | type(port) |
258 | Return a pointer to a string constant describing the specified | 272 | Return a pointer to a string constant describing the specified |
259 | port, or return NULL, in which case the string 'unknown' is | 273 | port, or return NULL, in which case the string 'unknown' is |
@@ -306,6 +320,31 @@ hardware. | |||
306 | Locking: none. | 320 | Locking: none. |
307 | Interrupts: caller dependent. | 321 | Interrupts: caller dependent. |
308 | 322 | ||
323 | poll_init(port) | ||
324 | Called by kgdb to perform the minimal hardware initialization needed | ||
325 | to support poll_put_char() and poll_get_char(). Unlike ->startup() | ||
326 | this should not request interrupts. | ||
327 | |||
328 | Locking: tty_mutex and tty_port->mutex taken. | ||
329 | Interrupts: n/a. | ||
330 | |||
331 | poll_put_char(port,ch) | ||
332 | Called by kgdb to write a single character directly to the serial | ||
333 | port. It can and should block until there is space in the TX FIFO. | ||
334 | |||
335 | Locking: none. | ||
336 | Interrupts: caller dependent. | ||
337 | This call must not sleep | ||
338 | |||
339 | poll_get_char(port) | ||
340 | Called by kgdb to read a single character directly from the serial | ||
341 | port. If data is available, it should be returned; otherwise | ||
342 | the function should return NO_POLL_CHAR immediately. | ||
343 | |||
344 | Locking: none. | ||
345 | Interrupts: caller dependent. | ||
346 | This call must not sleep | ||
347 | |||
309 | Other functions | 348 | Other functions |
310 | --------------- | 349 | --------------- |
311 | 350 | ||
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index ec5df74c4506..82aebc8ff77f 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -37,8 +37,8 @@ struct serial_struct; | |||
37 | struct device; | 37 | struct device; |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * This structure describes all the operations that can be | 40 | * This structure describes all the operations that can be done on the |
41 | * done on the physical hardware. | 41 | * physical hardware. See Documentation/serial/driver for details. |
42 | */ | 42 | */ |
43 | struct uart_ops { | 43 | struct uart_ops { |
44 | unsigned int (*tx_empty)(struct uart_port *); | 44 | unsigned int (*tx_empty)(struct uart_port *); |
@@ -65,7 +65,7 @@ struct uart_ops { | |||
65 | /* | 65 | /* |
66 | * Return a string describing the type of the port | 66 | * Return a string describing the type of the port |
67 | */ | 67 | */ |
68 | const char *(*type)(struct uart_port *); | 68 | const char *(*type)(struct uart_port *); |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * Release IO and memory resources used by the port. | 71 | * Release IO and memory resources used by the port. |
@@ -83,7 +83,7 @@ struct uart_ops { | |||
83 | int (*ioctl)(struct uart_port *, unsigned int, unsigned long); | 83 | int (*ioctl)(struct uart_port *, unsigned int, unsigned long); |
84 | #ifdef CONFIG_CONSOLE_POLL | 84 | #ifdef CONFIG_CONSOLE_POLL |
85 | int (*poll_init)(struct uart_port *); | 85 | int (*poll_init)(struct uart_port *); |
86 | void (*poll_put_char)(struct uart_port *, unsigned char); | 86 | void (*poll_put_char)(struct uart_port *, unsigned char); |
87 | int (*poll_get_char)(struct uart_port *); | 87 | int (*poll_get_char)(struct uart_port *); |
88 | #endif | 88 | #endif |
89 | }; | 89 | }; |