/drivers/tty/ |
D | tty_ioctl.c | 244 struct ktermios *termios = &tty->termios; in unset_locked_termios() local 250 NOSET_MASK(termios->c_iflag, old->c_iflag, locked->c_iflag); in unset_locked_termios() 251 NOSET_MASK(termios->c_oflag, old->c_oflag, locked->c_oflag); in unset_locked_termios() 252 NOSET_MASK(termios->c_cflag, old->c_cflag, locked->c_cflag); in unset_locked_termios() 253 NOSET_MASK(termios->c_lflag, old->c_lflag, locked->c_lflag); in unset_locked_termios() 254 termios->c_line = locked->c_line ? old->c_line : termios->c_line; in unset_locked_termios() 256 termios->c_cc[i] = locked->c_cc[i] ? in unset_locked_termios() 257 old->c_cc[i] : termios->c_cc[i]; in unset_locked_termios() 309 speed_t tty_termios_baud_rate(struct ktermios *termios) in tty_termios_baud_rate() argument 313 cbaud = termios->c_cflag & CBAUD; in tty_termios_baud_rate() [all …]
|
/drivers/tty/serial/ |
D | 21285.c | 209 serial21285_set_termios(struct uart_port *port, struct ktermios *termios, in serial21285_set_termios() argument 218 termios->c_cflag &= ~(HUPCL | CRTSCTS | CMSPAR); in serial21285_set_termios() 219 termios->c_cflag |= CLOCAL; in serial21285_set_termios() 224 termios->c_iflag &= ~(IGNBRK | BRKINT); in serial21285_set_termios() 229 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); in serial21285_set_termios() 232 tty_termios_encode_baud_rate(termios, b, b); in serial21285_set_termios() 234 switch (termios->c_cflag & CSIZE) { in serial21285_set_termios() 249 if (termios->c_cflag & CSTOPB) in serial21285_set_termios() 251 if (termios->c_cflag & PARENB) { in serial21285_set_termios() 253 if (!(termios->c_cflag & PARODD)) in serial21285_set_termios() [all …]
|
D | fsl_lpuart.c | 837 struct ktermios *termios = &tty->termios; in lpuart_start_rx_dma() local 841 bits = (termios->c_cflag & CSIZE) == CS7 ? 9 : 10; in lpuart_start_rx_dma() 842 if (termios->c_cflag & PARENB) in lpuart_start_rx_dma() 1266 lpuart_set_termios(struct uart_port *port, struct ktermios *termios, in lpuart_set_termios() argument 1290 while ((termios->c_cflag & CSIZE) != CS8 && in lpuart_set_termios() 1291 (termios->c_cflag & CSIZE) != CS7) { in lpuart_set_termios() 1292 termios->c_cflag &= ~CSIZE; in lpuart_set_termios() 1293 termios->c_cflag |= old_csize; in lpuart_set_termios() 1297 if ((termios->c_cflag & CSIZE) == CS8 || in lpuart_set_termios() 1298 (termios->c_cflag & CSIZE) == CS7) in lpuart_set_termios() [all …]
|
D | serial_ks8695.c | 382 static void ks8695uart_set_termios(struct uart_port *port, struct ktermios *termios, struct ktermio… in ks8695uart_set_termios() argument 391 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); in ks8695uart_set_termios() 394 switch (termios->c_cflag & CSIZE) { in ks8695uart_set_termios() 410 if (termios->c_cflag & CSTOPB) in ks8695uart_set_termios() 414 if (termios->c_cflag & PARENB) { in ks8695uart_set_termios() 415 if (termios->c_cflag & CMSPAR) { /* Mark or Space parity */ in ks8695uart_set_termios() 416 if (termios->c_cflag & PARODD) in ks8695uart_set_termios() 421 else if (termios->c_cflag & PARODD) in ks8695uart_set_termios() 435 uart_update_timeout(port, termios->c_cflag, baud); in ks8695uart_set_termios() 438 if (termios->c_iflag & INPCK) in ks8695uart_set_termios() [all …]
|
D | pnx8xxx_uart.c | 443 pnx8xxx_set_termios(struct uart_port *port, struct ktermios *termios, in pnx8xxx_set_termios() argument 455 while ((termios->c_cflag & CSIZE) != CS7 && in pnx8xxx_set_termios() 456 (termios->c_cflag & CSIZE) != CS8) { in pnx8xxx_set_termios() 457 termios->c_cflag &= ~CSIZE; in pnx8xxx_set_termios() 458 termios->c_cflag |= old_csize; in pnx8xxx_set_termios() 462 if ((termios->c_cflag & CSIZE) == CS8) in pnx8xxx_set_termios() 467 if (termios->c_cflag & CSTOPB) in pnx8xxx_set_termios() 469 if (termios->c_cflag & PARENB) { in pnx8xxx_set_termios() 471 if (!(termios->c_cflag & PARODD)) in pnx8xxx_set_termios() 478 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); in pnx8xxx_set_termios() [all …]
|
D | sprd_serial.c | 371 struct ktermios *termios, in sprd_set_termios() argument 379 baud = uart_get_baud_rate(port, termios, old, 0, SPRD_BAUD_IO_LIMIT); in sprd_set_termios() 384 switch (termios->c_cflag & CSIZE) { in sprd_set_termios() 402 if (termios->c_cflag & CSTOPB) in sprd_set_termios() 409 termios->c_cflag &= ~CMSPAR; /* no support mark/space */ in sprd_set_termios() 410 if (termios->c_cflag & PARENB) { in sprd_set_termios() 412 if (termios->c_cflag & PARODD) in sprd_set_termios() 421 uart_update_timeout(port, termios->c_cflag, baud); in sprd_set_termios() 424 if (termios->c_iflag & INPCK) in sprd_set_termios() 426 if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK)) in sprd_set_termios() [all …]
|
D | clps711x.c | 229 struct ktermios *termios) in uart_clps711x_set_ldisc() argument 235 (termios->c_line == N_IRDA) ? SYSCON1_SIREN : 0); in uart_clps711x_set_ldisc() 261 struct ktermios *termios, in uart_clps711x_set_termios() argument 268 termios->c_cflag &= ~CMSPAR; in uart_clps711x_set_termios() 269 termios->c_iflag &= ~(BRKINT | IGNBRK); in uart_clps711x_set_termios() 272 baud = uart_get_baud_rate(port, termios, old, port->uartclk / 4096, in uart_clps711x_set_termios() 276 switch (termios->c_cflag & CSIZE) { in uart_clps711x_set_termios() 292 if (termios->c_cflag & CSTOPB) in uart_clps711x_set_termios() 295 if (termios->c_cflag & PARENB) { in uart_clps711x_set_termios() 297 if (!(termios->c_cflag & PARODD)) in uart_clps711x_set_termios() [all …]
|
D | amba-pl010.c | 394 pl010_set_termios(struct uart_port *port, struct ktermios *termios, in pl010_set_termios() argument 406 baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16); in pl010_set_termios() 409 switch (termios->c_cflag & CSIZE) { in pl010_set_termios() 423 if (termios->c_cflag & CSTOPB) in pl010_set_termios() 425 if (termios->c_cflag & PARENB) { in pl010_set_termios() 427 if (!(termios->c_cflag & PARODD)) in pl010_set_termios() 438 uart_update_timeout(port, termios->c_cflag, baud); in pl010_set_termios() 441 if (termios->c_iflag & INPCK) in pl010_set_termios() 443 if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK)) in pl010_set_termios() 450 if (termios->c_iflag & IGNPAR) in pl010_set_termios() [all …]
|
D | vt8500_serial.c | 371 struct ktermios *termios, in vt8500_set_termios() argument 383 baud = uart_get_baud_rate(port, termios, old, 900, 921600); in vt8500_set_termios() 385 if (tty_termios_baud_rate(termios)) in vt8500_set_termios() 386 tty_termios_encode_baud_rate(termios, baud, baud); in vt8500_set_termios() 391 if (termios->c_cflag & PARENB) { in vt8500_set_termios() 393 termios->c_cflag &= ~CMSPAR; in vt8500_set_termios() 394 if (termios->c_cflag & PARODD) in vt8500_set_termios() 400 switch (termios->c_cflag & CSIZE) { in vt8500_set_termios() 406 termios->c_cflag &= ~CSIZE; in vt8500_set_termios() 407 termios->c_cflag |= CS8; in vt8500_set_termios() [all …]
|
D | netx-serial.c | 337 netx_set_termios(struct uart_port *port, struct ktermios *termios, in netx_set_termios() argument 345 switch (termios->c_cflag & CSIZE) { in netx_set_termios() 360 if (termios->c_cflag & CSTOPB) in netx_set_termios() 363 if (termios->c_cflag & PARENB) { in netx_set_termios() 365 if (!(termios->c_cflag & PARODD)) in netx_set_termios() 369 if (termios->c_cflag & CRTSCTS) in netx_set_termios() 372 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); in netx_set_termios() 380 uart_update_timeout(port, termios->c_cflag, baud); in netx_set_termios() 396 if (UART_ENABLE_MS(port, termios->c_cflag)) in netx_set_termios() 409 if (termios->c_iflag & IGNPAR) in netx_set_termios() [all …]
|
D | sa1100.c | 417 sa1100_set_termios(struct uart_port *port, struct ktermios *termios, in sa1100_set_termios() argument 429 while ((termios->c_cflag & CSIZE) != CS7 && in sa1100_set_termios() 430 (termios->c_cflag & CSIZE) != CS8) { in sa1100_set_termios() 431 termios->c_cflag &= ~CSIZE; in sa1100_set_termios() 432 termios->c_cflag |= old_csize; in sa1100_set_termios() 436 if ((termios->c_cflag & CSIZE) == CS8) in sa1100_set_termios() 441 if (termios->c_cflag & CSTOPB) in sa1100_set_termios() 443 if (termios->c_cflag & PARENB) { in sa1100_set_termios() 445 if (!(termios->c_cflag & PARODD)) in sa1100_set_termios() 452 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); in sa1100_set_termios() [all …]
|
D | digicolor-usart.c | 293 struct ktermios *termios, in digicolor_uart_set_termios() argument 301 termios->c_cflag &= ~CMSPAR; in digicolor_uart_set_termios() 302 termios->c_iflag &= ~(BRKINT | IGNBRK); in digicolor_uart_set_termios() 305 baud = uart_get_baud_rate(port, termios, old, in digicolor_uart_set_termios() 310 switch (termios->c_cflag & CSIZE) { in digicolor_uart_set_termios() 319 if (termios->c_cflag & CSTOPB) in digicolor_uart_set_termios() 322 if (termios->c_cflag & PARENB) { in digicolor_uart_set_termios() 324 if (termios->c_cflag & PARODD) in digicolor_uart_set_termios() 330 if (termios->c_iflag & INPCK) in digicolor_uart_set_termios() 336 if (!(termios->c_cflag & CREAD)) in digicolor_uart_set_termios() [all …]
|
D | dz.c | 564 static void dz_set_termios(struct uart_port *uport, struct ktermios *termios, in dz_set_termios() argument 574 switch (termios->c_cflag & CSIZE) { in dz_set_termios() 589 if (termios->c_cflag & CSTOPB) in dz_set_termios() 591 if (termios->c_cflag & PARENB) in dz_set_termios() 593 if (termios->c_cflag & PARODD) in dz_set_termios() 596 baud = uart_get_baud_rate(uport, termios, old_termios, 50, 9600); in dz_set_termios() 605 tty_termios_encode_baud_rate(termios, baud, baud); in dz_set_termios() 609 if (termios->c_cflag & CREAD) in dz_set_termios() 614 uart_update_timeout(uport, termios->c_cflag, baud); in dz_set_termios() 621 if (termios->c_iflag & INPCK) in dz_set_termios() [all …]
|
D | m32r_sio.c | 635 struct ktermios *termios, struct ktermios *old) in m32r_sio_set_termios() argument 643 switch (termios->c_cflag & CSIZE) { in m32r_sio_set_termios() 659 if (termios->c_cflag & CSTOPB) in m32r_sio_set_termios() 661 if (termios->c_cflag & PARENB) in m32r_sio_set_termios() 663 if (!(termios->c_cflag & PARODD)) in m32r_sio_set_termios() 666 if (termios->c_cflag & CMSPAR) in m32r_sio_set_termios() 674 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/4); in m32r_sio_set_termios() 676 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); in m32r_sio_set_termios() 691 uart_update_timeout(port, termios->c_cflag, baud); in m32r_sio_set_termios() 694 if (termios->c_iflag & INPCK) in m32r_sio_set_termios() [all …]
|
D | serial_core.c | 205 tty->termios.c_cflag = uport->cons->cflag; in uart_port_startup() 273 uport->cons->cflag = tty->termios.c_cflag; in uart_shutdown() 367 uart_get_baud_rate(struct uart_port *port, struct ktermios *termios, in uart_get_baud_rate() argument 395 baud = tty_termios_baud_rate(termios); in uart_get_baud_rate() 419 termios->c_cflag &= ~CBAUD; in uart_get_baud_rate() 423 tty_termios_encode_baud_rate(termios, in uart_get_baud_rate() 435 tty_termios_encode_baud_rate(termios, in uart_get_baud_rate() 438 tty_termios_encode_baud_rate(termios, in uart_get_baud_rate() 479 struct ktermios *termios; in uart_change_speed() local 489 termios = &tty->termios; in uart_change_speed() [all …]
|
D | pxa.c | 432 serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios, in serial_pxa_set_termios() argument 441 switch (termios->c_cflag & CSIZE) { in serial_pxa_set_termios() 457 if (termios->c_cflag & CSTOPB) in serial_pxa_set_termios() 459 if (termios->c_cflag & PARENB) in serial_pxa_set_termios() 461 if (!(termios->c_cflag & PARODD)) in serial_pxa_set_termios() 467 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); in serial_pxa_set_termios() 492 uart_update_timeout(port, termios->c_cflag, baud); in serial_pxa_set_termios() 495 if (termios->c_iflag & INPCK) in serial_pxa_set_termios() 497 if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK)) in serial_pxa_set_termios() 504 if (termios->c_iflag & IGNPAR) in serial_pxa_set_termios() [all …]
|
D | mps2-uart.c | 331 mps2_uart_set_termios(struct uart_port *port, struct ktermios *termios, in mps2_uart_set_termios() argument 337 termios->c_cflag &= ~(CRTSCTS | CMSPAR); in mps2_uart_set_termios() 338 termios->c_cflag &= ~CSIZE; in mps2_uart_set_termios() 339 termios->c_cflag |= CS8; in mps2_uart_set_termios() 340 termios->c_cflag &= ~PARENB; in mps2_uart_set_termios() 341 termios->c_cflag &= ~CSTOPB; in mps2_uart_set_termios() 343 baud = uart_get_baud_rate(port, termios, old, in mps2_uart_set_termios() 351 uart_update_timeout(port, termios->c_cflag, baud); in mps2_uart_set_termios() 356 if (tty_termios_baud_rate(termios)) in mps2_uart_set_termios() 357 tty_termios_encode_baud_rate(termios, baud, baud); in mps2_uart_set_termios()
|
/drivers/usb/serial/ |
D | empeg.c | 83 struct ktermios *termios = &tty->termios; in empeg_init_termios() local 94 termios->c_iflag in empeg_init_termios() 104 termios->c_oflag in empeg_init_termios() 107 termios->c_lflag in empeg_init_termios() 114 termios->c_cflag in empeg_init_termios() 119 termios->c_cflag in empeg_init_termios()
|
D | kl5kusb105.c | 116 struct ktermios termios; member 283 priv->termios.c_iflag = tty->termios.c_iflag; in klsi_105_open() 284 priv->termios.c_oflag = tty->termios.c_oflag; in klsi_105_open() 285 priv->termios.c_cflag = tty->termios.c_cflag; in klsi_105_open() 286 priv->termios.c_lflag = tty->termios.c_lflag; in klsi_105_open() 288 priv->termios.c_cc[i] = tty->termios.c_cc[i]; in klsi_105_open() 421 unsigned int iflag = tty->termios.c_iflag; in klsi_105_set_termios() 423 unsigned int cflag = tty->termios.c_cflag; in klsi_105_set_termios() 530 tty->termios.c_cflag &= ~(PARENB|PARODD|CSTOPB); in klsi_105_set_termios() 556 tty->termios.c_cflag &= ~CRTSCTS; in klsi_105_set_termios()
|
D | cypress_m8.c | 880 tty->termios = tty_std_termios; in cypress_set_termios() 881 tty->termios.c_cflag = B4800 | CS8 | CREAD | HUPCL | in cypress_set_termios() 883 tty->termios.c_ispeed = 4800; in cypress_set_termios() 884 tty->termios.c_ospeed = 4800; in cypress_set_termios() 886 tty->termios = tty_std_termios; in cypress_set_termios() 887 tty->termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | in cypress_set_termios() 889 tty->termios.c_ispeed = 9600; in cypress_set_termios() 890 tty->termios.c_ospeed = 9600; in cypress_set_termios() 892 tty->termios = tty_std_termios; in cypress_set_termios() 893 tty->termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | in cypress_set_termios() [all …]
|
D | ark3116.c | 216 struct ktermios *termios = &tty->termios; in ark3116_init_termios() local 217 *termios = tty_std_termios; in ark3116_init_termios() 218 termios->c_cflag = B9600 | CS8 in ark3116_init_termios() 220 termios->c_ispeed = 9600; in ark3116_init_termios() 221 termios->c_ospeed = 9600; in ark3116_init_termios() 230 struct ktermios *termios = &tty->termios; in ark3116_set_termios() local 231 unsigned int cflag = termios->c_cflag; in ark3116_set_termios() 341 if (tty_termios_baud_rate(termios)) in ark3116_set_termios() 342 tty_termios_encode_baud_rate(termios, bps, bps); in ark3116_set_termios()
|
/drivers/tty/serial/jsm/ |
D | jsm_tty.c | 161 struct ktermios *termios; in jsm_tty_send_xchar() local 164 termios = &port->state->port.tty->termios; in jsm_tty_send_xchar() 165 if (ch == termios->c_cc[VSTART]) in jsm_tty_send_xchar() 168 if (ch == termios->c_cc[VSTOP]) in jsm_tty_send_xchar() 201 struct ktermios *termios; in jsm_tty_open() local 251 termios = &port->state->port.tty->termios; in jsm_tty_open() 252 channel->ch_c_cflag = termios->c_cflag; in jsm_tty_open() 253 channel->ch_c_iflag = termios->c_iflag; in jsm_tty_open() 254 channel->ch_c_oflag = termios->c_oflag; in jsm_tty_open() 255 channel->ch_c_lflag = termios->c_lflag; in jsm_tty_open() [all …]
|
/drivers/staging/comedi/drivers/ |
D | serial2002.c | 188 struct termios termios; in serial2002_tty_setspeed() local 196 serial2002_tty_ioctl(f, TCGETS, (unsigned long)&termios); in serial2002_tty_setspeed() 197 termios.c_iflag = 0; in serial2002_tty_setspeed() 198 termios.c_oflag = 0; in serial2002_tty_setspeed() 199 termios.c_lflag = 0; in serial2002_tty_setspeed() 200 termios.c_cflag = CLOCAL | CS8 | CREAD; in serial2002_tty_setspeed() 201 termios.c_cc[VMIN] = 0; in serial2002_tty_setspeed() 202 termios.c_cc[VTIME] = 0; in serial2002_tty_setspeed() 205 termios.c_cflag |= B2400; in serial2002_tty_setspeed() 208 termios.c_cflag |= B4800; in serial2002_tty_setspeed() [all …]
|
/drivers/mmc/card/ |
D | sdio_uart.c | 253 struct ktermios *termios, in sdio_uart_change_speed() argument 259 switch (termios->c_cflag & CSIZE) { in sdio_uart_change_speed() 275 if (termios->c_cflag & CSTOPB) in sdio_uart_change_speed() 277 if (termios->c_cflag & PARENB) in sdio_uart_change_speed() 279 if (!(termios->c_cflag & PARODD)) in sdio_uart_change_speed() 283 baud = tty_termios_baud_rate(termios); in sdio_uart_change_speed() 292 termios->c_cflag &= ~CBAUD; in sdio_uart_change_speed() 294 termios->c_cflag |= old->c_cflag & CBAUD; in sdio_uart_change_speed() 297 termios->c_cflag |= B9600; in sdio_uart_change_speed() 307 if (termios->c_iflag & INPCK) in sdio_uart_change_speed() [all …]
|
/drivers/tty/serial/8250/ |
D | 8250_omap.c | 324 struct ktermios *termios, in omap_8250_set_termios() argument 332 switch (termios->c_cflag & CSIZE) { in omap_8250_set_termios() 348 if (termios->c_cflag & CSTOPB) in omap_8250_set_termios() 350 if (termios->c_cflag & PARENB) in omap_8250_set_termios() 352 if (!(termios->c_cflag & PARODD)) in omap_8250_set_termios() 354 if (termios->c_cflag & CMSPAR) in omap_8250_set_termios() 360 baud = uart_get_baud_rate(port, termios, old, in omap_8250_set_termios() 375 uart_update_timeout(port, termios->c_cflag, baud); in omap_8250_set_termios() 378 if (termios->c_iflag & INPCK) in omap_8250_set_termios() 380 if (termios->c_iflag & (IGNBRK | PARMRK)) in omap_8250_set_termios() [all …]
|