Home
last modified time | relevance | path

Searched refs:termios (Results 1 – 25 of 180) sorted by relevance

12345678

/linux-6.12.1/arch/alpha/kernel/
Dtermios.c4 int user_termio_to_kernel_termios(struct ktermios *termios, in user_termio_to_kernel_termios() argument
13 termios->c_iflag = (0xffff0000 & termios->c_iflag) | v.c_iflag; in user_termio_to_kernel_termios()
14 termios->c_oflag = (0xffff0000 & termios->c_oflag) | v.c_oflag; in user_termio_to_kernel_termios()
15 termios->c_cflag = (0xffff0000 & termios->c_cflag) | v.c_cflag; in user_termio_to_kernel_termios()
16 termios->c_lflag = (0xffff0000 & termios->c_lflag) | v.c_lflag; in user_termio_to_kernel_termios()
17 termios->c_line = (0xffff0000 & termios->c_lflag) | v.c_line; in user_termio_to_kernel_termios()
20 termios->c_cc[VINTR] = v.c_cc[_VINTR]; in user_termio_to_kernel_termios()
21 termios->c_cc[VQUIT] = v.c_cc[_VQUIT]; in user_termio_to_kernel_termios()
22 termios->c_cc[VERASE] = v.c_cc[_VERASE]; in user_termio_to_kernel_termios()
23 termios->c_cc[VKILL] = v.c_cc[_VKILL]; in user_termio_to_kernel_termios()
[all …]
/linux-6.12.1/drivers/tty/
Dtty_ioctl.c208 struct ktermios *termios = &tty->termios; in unset_locked_termios() local
214 NOSET_MASK(termios->c_iflag, old->c_iflag, locked->c_iflag); in unset_locked_termios()
215 NOSET_MASK(termios->c_oflag, old->c_oflag, locked->c_oflag); in unset_locked_termios()
216 NOSET_MASK(termios->c_cflag, old->c_cflag, locked->c_cflag); in unset_locked_termios()
217 NOSET_MASK(termios->c_lflag, old->c_lflag, locked->c_lflag); in unset_locked_termios()
218 termios->c_line = locked->c_line ? old->c_line : termios->c_line; in unset_locked_termios()
220 termios->c_cc[i] = locked->c_cc[i] ? in unset_locked_termios()
221 old->c_cc[i] : termios->c_cc[i]; in unset_locked_termios()
338 old_termios = tty->termios; in tty_set_termios()
339 tty->termios = *new_termios; in tty_set_termios()
[all …]
Dtty_baudrate.c58 speed_t tty_termios_baud_rate(const struct ktermios *termios) in tty_termios_baud_rate() argument
62 cbaud = termios->c_cflag & CBAUD; in tty_termios_baud_rate()
66 return termios->c_ospeed; in tty_termios_baud_rate()
88 speed_t tty_termios_input_baud_rate(const struct ktermios *termios) in tty_termios_input_baud_rate() argument
90 unsigned int cbaud = (termios->c_cflag >> IBSHIFT) & CBAUD; in tty_termios_input_baud_rate()
93 return tty_termios_baud_rate(termios); in tty_termios_input_baud_rate()
97 return termios->c_ispeed; in tty_termios_input_baud_rate()
129 void tty_termios_encode_baud_rate(struct ktermios *termios, in tty_termios_encode_baud_rate() argument
140 termios->c_ispeed = ibaud; in tty_termios_encode_baud_rate()
141 termios->c_ospeed = obaud; in tty_termios_encode_baud_rate()
[all …]
/linux-6.12.1/include/linux/
Dtty.h34 #define INTR_CHAR(tty) ((tty)->termios.c_cc[VINTR])
35 #define QUIT_CHAR(tty) ((tty)->termios.c_cc[VQUIT])
36 #define ERASE_CHAR(tty) ((tty)->termios.c_cc[VERASE])
37 #define KILL_CHAR(tty) ((tty)->termios.c_cc[VKILL])
38 #define EOF_CHAR(tty) ((tty)->termios.c_cc[VEOF])
39 #define TIME_CHAR(tty) ((tty)->termios.c_cc[VTIME])
40 #define MIN_CHAR(tty) ((tty)->termios.c_cc[VMIN])
41 #define SWTC_CHAR(tty) ((tty)->termios.c_cc[VSWTC])
42 #define START_CHAR(tty) ((tty)->termios.c_cc[VSTART])
43 #define STOP_CHAR(tty) ((tty)->termios.c_cc[VSTOP])
[all …]
Dtermios_internal.h42 int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *);
43 int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *);
45 int user_termios_to_kernel_termios(struct ktermios *, struct termios __user *);
46 int kernel_termios_to_user_termios(struct termios __user *, struct ktermios *);
/linux-6.12.1/drivers/usb/serial/
Dempeg.c79 struct ktermios *termios = &tty->termios; in empeg_init_termios() local
90 termios->c_iflag in empeg_init_termios()
100 termios->c_oflag in empeg_init_termios()
103 termios->c_lflag in empeg_init_termios()
110 termios->c_cflag in empeg_init_termios()
115 termios->c_cflag in empeg_init_termios()
/linux-6.12.1/drivers/tty/serial/
D21285.c224 serial21285_set_termios(struct uart_port *port, struct ktermios *termios, in serial21285_set_termios() argument
233 termios->c_cflag &= ~(HUPCL | CRTSCTS | CMSPAR); in serial21285_set_termios()
234 termios->c_cflag |= CLOCAL; in serial21285_set_termios()
239 termios->c_iflag &= ~(IGNBRK | BRKINT); in serial21285_set_termios()
244 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); in serial21285_set_termios()
247 tty_termios_encode_baud_rate(termios, b, b); in serial21285_set_termios()
249 switch (termios->c_cflag & CSIZE) { in serial21285_set_termios()
264 if (termios->c_cflag & CSTOPB) in serial21285_set_termios()
266 if (termios->c_cflag & PARENB) { in serial21285_set_termios()
268 if (!(termios->c_cflag & PARODD)) in serial21285_set_termios()
[all …]
Dfsl_linflexuart.c403 linflex_set_termios(struct uart_port *port, struct ktermios *termios, in linflex_set_termios() argument
433 while ((termios->c_cflag & CSIZE) != CS8 && in linflex_set_termios()
434 (termios->c_cflag & CSIZE) != CS7) { in linflex_set_termios()
435 termios->c_cflag &= ~CSIZE; in linflex_set_termios()
436 termios->c_cflag |= old_csize; in linflex_set_termios()
440 if ((termios->c_cflag & CSIZE) == CS7) { in linflex_set_termios()
445 if ((termios->c_cflag & CSIZE) == CS8) { in linflex_set_termios()
450 if (termios->c_cflag & CMSPAR) { in linflex_set_termios()
451 if ((termios->c_cflag & CSIZE) != CS8) { in linflex_set_termios()
452 termios->c_cflag &= ~CSIZE; in linflex_set_termios()
[all …]
Dfsl_lpuart.c1346 struct ktermios *termios = &tty->termios; in lpuart_start_rx_dma() local
1348 unsigned int bits = tty_get_frame_size(termios->c_cflag); in lpuart_start_rx_dma()
1448 static int lpuart_config_rs485(struct uart_port *port, struct ktermios *termios, in lpuart_config_rs485() argument
1478 static int lpuart32_config_rs485(struct uart_port *port, struct ktermios *termios, in lpuart32_config_rs485() argument
1973 lpuart_set_termios(struct uart_port *port, struct ktermios *termios, in lpuart_set_termios() argument
1997 while ((termios->c_cflag & CSIZE) != CS8 && in lpuart_set_termios()
1998 (termios->c_cflag & CSIZE) != CS7) { in lpuart_set_termios()
1999 termios->c_cflag &= ~CSIZE; in lpuart_set_termios()
2000 termios->c_cflag |= old_csize; in lpuart_set_termios()
2004 if ((termios->c_cflag & CSIZE) == CS8 || in lpuart_set_termios()
[all …]
Damba-pl010.c351 pl010_set_termios(struct uart_port *port, struct ktermios *termios, in pl010_set_termios() argument
361 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / 16); in pl010_set_termios()
364 switch (termios->c_cflag & CSIZE) { in pl010_set_termios()
378 if (termios->c_cflag & CSTOPB) in pl010_set_termios()
380 if (termios->c_cflag & PARENB) { in pl010_set_termios()
382 if (!(termios->c_cflag & PARODD)) in pl010_set_termios()
393 uart_update_timeout(port, termios->c_cflag, baud); in pl010_set_termios()
396 if (termios->c_iflag & INPCK) in pl010_set_termios()
398 if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK)) in pl010_set_termios()
405 if (termios->c_iflag & IGNPAR) in pl010_set_termios()
[all …]
Ddigicolor-usart.c287 struct ktermios *termios, in digicolor_uart_set_termios() argument
295 termios->c_cflag &= ~CMSPAR; in digicolor_uart_set_termios()
296 termios->c_iflag &= ~(BRKINT | IGNBRK); in digicolor_uart_set_termios()
299 baud = uart_get_baud_rate(port, termios, old, in digicolor_uart_set_termios()
304 switch (termios->c_cflag & CSIZE) { in digicolor_uart_set_termios()
310 termios->c_cflag &= ~CSIZE; in digicolor_uart_set_termios()
311 termios->c_cflag |= CS8; in digicolor_uart_set_termios()
315 if (termios->c_cflag & CSTOPB) in digicolor_uart_set_termios()
318 if (termios->c_cflag & PARENB) { in digicolor_uart_set_termios()
320 if (termios->c_cflag & PARODD) in digicolor_uart_set_termios()
[all …]
Dclps711x.c221 struct ktermios *termios) in uart_clps711x_set_ldisc() argument
227 (termios->c_line == N_IRDA) ? SYSCON1_SIREN : 0); in uart_clps711x_set_ldisc()
253 struct ktermios *termios, in uart_clps711x_set_termios() argument
260 termios->c_cflag &= ~CMSPAR; in uart_clps711x_set_termios()
261 termios->c_iflag &= ~(BRKINT | IGNBRK); in uart_clps711x_set_termios()
264 baud = uart_get_baud_rate(port, termios, old, port->uartclk / 4096, in uart_clps711x_set_termios()
268 switch (termios->c_cflag & CSIZE) { in uart_clps711x_set_termios()
284 if (termios->c_cflag & CSTOPB) in uart_clps711x_set_termios()
287 if (termios->c_cflag & PARENB) { in uart_clps711x_set_termios()
289 if (!(termios->c_cflag & PARODD)) in uart_clps711x_set_termios()
[all …]
Dsunplus-uart.c335 struct ktermios *termios, in sunplus_set_termios() argument
342 baud = uart_get_baud_rate(port, termios, oldtermios, 0, port->uartclk / 16); in sunplus_set_termios()
352 switch (termios->c_cflag & CSIZE) { in sunplus_set_termios()
367 if (termios->c_cflag & CSTOPB) in sunplus_set_termios()
370 if (termios->c_cflag & PARENB) { in sunplus_set_termios()
373 if (!(termios->c_cflag & PARODD)) in sunplus_set_termios()
379 uart_update_timeout(port, termios->c_cflag, baud); in sunplus_set_termios()
382 if (termios->c_iflag & INPCK) in sunplus_set_termios()
385 if (termios->c_iflag & (BRKINT | PARMRK)) in sunplus_set_termios()
390 if (termios->c_iflag & IGNPAR) in sunplus_set_termios()
[all …]
Dvt8500_serial.c336 struct ktermios *termios, in vt8500_set_termios() argument
348 baud = uart_get_baud_rate(port, termios, old, 900, 921600); in vt8500_set_termios()
350 if (tty_termios_baud_rate(termios)) in vt8500_set_termios()
351 tty_termios_encode_baud_rate(termios, baud, baud); in vt8500_set_termios()
356 if (termios->c_cflag & PARENB) { in vt8500_set_termios()
358 termios->c_cflag &= ~CMSPAR; in vt8500_set_termios()
359 if (termios->c_cflag & PARODD) in vt8500_set_termios()
365 switch (termios->c_cflag & CSIZE) { in vt8500_set_termios()
371 termios->c_cflag &= ~CSIZE; in vt8500_set_termios()
372 termios->c_cflag |= CS8; in vt8500_set_termios()
[all …]
Dsa1100.c386 sa1100_set_termios(struct uart_port *port, struct ktermios *termios, in sa1100_set_termios() argument
398 while ((termios->c_cflag & CSIZE) != CS7 && in sa1100_set_termios()
399 (termios->c_cflag & CSIZE) != CS8) { in sa1100_set_termios()
400 termios->c_cflag &= ~CSIZE; in sa1100_set_termios()
401 termios->c_cflag |= old_csize; in sa1100_set_termios()
405 if ((termios->c_cflag & CSIZE) == CS8) in sa1100_set_termios()
410 if (termios->c_cflag & CSTOPB) in sa1100_set_termios()
412 if (termios->c_cflag & PARENB) { in sa1100_set_termios()
414 if (!(termios->c_cflag & PARODD)) in sa1100_set_termios()
421 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); in sa1100_set_termios()
[all …]
Dmilbeaut_usio.c300 struct ktermios *termios, in mlb_usio_set_termios() argument
306 switch (termios->c_cflag & CSIZE) { in mlb_usio_set_termios()
322 if (termios->c_cflag & CSTOPB) in mlb_usio_set_termios()
325 if (termios->c_cflag & PARENB) { in mlb_usio_set_termios()
327 if (termios->c_cflag & PARODD) in mlb_usio_set_termios()
332 (termios->c_cflag & CRTSCTS)) in mlb_usio_set_termios()
335 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk); in mlb_usio_set_termios()
342 uart_update_timeout(port, termios->c_cflag, baud); in mlb_usio_set_termios()
345 if (termios->c_iflag & INPCK) in mlb_usio_set_termios()
349 if (termios->c_iflag & IGNPAR) in mlb_usio_set_termios()
[all …]
Dserial_txx9.c574 serial_txx9_set_termios(struct uart_port *up, struct ktermios *termios, in serial_txx9_set_termios() argument
584 termios->c_cflag &= ~(HUPCL | CMSPAR); in serial_txx9_set_termios()
585 termios->c_cflag |= CLOCAL; in serial_txx9_set_termios()
590 switch (termios->c_cflag & CSIZE) { in serial_txx9_set_termios()
599 termios->c_cflag &= ~CSIZE; in serial_txx9_set_termios()
600 termios->c_cflag |= CS8; in serial_txx9_set_termios()
605 if (termios->c_cflag & CSTOPB) in serial_txx9_set_termios()
610 if (termios->c_cflag & PARENB) in serial_txx9_set_termios()
612 if (!(termios->c_cflag & PARODD)) in serial_txx9_set_termios()
618 baud = uart_get_baud_rate(up, termios, old, 0, up->uartclk/16/2); in serial_txx9_set_termios()
[all …]
Ddz.c559 static void dz_set_termios(struct uart_port *uport, struct ktermios *termios, in dz_set_termios() argument
569 switch (termios->c_cflag & CSIZE) { in dz_set_termios()
584 if (termios->c_cflag & CSTOPB) in dz_set_termios()
586 if (termios->c_cflag & PARENB) in dz_set_termios()
588 if (termios->c_cflag & PARODD) in dz_set_termios()
591 baud = uart_get_baud_rate(uport, termios, old_termios, 50, 9600); in dz_set_termios()
603 tty_termios_encode_baud_rate(termios, baud, baud); in dz_set_termios()
607 if (termios->c_cflag & CREAD) in dz_set_termios()
612 uart_update_timeout(uport, termios->c_cflag, baud); in dz_set_termios()
619 if (termios->c_iflag & INPCK) in dz_set_termios()
[all …]
/linux-6.12.1/arch/sparc/kernel/
Dtermios.c16 struct ktermios *termios) in kernel_termios_to_user_termio() argument
20 v.c_iflag = termios->c_iflag; in kernel_termios_to_user_termio()
21 v.c_oflag = termios->c_oflag; in kernel_termios_to_user_termio()
22 v.c_cflag = termios->c_cflag; in kernel_termios_to_user_termio()
23 v.c_lflag = termios->c_lflag; in kernel_termios_to_user_termio()
24 v.c_line = termios->c_line; in kernel_termios_to_user_termio()
25 memcpy(v.c_cc, termios->c_cc, NCC); in kernel_termios_to_user_termio()
27 v.c_cc[_VMIN] = termios->c_cc[VMIN]; in kernel_termios_to_user_termio()
28 v.c_cc[_VTIME] = termios->c_cc[VTIME]; in kernel_termios_to_user_termio()
78 struct termios __user *u) in user_termios_to_kernel_termios_1()
[all …]
/linux-6.12.1/drivers/tty/serial/jsm/
Djsm_tty.c153 struct ktermios *termios; in jsm_tty_send_xchar() local
156 termios = &port->state->port.tty->termios; in jsm_tty_send_xchar()
157 if (ch == termios->c_cc[VSTART]) in jsm_tty_send_xchar()
160 if (ch == termios->c_cc[VSTOP]) in jsm_tty_send_xchar()
194 struct ktermios *termios; in jsm_tty_open() local
245 termios = &port->state->port.tty->termios; in jsm_tty_open()
246 channel->ch_c_cflag = termios->c_cflag; in jsm_tty_open()
247 channel->ch_c_iflag = termios->c_iflag; in jsm_tty_open()
248 channel->ch_c_oflag = termios->c_oflag; in jsm_tty_open()
249 channel->ch_c_lflag = termios->c_lflag; in jsm_tty_open()
[all …]
/linux-6.12.1/drivers/tty/serial/8250/
D8250_dwlib.c95 void dw8250_do_set_termios(struct uart_port *p, struct ktermios *termios, in dw8250_do_set_termios() argument
99 if (termios->c_cflag & CRTSCTS) in dw8250_do_set_termios()
102 serial8250_do_set_termios(p, termios, old); in dw8250_do_set_termios()
139 struct ktermios *termios) in dw8250_rs485_set_addr() argument
145 if (termios) in dw8250_rs485_set_addr()
146 termios->c_cflag |= ADDRB; in dw8250_rs485_set_addr()
180 static int dw8250_rs485_config(struct uart_port *p, struct ktermios *termios, in dw8250_rs485_config() argument
198 if (termios) in dw8250_rs485_config()
199 termios->c_cflag &= ~ADDRB; in dw8250_rs485_config()
217 dw8250_rs485_set_addr(p, rs485, termios); in dw8250_rs485_config()
/linux-6.12.1/arch/parisc/include/uapi/asm/
Dioctls.h9 #define TCGETS _IOR('T', 16, struct termios) /* TCGETATTR */
10 #define TCSETS _IOW('T', 17, struct termios) /* TCSETATTR */
11 #define TCSETSW _IOW('T', 18, struct termios) /* TCSETATTRD */
12 #define TCSETSF _IOW('T', 19, struct termios) /* TCSETATTRF */
/linux-6.12.1/drivers/mmc/core/
Dsdio_uart.c246 struct ktermios *termios, in sdio_uart_change_speed() argument
252 cval = UART_LCR_WLEN(tty_get_char_size(termios->c_cflag)); in sdio_uart_change_speed()
254 if (termios->c_cflag & CSTOPB) in sdio_uart_change_speed()
256 if (termios->c_cflag & PARENB) in sdio_uart_change_speed()
258 if (!(termios->c_cflag & PARODD)) in sdio_uart_change_speed()
262 baud = tty_termios_baud_rate(termios); in sdio_uart_change_speed()
271 termios->c_cflag &= ~CBAUD; in sdio_uart_change_speed()
273 termios->c_cflag |= old->c_cflag & CBAUD; in sdio_uart_change_speed()
276 termios->c_cflag |= B9600; in sdio_uart_change_speed()
286 if (termios->c_iflag & INPCK) in sdio_uart_change_speed()
[all …]
/linux-6.12.1/arch/powerpc/include/uapi/asm/
Dioctls.h21 #define TCGETS _IOR('t', 19, struct termios)
22 #define TCSETS _IOW('t', 20, struct termios)
23 #define TCSETSW _IOW('t', 21, struct termios)
24 #define TCSETSF _IOW('t', 22, struct termios)
/linux-6.12.1/arch/alpha/include/uapi/asm/
Dioctls.h21 #define TCGETS _IOR('t', 19, struct termios)
22 #define TCSETS _IOW('t', 20, struct termios)
23 #define TCSETSW _IOW('t', 21, struct termios)
24 #define TCSETSF _IOW('t', 22, struct termios)

12345678