Lines Matching +full:deep +full:- +full:touch

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
5 * Copyright (C) 2000 Deep Blue Solutions Ltd.
24 ((port)->cons && (port)->cons->index == (port)->line)
36 * struct uart_ops -- interface between serial_core and the driver
57 * - %TIOCM_RTS RTS signal.
58 * - %TIOCM_DTR DTR signal.
59 * - %TIOCM_OUT1 OUT1 signal.
60 * - %TIOCM_OUT2 OUT2 signal.
61 * - %TIOCM_LOOP Set the port into loopback mode.
67 * Locking: @port->lock taken.
77 * - %TIOCM_CAR state of DCD signal
78 * - %TIOCM_CTS state of CTS signal
79 * - %TIOCM_DSR state of DSR signal
80 * - %TIOCM_RI state of RI signal
87 * Locking: @port->lock taken.
99 * Locking: @port->lock taken.
107 * Locking: @port->lock taken.
149 * Locking: @port->lock taken.
157 * Locking: @port->lock taken.
168 * Locking: @port->lock taken.
178 * Locking: caller holds tty_port->mutex
197 * Drivers must not access @port->state once this call has completed.
210 * This will be called whenever the @port->state->xmit circular buffer is
213 * Locking: @port->lock taken.
221 * Update @port->read_status_mask and @port->ignore_status_mask to
225 * - %CSIZE - word size
226 * - %CSTOPB - 2 stop bits
227 * - %PARENB - parity enable
228 * - %PARODD - odd parity (when %PARENB is in force)
229 * - %ADDRB - address bit (changed through uart_port::rs485_config()).
230 * - %CREAD - enable reception of characters (if not set, still receive
232 * - %CRTSCTS - if set, enable CTS status change reporting.
233 * - %CLOCAL - if not set, enable modem status change reporting.
237 * - %INPCK - enable frame and parity error events to be passed to the TTY
239 * - %BRKINT / %PARMRK - both of these enable break events to be passed to
241 * - %IGNPAR - ignore parity and framing errors.
242 * - %IGNBRK - ignore break errors. If %IGNPAR is also set, ignore overrun
260 * Locking: caller holds tty_port->mutex
267 * Documentation/driver-api/tty/tty_ldisc.rst.
269 * Locking: caller holds tty_port->mutex
307 * it should return -%EBUSY on failure.
317 * @port->type should be set to the type found, or %PORT_UNKNOWN if no
352 * Locking: %tty_mutex and tty_port->mutex taken.
475 #define UPIO_MEM (SERIAL_IO_MEM) /* driver-specific */
501 * The remaining bits are serial-core specific and not modifiable by
520 /* Port has hardware-assisted h/w flow control */
524 /* Port has hardware-assisted s/w flow control */
543 #error Change mask not equivalent to userspace-visible bit defines
559 bool hw_stopped; /* sw-assisted CTS flow state */
593 return up->serial_in(up, offset); in serial_port_in()
598 up->serial_out(up, offset, value); in serial_port_out()
602 * enum uart_pm_state - power states for UARTs
634 * uart_xmit_advance - Advance xmit buffer and account Tx'ed chars
644 struct circ_buf *xmit = &up->state->xmit; in uart_xmit_advance()
646 xmit->tail = (xmit->tail + chars) & (UART_XMIT_SIZE - 1); in uart_xmit_advance()
647 up->icount.tx += chars; in uart_xmit_advance()
664 * touch these; they should be initialised to NULL
676 struct circ_buf *xmit = &__port->state->xmit; \
679 for (; (for_test) && (tx_ready); (for_post), __port->icount.tx++) { \
680 if (__port->x_char) { \
681 (ch) = __port->x_char; \
683 __port->x_char = 0; \
690 (ch) = xmit->buf[xmit->tail]; \
692 xmit->tail = (xmit->tail + 1) % UART_XMIT_SIZE; \
702 __port->ops->stop_tx(__port); \
709 * uart_port_tx_limited -- transmit helper for uart_port with count limiting
728 * action before potential invocation of ops->stop_tx() happens. If the
731 * For all of them, @port->lock is held, interrupts are locally disabled and
737 __count--); \
741 * uart_port_tx -- transmit helper for uart_port
767 u64 fifo_timeout = (u64)READ_ONCE(port->frame_time) * port->fifosize; in uart_fifo_timeout()
780 return timeout > 6 ? (timeout / 2 - 2) : 1; in uart_poll_timeout()
833 return uart_console(port) && console_is_registered_locked(port->cons); in uart_console_registered_locked()
838 return uart_console(port) && console_is_registered(port->cons); in uart_console_registered()
870 #define uart_circ_empty(circ) ((circ)->head == (circ)->tail)
871 #define uart_circ_clear(circ) ((circ)->head = (circ)->tail = 0)
874 (CIRC_CNT((circ)->head, (circ)->tail, UART_XMIT_SIZE))
877 (CIRC_SPACE((circ)->head, (circ)->tail, UART_XMIT_SIZE))
881 struct tty_struct *tty = port->state->port.tty; in uart_tx_stopped()
882 if ((tty && tty->flow.stopped) || port->hw_stopped) in uart_tx_stopped()
889 return !!(uport->status & UPSTAT_CTS_ENABLE); in uart_cts_enabled()
896 return ((uport->status & mask) == UPSTAT_CTS_ENABLE); in uart_softcts_mode()
918 if (!port->sysrq) in uart_handle_sysrq_char()
921 if (ch && time_before(jiffies, port->sysrq)) { in uart_handle_sysrq_char()
924 port->sysrq = 0; in uart_handle_sysrq_char()
930 port->sysrq = 0; in uart_handle_sysrq_char()
937 if (!port->sysrq) in uart_prepare_sysrq_char()
940 if (ch && time_before(jiffies, port->sysrq)) { in uart_prepare_sysrq_char()
942 port->sysrq_ch = ch; in uart_prepare_sysrq_char()
943 port->sysrq = 0; in uart_prepare_sysrq_char()
949 port->sysrq = 0; in uart_prepare_sysrq_char()
958 if (!port->has_sysrq) { in uart_unlock_and_check_sysrq()
959 spin_unlock(&port->lock); in uart_unlock_and_check_sysrq()
963 sysrq_ch = port->sysrq_ch; in uart_unlock_and_check_sysrq()
964 port->sysrq_ch = 0; in uart_unlock_and_check_sysrq()
966 spin_unlock(&port->lock); in uart_unlock_and_check_sysrq()
977 if (!port->has_sysrq) { in uart_unlock_and_check_sysrq_irqrestore()
978 spin_unlock_irqrestore(&port->lock, flags); in uart_unlock_and_check_sysrq_irqrestore()
982 sysrq_ch = port->sysrq_ch; in uart_unlock_and_check_sysrq_irqrestore()
983 port->sysrq_ch = 0; in uart_unlock_and_check_sysrq_irqrestore()
985 spin_unlock_irqrestore(&port->lock, flags); in uart_unlock_and_check_sysrq_irqrestore()
1001 spin_unlock(&port->lock); in uart_unlock_and_check_sysrq()
1006 spin_unlock_irqrestore(&port->lock, flags); in uart_unlock_and_check_sysrq_irqrestore()
1015 struct uart_state *state = port->state; in uart_handle_break()
1017 if (port->handle_break) in uart_handle_break()
1018 port->handle_break(port); in uart_handle_break()
1021 if (port->has_sysrq && uart_console(port)) { in uart_handle_break()
1022 if (!port->sysrq) { in uart_handle_break()
1023 port->sysrq = jiffies + SYSRQ_TIMEOUT; in uart_handle_break()
1026 port->sysrq = 0; in uart_handle_break()
1029 if (port->flags & UPF_SAK) in uart_handle_break()
1030 do_SAK(state->port.tty); in uart_handle_break()
1035 * UART_ENABLE_MS - determine if port should enable modem status irqs
1037 #define UART_ENABLE_MS(port,cflag) ((port)->flags & UPF_HARDPPS_CD || \