Lines Matching +full:serial +full:- +full:state
2 Low Level Serial API
6 This document is meant as a brief overview of some aspects of the new serial
10 The reference implementation is contained within amba-pl011.c.
14 Low Level Serial Hardware Driver
15 --------------------------------
17 The low level serial hardware driver is responsible for supplying port
19 by uart_ops) to the core serial driver. The low level driver is also
25 ---------------
27 The serial core provides a few helper functions. This includes identifing
38 -------
41 necessary locking using port->lock. There are some exceptions (which
44 There are two locks. A per-port spinlock, and an overall semaphore.
46 From the core driver perspective, the port->lock locks the following
49 port->mctrl
50 port->icount
51 port->state->xmit.head (circ_buf->head)
52 port->state->xmit.tail (circ_buf->tail)
64 --------
85 by 'port' to the state described by mctrl. The relevant bits
88 - TIOCM_RTS RTS signal.
89 - TIOCM_DTR DTR signal.
90 - TIOCM_OUT1 OUT1 signal.
91 - TIOCM_OUT2 OUT2 signal.
92 - TIOCM_LOOP Set the port into loopback mode.
98 Locking: port->lock taken.
105 Returns the current state of modem control inputs. The state
107 track of their state. The state information should include:
109 - TIOCM_CAR state of DCD signal
110 - TIOCM_CTS state of CTS signal
111 - TIOCM_DSR state of DSR signal
112 - TIOCM_RI state of RI signal
119 Locking: port->lock taken.
133 Locking: port->lock taken.
142 Locking: port->lock taken.
149 Notify the serial driver that input buffers for the line discipline are
151 should be sent to the serial port.
158 Notify the serial driver that characters can now be sent to the serial
170 the serial driver does not implement this function, the tty core
184 Locking: port->lock taken.
197 Locking: port->lock taken.
209 Locking: caller holds tty_port->mutex
213 state. Enable the port for reception. It should not activate
228 Drivers must not access port->state once this call has completed.
238 Flush any write buffers, reset any DMA state and stop any
241 This will be called whenever the port->state->xmit circular
244 Locking: port->lock taken.
254 termios->c_cflag bits are:
257 - word size
259 - 2 stop bits
261 - parity enable
263 - odd parity (when PARENB is in force)
265 - enable reception of characters (if not set,
269 - if set, enable CTS status change reporting
271 - if not set, enable modem status change
274 Relevant termios->c_iflag bits are:
277 - enable frame and parity error events to be
280 - both of these enable break events to be
284 - ignore parity and framing errors
286 - ignore break errors, If IGNPAR is also
307 Locking: caller holds tty_port->mutex
314 Notifier for discipline change. See Documentation/driver-api/serial/tty.rst.
316 Locking: caller holds tty_port->mutex
318 pm(port,state,oldstate)
320 port. State indicates the new state (defined by
321 enum uart_pm_state), oldstate indicates the previous state.
353 returns, and it should return -EBUSY on failure.
363 port->type should be set to the type found, or PORT_UNKNOWN if
376 Verify the new serial port information contained within serinfo is
393 to support poll_put_char() and poll_get_char(). Unlike ->startup()
396 Locking: tty_mutex and tty_port->mutex taken.
401 Called by kgdb to write a single character directly to the serial
411 Called by kgdb to read a single character directly from the serial
422 ---------------
425 Update the FIFO drain timeout, port->timeout, according to the
428 Locking: caller is expected to take port->lock
437 If the baud rate is not within min..max, then if old is non-NULL,
471 Locking: port->lock should be held.
477 with the tty layer, and initialise the core driver per-port state.
479 drv->port should be NULL, and the per-port structures should be
504 -----------
518 ----------------------------
523 This will get the {cts,rts,...}-gpios from device tree if they are
540 This will sets the gpios according to the mctrl state.