Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kevin Cernekee and committed by
Greg Kroah-Hartman
e759d7c5 ef4f527c

+43 -4
+39
Documentation/serial/driver
··· 133 133 Interrupts: locally disabled. 134 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 146 stop_rx(port) 137 147 Stop receiving characters; the port is in the process of 138 148 being closed. ··· 264 254 Locking: none. 265 255 Interrupts: caller dependent. 266 256 257 + set_wake(port,state) 258 + Enable/disable power management wakeup on serial activity. Not 259 + currently implemented. 260 + 267 261 type(port) 268 262 Return a pointer to a string constant describing the specified 269 263 port, or return NULL, in which case the string 'unknown' is ··· 319 305 320 306 Locking: none. 321 307 Interrupts: caller dependent. 308 + 309 + poll_init(port) 310 + Called by kgdb to perform the minimal hardware initialization needed 311 + to support poll_put_char() and poll_get_char(). Unlike ->startup() 312 + this should not request interrupts. 313 + 314 + Locking: tty_mutex and tty_port->mutex taken. 315 + Interrupts: n/a. 316 + 317 + poll_put_char(port,ch) 318 + Called by kgdb to write a single character directly to the serial 319 + port. It can and should block until there is space in the TX FIFO. 320 + 321 + Locking: none. 322 + Interrupts: caller dependent. 323 + This call must not sleep 324 + 325 + poll_get_char(port) 326 + Called by kgdb to read a single character directly from the serial 327 + port. If data is available, it should be returned; otherwise 328 + the function should return NO_POLL_CHAR immediately. 329 + 330 + Locking: none. 331 + Interrupts: caller dependent. 332 + This call must not sleep 322 333 323 334 Other functions 324 335 ---------------
+4 -4
include/linux/serial_core.h
··· 37 37 struct device; 38 38 39 39 /* 40 - * This structure describes all the operations that can be 41 - * done on the physical hardware. 40 + * This structure describes all the operations that can be done on the 41 + * physical hardware. See Documentation/serial/driver for details. 42 42 */ 43 43 struct uart_ops { 44 44 unsigned int (*tx_empty)(struct uart_port *); ··· 65 65 /* 66 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 71 * Release IO and memory resources used by the port. ··· 83 83 int (*ioctl)(struct uart_port *, unsigned int, unsigned long); 84 84 #ifdef CONFIG_CONSOLE_POLL 85 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 87 int (*poll_get_char)(struct uart_port *); 88 88 #endif 89 89 };