• Home
  • Raw
  • Download

Lines Matching +full:port +full:- +full:level

2 Low Level Serial API
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
20 responsible for handling interrupts for the port, and providing any
25 ---------------
28 the correct port structure (via uart_get_console) and decoding command line
38 -------
40 It is the responsibility of the low level hardware driver to perform the
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)
54 The low level driver is free to use this lock to provide any additional
60 commonly referred to as the port mutex.
64 --------
70 tx_empty(port)
72 for the port described by 'port' is empty. If it is empty,
74 If the port does not support this operation, then it should
83 set_mctrl(port, mctrl)
84 This function sets the modem control lines for port described
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.
104 get_mctrl(port)
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
115 the port does not support CTS, DCD or DSR, the driver should
119 Locking: port->lock taken.
125 stop_tx(port)
133 Locking: port->lock taken.
139 start_tx(port)
142 Locking: port->lock taken.
148 throttle(port)
151 should be sent to the serial port.
157 unthrottle(port)
159 port without fear of overrunning the input buffers of the line
167 send_xchar(port,ch)
168 Transmit a high priority character, even if the port is stopped.
180 stop_rx(port)
181 Stop receiving characters; the port is in the process of
184 Locking: port->lock taken.
190 enable_ms(port)
197 Locking: port->lock taken.
203 break_ctl(port,ctl)
209 Locking: caller holds tty_port->mutex
211 startup(port)
212 Grab any interrupt resources and initialise any low level driver
213 state. Enable the port for reception. It should not activate
216 This method will only be called when the port is initially opened.
222 shutdown(port)
223 Disable the port, disable any break condition that may be in
228 Drivers must not access port->state once this call has completed.
231 this port.
237 flush_buffer(port)
241 This will be called whenever the port->state->xmit circular
244 Locking: port->lock taken.
250 set_termios(port,termios,oldtermios)
251 Change the port parameters, including word length, parity, stop
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,
266 still receive characters from the port, but
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
313 set_ldisc(port,termios)
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
325 This will be called when the port is initially opened and finally
326 closed, except when the port is also the system console. This
333 type(port)
335 port, or return NULL, in which case the string 'unknown' is
342 release_port(port)
344 the port.
350 request_port(port)
351 Request any memory and IO region resources required by the port.
353 returns, and it should return -EBUSY on failure.
359 config_port(port,type)
360 Perform any autoconfiguration steps required for the port. `type`
362 indicates that the port requires detection and identification.
363 port->type should be set to the type found, or PORT_UNKNOWN if
364 no port was detected.
375 verify_port(port,serinfo)
376 Verify the new serial port information contained within serinfo is
377 suitable for this port type.
383 ioctl(port,cmd,arg)
384 Perform any port specific IOCTLs. IOCTL commands must be defined
391 poll_init(port)
393 to support poll_put_char() and poll_get_char(). Unlike ->startup()
396 Locking: tty_mutex and tty_port->mutex taken.
400 poll_put_char(port,ch)
402 port. It can and should block until there is space in the TX FIFO.
410 poll_get_char(port)
412 port. If data is available, it should be returned; otherwise
422 ---------------
424 uart_update_timeout(port,cflag,baud)
425 Update the FIFO drain timeout, port->timeout, according to the
428 Locking: caller is expected to take port->lock
432 uart_get_baud_rate(port,termios,old,min,max)
437 If the baud rate is not within min..max, then if old is non-NULL,
448 uart_get_divisor(port,baud)
461 uart_port structures describe the same port.
467 uart_write_wakeup(port)
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
488 level driver must have removed all its ports via the
504 -----------
507 allow low level drivers to register their own individual uart_port's with
513 struct uart_port port;
518 ----------------------------
522 mctrl_gpio_init(port, idx):
523 This will get the {cts,rts,...}-gpios from device tree if they are