···133133 Interrupts: locally disabled.134134 This call must not sleep135135136136+ send_xchar(port,ch)137137+ Transmit a high priority character, even if the port is stopped.138138+ This is used to implement XON/XOFF flow control and tcflow(). If139139+ the serial driver does not implement this function, the tty core140140+ will append the character to the circular buffer and then call141141+ start_tx() / stop_tx() to flush the data out.142142+143143+ Locking: none.144144+ Interrupts: caller dependent.145145+136146 stop_rx(port)137147 Stop receiving characters; the port is in the process of138148 being closed.···264254 Locking: none.265255 Interrupts: caller dependent.266256257257+ set_wake(port,state)258258+ Enable/disable power management wakeup on serial activity. Not259259+ currently implemented.260260+267261 type(port)268262 Return a pointer to a string constant describing the specified269263 port, or return NULL, in which case the string 'unknown' is···319305320306 Locking: none.321307 Interrupts: caller dependent.308308+309309+ poll_init(port)310310+ Called by kgdb to perform the minimal hardware initialization needed311311+ to support poll_put_char() and poll_get_char(). Unlike ->startup()312312+ this should not request interrupts.313313+314314+ Locking: tty_mutex and tty_port->mutex taken.315315+ Interrupts: n/a.316316+317317+ poll_put_char(port,ch)318318+ Called by kgdb to write a single character directly to the serial319319+ port. It can and should block until there is space in the TX FIFO.320320+321321+ Locking: none.322322+ Interrupts: caller dependent.323323+ This call must not sleep324324+325325+ poll_get_char(port)326326+ Called by kgdb to read a single character directly from the serial327327+ port. If data is available, it should be returned; otherwise328328+ the function should return NO_POLL_CHAR immediately.329329+330330+ Locking: none.331331+ Interrupts: caller dependent.332332+ This call must not sleep322333323334Other functions324335---------------
+4-4
include/linux/serial_core.h
···3737struct device;38383939/*4040- * This structure describes all the operations that can be4141- * done on the physical hardware.4040+ * This structure describes all the operations that can be done on the4141+ * physical hardware. See Documentation/serial/driver for details.4242 */4343struct uart_ops {4444 unsigned int (*tx_empty)(struct uart_port *);···6565 /*6666 * Return a string describing the type of the port6767 */6868- const char *(*type)(struct uart_port *);6868+ const char *(*type)(struct uart_port *);69697070 /*7171 * Release IO and memory resources used by the port.···8383 int (*ioctl)(struct uart_port *, unsigned int, unsigned long);8484#ifdef CONFIG_CONSOLE_POLL8585 int (*poll_init)(struct uart_port *);8686- void (*poll_put_char)(struct uart_port *, unsigned char);8686+ void (*poll_put_char)(struct uart_port *, unsigned char);8787 int (*poll_get_char)(struct uart_port *);8888#endif8989};