/openbmc/linux/include/linux/ |
H A D | tty.h | 62 #define I_INPCK(tty) _I_FLAG((tty), INPCK) argument 64 #define I_INLCR(tty) _I_FLAG((tty), INLCR) argument 65 #define I_IGNCR(tty) _I_FLAG((tty), IGNCR) argument 66 #define I_ICRNL(tty) _I_FLAG((tty), ICRNL) argument 67 #define I_IUCLC(tty) _I_FLAG((tty), IUCLC) argument 68 #define I_IXON(tty) _I_FLAG((tty), IXON) argument 69 #define I_IXANY(tty) _I_FLAG((tty), IXANY) argument 70 #define I_IXOFF(tty) _I_FLAG((tty), IXOFF) argument 89 #define C_BAUD(tty) _C_FLAG((tty), CBAUD) argument 101 #define L_ISIG(tty) _L_FLAG((tty), ISIG) argument [all …]
|
H A D | tty_driver.h | 364 void (*shutdown)(struct tty_struct *tty); 365 void (*cleanup)(struct tty_struct *tty); 371 int (*ioctl)(struct tty_struct *tty, 376 void (*throttle)(struct tty_struct * tty); 378 void (*stop)(struct tty_struct *tty); 379 void (*start)(struct tty_struct *tty); 380 void (*hangup)(struct tty_struct *tty); 384 void (*set_ldisc)(struct tty_struct *tty); 387 int (*tiocmget)(struct tty_struct *tty); 388 int (*tiocmset)(struct tty_struct *tty, [all …]
|
H A D | tty_ldisc.h | 238 int (*open)(struct tty_struct *tty); 239 void (*close)(struct tty_struct *tty); 240 void (*flush_buffer)(struct tty_struct *tty); 245 int (*ioctl)(struct tty_struct *tty, unsigned int cmd, 252 void (*hangup)(struct tty_struct *tty); 257 void (*receive_buf)(struct tty_struct *tty, const u8 *cp, 259 void (*write_wakeup)(struct tty_struct *tty); 260 void (*dcd_change)(struct tty_struct *tty, bool active); 271 struct tty_struct *tty; member 283 void tty_ldisc_flush(struct tty_struct *tty); [all …]
|
/openbmc/linux/drivers/tty/ |
H A D | tty_ldisc.c | 27 #define tty_ldisc_debug(tty, f, args...) tty_debug(tty, f, ##args) argument 167 ld->tty = tty; in tty_ldisc_get() 549 retval = tty->ops->ldisc_ok(tty, disc); in tty_set_ldisc() 572 tty->ops->set_ldisc(tty); in tty_set_ldisc() 613 tty_ldisc_close(tty, tty->ldisc); in tty_ldisc_kill() 628 tty->termios = tty->driver->init_termios; in tty_reset_termios() 660 tty_ldisc_close(tty, tty->ldisc); in tty_ldisc_reinit() 667 retval = tty_ldisc_open(tty, tty->ldisc); in tty_ldisc_reinit() 694 tty_ldisc_debug(tty, "%p: hangup\n", tty->ldisc); in tty_ldisc_hangup() 745 int retval = tty_ldisc_open(tty, tty->ldisc); in tty_ldisc_setup() [all …]
|
H A D | n_tty.c | 163 if (L_ICANON(tty) && !L_ECHO(tty)) in zero_buffer() 781 tty->ops->flush_chars(tty); in commit_echoes() 798 tty->ops->flush_chars(tty); in process_echoes() 974 if (!L_ECHOK(tty) || !L_ECHOKE(tty) || !L_ECHOE(tty)) { in eraser() 1300 if (c == REPRINT_CHAR(tty) && L_ECHO(tty) && L_IEXTEN(tty)) { in n_tty_receive_char_canon() 1380 if (tty->flow.stopped && !tty->flow.tco_stopped && I_IXON(tty) && I_IXANY(tty)) { in n_tty_receive_char_special() 1432 if (tty->flow.stopped && !tty->flow.tco_stopped && I_IXON(tty) && I_IXANY(tty)) { in n_tty_receive_char() 1649 tty->ops->flush_chars(tty); in __receive_buf() 1827 if (I_ISTRIP(tty) || I_IUCLC(tty) || I_IGNCR(tty) || in n_tty_set_termios() 1828 I_ICRNL(tty) || I_INLCR(tty) || L_ICANON(tty) || in n_tty_set_termios() [all …]
|
H A D | tty_io.c | 200 priv->tty = tty; in tty_add_file() 254 if (!tty || !tty->driver) in tty_driver_name() 460 if (tty && tty->ops && tty->ops->show_fdinfo) in tty_show_fdinfo() 653 tty->ops->hangup(tty); in __tty_hangup() 755 tty->ops->stop(tty); in __stop_tty() 788 tty->ops->start(tty); in __start_tty() 1077 if (!tty || !tty->ops->write || tty_io_error(tty)) in file_tty_write() 1431 tty->port->itty = tty; in tty_init_dev() 1529 tty->ops->cleanup(tty); in release_one_tty() 1587 tty->ops->shutdown(tty); in release_tty() [all …]
|
H A D | tty_ioctl.c | 54 return tty->ops->chars_in_buffer(tty); in tty_chars_in_buffer() 73 return tty->ops->write_room(tty); in tty_write_room() 89 tty->ops->flush_buffer(tty); in tty_driver_flush_buffer() 111 tty->ops->unthrottle(tty); in tty_unthrottle() 141 tty->ops->throttle(tty); in tty_throttle_safe() 172 tty->ops->unthrottle(tty); in tty_unthrottle_safe() 205 tty->ops->wait_until_sent(tty, timeout); in tty_wait_until_sent() 354 tty->ops->set_termios(tty, &old_termios); in tty_set_termios() 517 tty->ops->wait_until_sent(tty, 0); 757 tty->ops->set_termios(tty, &old); in tty_change_softcar() [all …]
|
H A D | pty.c | 36 # define tty_debug_hangup(tty, f, args...) tty_debug(tty, f, ##args) argument 64 if (!tty->link) in pty_close() 195 if (tty->link) { in pty_signal() 222 if (!tty || !tty->link) in pty_open() 246 if (tty->link && tty->link->ctrl.packet) { in pty_set_termios() 326 if (tty->link && tty->link->ctrl.packet) { in pty_start() 339 if (tty->link && tty->link->ctrl.packet) { in pty_stop() 419 tty->count++; in pty_common_install() 714 if (!tty) in pts_unix98_lookup() 716 return tty; in pts_unix98_lookup() [all …]
|
H A D | tty_jobctrl.c | 39 if (current->signal->tty != tty) in __tty_check_change() 81 tty = p->signal->tty; in proc_clear_tty() 118 current->signal->tty = tty_kref_get(tty); in __proc_set_tty() 166 tty = tty_kref_get(current->signal->tty); in get_current_tty() 168 return tty; in get_current_tty() 206 if (p->signal->tty == tty) { in tty_signal_session_leader() 273 if (tty) { in disassociate_ctty() 304 if (tty) { in disassociate_ctty() 474 if (tty == real_tty && current->signal->tty != real_tty) in tiocgpgrp() 552 if (tty == real_tty && current->signal->tty != real_tty) in tiocgsid() [all …]
|
H A D | tty.h | 9 #define tty_msg(fn, tty, f, ...) \ argument 10 fn("%s %s: " f, tty_driver_name(tty), tty_name(tty), ##__VA_ARGS__) 12 #define tty_debug(tty, f, ...) tty_msg(pr_debug, tty, f, ##__VA_ARGS__) argument 13 #define tty_notice(tty, f, ...) tty_msg(pr_notice, tty, f, ##__VA_ARGS__) argument 14 #define tty_warn(tty, f, ...) tty_msg(pr_warn, tty, f, ##__VA_ARGS__) argument 15 #define tty_err(tty, f, ...) tty_msg(pr_err, tty, f, ##__VA_ARGS__) argument 17 #define tty_info_ratelimited(tty, f, ...) \ argument 49 tty->flow_change = val; in __tty_set_flow_change() 54 tty->flow_change = val; in tty_set_flow_change() 63 void __stop_tty(struct tty_struct *tty); [all …]
|
H A D | tty_mutex.c | 15 void tty_lock(struct tty_struct *tty) in tty_lock() argument 17 tty_kref_get(tty); in tty_lock() 18 mutex_lock(&tty->legacy_mutex); in tty_lock() 26 tty_kref_get(tty); in tty_lock_interruptible() 29 tty_kref_put(tty); in tty_lock_interruptible() 35 mutex_unlock(&tty->legacy_mutex); in tty_unlock() 36 tty_kref_put(tty); in tty_unlock() 42 if (tty && tty != tty->link) in tty_lock_slave() 43 tty_lock(tty); in tty_lock_slave() 48 if (tty && tty != tty->link) in tty_unlock_slave() [all …]
|
H A D | tty_port.c | 30 if (!tty) in tty_port_default_receive_buf() 51 if (!tty) in tty_port_default_lookahead_buf() 68 if (tty) { in tty_port_default_wakeup() 69 tty_wakeup(tty); in tty_port_default_wakeup() 326 tty = tty_kref_get(port->tty); in tty_port_tty_get() 328 return tty; in tty_port_tty_get() 346 port->tty = tty_kref_get(tty); in tty_port_tty_set() 373 if (tty && C_HUPCL(tty)) in tty_port_shutdown() 399 tty = port->tty; in tty_port_hangup() 400 if (tty) in tty_port_hangup() [all …]
|
H A D | amiserial.c | 340 if (port->tty) in check_modem_status() 493 if (C_BAUD(tty)) in startup() 656 if (I_BRKINT(tty) || I_PARMRK(tty)) in change_speed() 809 tty_wakeup(tty); in rs_flush_buffer() 857 rs_send_xchar(tty, STOP_CHAR(tty)); in rs_throttle() 879 rs_send_xchar(tty, START_CHAR(tty)); in rs_unthrottle() 899 tty_lock(tty); in get_serial_info() 925 tty_lock(tty); in set_serial_info() 1191 if (!C_CRTSCTS(tty) || !tty_throttled(tty)) in rs_set_termios() 1201 rs_start(tty); in rs_set_termios() [all …]
|
H A D | n_hdlc.c | 201 tty->disc_data = NULL; in n_hdlc_tty_close() 241 n_hdlc->tty_for_write_work = tty; in n_hdlc_tty_open() 242 tty->disc_data = n_hdlc; in n_hdlc_tty_open() 243 tty->receive_room = 65536; in n_hdlc_tty_open() 249 tty_driver_flush_buffer(tty); in n_hdlc_tty_open() 288 actual = tty->ops->write(tty, tbuf->buf, tbuf->count); in n_hdlc_send_frames() 346 n_hdlc_send_frames(n_hdlc, tty); in n_hdlc_tty_write_work() 411 if (tty->fasync != NULL) in n_hdlc_tty_receive() 568 n_hdlc_send_frames(n_hdlc, tty); in n_hdlc_tty_write() 626 flush_tx_queue(tty); in n_hdlc_tty_ioctl() [all …]
|
H A D | vcc.c | 279 if (WARN_ON(!tty || !tty->port)) in vcc_rx_check() 296 if (WARN_ON(!tty || !tty->port)) in vcc_rx() 313 tty = port->tty; in vcc_ldc_read() 314 if (!tty) { in vcc_ldc_read() 413 struct tty_struct *tty = port->tty; in vcc_tx_timer() local 416 if (tty) in vcc_tx_timer() 693 if (port->tty) in vcc_remove() 707 if (port->tty) { in vcc_remove() 766 return tty_port_open(tty->port, tty, vcc_file); in vcc_open() 779 tty_port_close(tty->port, tty, vcc_file); in vcc_close() [all …]
|
/openbmc/linux/drivers/tty/ipwireless/ |
H A D | tty.c | 92 if (!tty) in ipw_open() 101 tty->port.tty = linux_tty; in ipw_open() 117 struct tty_struct *linux_tty = tty->port.tty; in do_ipw_close() 120 tty->port.tty = NULL; in do_ipw_close() 133 if (!tty) in ipw_hangup() 195 if (!tty) in ipw_write() 236 if (!tty) in ipw_write_room() 254 if (!tty) in ipwireless_get_serial_info() 276 if (!tty) in ipw_chars_in_buffer() 623 && tty->port.tty) { in ipwireless_tty_notify_control_line_change() [all …]
|
/openbmc/linux/drivers/tty/serdev/ |
H A D | serdev-ttyport.c | 80 struct tty_struct *tty = serport->tty; in ttyport_write_buf() local 92 struct tty_struct *tty = serport->tty; in ttyport_write_flush() local 100 struct tty_struct *tty = serport->tty; in ttyport_write_room() local 115 serport->tty = tty; in ttyport_open() 146 tty->ops->close(tty, NULL); in ttyport_open() 157 struct tty_struct *tty = serport->tty; in ttyport_close() local 163 tty->ops->close(tty, NULL); in ttyport_close() 172 struct tty_struct *tty = serport->tty; in ttyport_set_baudrate() local 186 struct tty_struct *tty = serport->tty; in ttyport_set_flow_control() local 201 struct tty_struct *tty = serport->tty; in ttyport_set_parity() local [all …]
|
/openbmc/linux/drivers/accessibility/speakup/ |
H A D | spk_ttyio.c | 155 if (IS_ERR(tty)) in spk_ttyio_initialise_ldisc() 159 ret = tty->ops->open(tty, NULL); in spk_ttyio_initialise_ldisc() 184 tty_unlock(tty); in spk_ttyio_initialise_ldisc() 203 tty_lock(tty); in spk_ttyio_initialise_ldisc() 205 tty->ops->close(tty, NULL); in spk_ttyio_initialise_ldisc() 232 ret = tty->ops->write(tty, &ch, 1); in spk_ttyio_out() 275 tty->ops->send_xchar(tty, ch); in spk_ttyio_send_xchar() 283 tty->ops->tiocmset(tty, set, clear); in spk_ttyio_tiocmset() 336 tty->ops->flush_buffer(tty); in spk_ttyio_flush_buffer() 359 tty_lock(tty); in spk_ttyio_release() [all …]
|
H A D | selection.c | 39 tty = xchg(&ssw->tty, NULL); in __speakup_set_selection() 54 tty_kref_put(tty); in __speakup_set_selection() 70 tty_kref_get(tty); in speakup_set_selection() 71 if (cmpxchg(&speakup_sel_work.tty, NULL, tty)) { in speakup_set_selection() 101 tty = xchg(&speakup_sel_work.tty, NULL); in speakup_cancel_selection() 102 if (tty) in speakup_cancel_selection() 110 struct tty_struct *tty = xchg(&ssw->tty, NULL); in __speakup_paste_selection() local 113 tty_kref_put(tty); in __speakup_paste_selection() 124 if (cmpxchg(&speakup_paste_work.tty, NULL, tty)) { in speakup_paste_selection() 138 tty = xchg(&speakup_paste_work.tty, NULL); in speakup_cancel_paste() [all …]
|
/openbmc/linux/net/nfc/nci/ |
H A D | uart.c | 74 struct tty_struct *tty = nu->tty; in nci_uart_write_work() local 87 len = tty->ops->write(tty, skb->data, skb->len); in nci_uart_write_work() 121 nu->tty = tty; in nci_uart_set_driver() 122 tty->disc_data = nu; in nci_uart_set_driver() 156 if (!tty->ops->write) in nci_uart_tty_open() 159 tty->disc_data = NULL; in nci_uart_tty_open() 189 nu->tty = NULL; in nci_uart_tty_close() 214 if (tty != nu->tty) in nci_uart_tty_wakeup() 303 if (!nu || tty != nu->tty) in nci_uart_tty_receive() 310 tty_unthrottle(tty); in nci_uart_tty_receive() [all …]
|
/openbmc/linux/drivers/bluetooth/ |
H A D | hci_ldisc.c | 148 struct tty_struct *tty = hu->tty; in hci_uart_write_work() local 163 len = tty->ops->write(tty, skb->data, skb->len); in hci_uart_write_work() 228 struct tty_struct *tty = hu->tty; in hci_uart_flush() local 310 struct tty_struct *tty = hu->tty; in hci_uart_set_flow_control() local 332 status = tty->driver->ops->tiocmget(tty); in hci_uart_set_flow_control() 345 status = tty->driver->ops->tiocmget(tty); in hci_uart_set_flow_control() 375 struct tty_struct *tty = hu->tty; in hci_uart_set_baudrate() local 386 tty->termios.c_ispeed, tty->termios.c_ospeed); in hci_uart_set_baudrate() 503 hu->tty = tty; in hci_uart_tty_open() 582 if (tty != hu->tty) in hci_uart_tty_wakeup() [all …]
|
/openbmc/linux/drivers/usb/serial/ |
H A D | upd78f0730.c | 270 struct tty_struct *tty = port->port.tty; in upd78f0730_dtr_rts() local 312 if (C_BAUD(tty) == B0) in upd78f0730_set_termios() 323 switch (C_CSIZE(tty)) { in upd78f0730_set_termios() 330 tty->termios.c_cflag |= CS8; in upd78f0730_set_termios() 339 if (C_PARENB(tty)) { in upd78f0730_set_termios() 340 if (C_PARODD(tty)) { in upd78f0730_set_termios() 348 if (C_CMSPAR(tty)) { in upd78f0730_set_termios() 357 if (C_CSTOPB(tty)) { in upd78f0730_set_termios() 365 if (C_CRTSCTS(tty)) { in upd78f0730_set_termios() 369 if (I_IXOFF(tty) || I_IXON(tty)) { in upd78f0730_set_termios() [all …]
|
/openbmc/linux/drivers/input/serio/ |
H A D | serport.c | 32 struct tty_struct *tty; member 47 return -(serport->tty->ops->write(serport->tty, &data, 1) != 1); in serport_serio_write() 89 serport->tty = tty; in serport_ldisc_open() 93 tty->disc_data = serport; in serport_ldisc_open() 94 tty->receive_room = 256; in serport_ldisc_open() 95 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in serport_ldisc_open() 106 struct serport *serport = tty->disc_data; in serport_ldisc_close() 120 struct serport *serport = tty->disc_data; in serport_ldisc_receive() 182 serio->dev.parent = tty->dev; in serport_ldisc_read() 219 serport_set_type(tty, type); in serport_ldisc_ioctl() [all …]
|
/openbmc/linux/tools/testing/selftests/tty/ |
H A D | tty_tstamp_update.c | 16 static bool tty_valid(char *tty) in tty_valid() argument 18 if (strlen(tty) < MIN_TTY_PATH_LEN) in tty_valid() 21 if (strncmp(tty, "/dev/tty", MIN_TTY_PATH_LEN) == 0 || in tty_valid() 22 strncmp(tty, "/dev/pts", MIN_TTY_PATH_LEN) == 0) in tty_valid() 48 char tty[PATH_MAX] = {}; in main() local 54 r = readlink("/proc/self/fd/0", tty, PATH_MAX); in main() 58 if (!tty_valid(tty)) in main() 59 ksft_exit_skip("invalid tty path '%s'\n", tty); in main() 61 r = stat(tty, &st1); in main() 63 ksft_exit_fail_msg("stat failed on tty path '%s': %m\n", tty); in main() [all …]
|
/openbmc/linux/sound/soc/codecs/ |
H A D | cx20442.c | 25 struct tty_struct *tty; member 164 if (!cx20442->tty || !cx20442->tty->ops->write) in cx20442_write() 193 if (cx20442->tty->ops->write(cx20442->tty, buf, len) != len) in cx20442_write() 221 if (!tty->disc_data) in v253_open() 225 if (tty->ops->write(tty, v253_init, len) != len) { in v253_open() 250 cx20442->tty = NULL; in v253_close() 257 v253_close(tty); in v253_hangup() 276 cx20442->tty = tty; in v253_receive() 387 if (cx20442->tty) { in cx20442_component_remove() 388 struct tty_struct *tty = cx20442->tty; in cx20442_component_remove() local [all …]
|