| /kernel/linux/linux-5.10/include/linux/ |
| D | tty.h | 82 #define INTR_CHAR(tty) ((tty)->termios.c_cc[VINTR]) argument 83 #define QUIT_CHAR(tty) ((tty)->termios.c_cc[VQUIT]) argument 84 #define ERASE_CHAR(tty) ((tty)->termios.c_cc[VERASE]) argument 85 #define KILL_CHAR(tty) ((tty)->termios.c_cc[VKILL]) argument 86 #define EOF_CHAR(tty) ((tty)->termios.c_cc[VEOF]) argument 87 #define TIME_CHAR(tty) ((tty)->termios.c_cc[VTIME]) argument 88 #define MIN_CHAR(tty) ((tty)->termios.c_cc[VMIN]) argument 89 #define SWTC_CHAR(tty) ((tty)->termios.c_cc[VSWTC]) argument 90 #define START_CHAR(tty) ((tty)->termios.c_cc[VSTART]) argument 91 #define STOP_CHAR(tty) ((tty)->termios.c_cc[VSTOP]) argument [all …]
|
| D | tty_driver.h | 249 int (*install)(struct tty_driver *driver, struct tty_struct *tty); 250 void (*remove)(struct tty_driver *driver, struct tty_struct *tty); 251 int (*open)(struct tty_struct * tty, struct file * filp); 252 void (*close)(struct tty_struct * tty, struct file * filp); 253 void (*shutdown)(struct tty_struct *tty); 254 void (*cleanup)(struct tty_struct *tty); 255 int (*write)(struct tty_struct * tty, 257 int (*put_char)(struct tty_struct *tty, unsigned char ch); 258 void (*flush_chars)(struct tty_struct *tty); 259 int (*write_room)(struct tty_struct *tty); [all …]
|
| /kernel/linux/linux-5.10/drivers/tty/ |
| D | n_tty.c | 159 static void zero_buffer(struct tty_struct *tty, u8 *buffer, int size) in zero_buffer() argument 161 bool icanon = !!L_ICANON(tty); in zero_buffer() 162 bool no_echo = !L_ECHO(tty); in zero_buffer() 168 static void tty_copy(struct tty_struct *tty, void *to, size_t tail, size_t n) in tty_copy() argument 170 struct n_tty_data *ldata = tty->disc_data; in tty_copy() 175 tty_audit_add_data(tty, from, size); in tty_copy() 177 zero_buffer(tty, from, size); in tty_copy() 183 tty_audit_add_data(tty, from, n); in tty_copy() 185 zero_buffer(tty, from, n); in tty_copy() 200 static void n_tty_kick_worker(struct tty_struct *tty) in n_tty_kick_worker() argument [all …]
|
| D | tty_ldisc.c | 27 #define tty_ldisc_debug(tty, f, args...) tty_debug(tty, f, ##args) argument 29 #define tty_ldisc_debug(tty, f, args...) argument 161 static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc) in tty_ldisc_get() argument 189 ld->tty = tty; in tty_ldisc_get() 263 struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty) in tty_ldisc_ref_wait() argument 267 ldsem_down_read(&tty->ldisc_sem, MAX_SCHEDULE_TIMEOUT); in tty_ldisc_ref_wait() 268 ld = tty->ldisc; in tty_ldisc_ref_wait() 270 ldsem_up_read(&tty->ldisc_sem); in tty_ldisc_ref_wait() 284 struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty) in tty_ldisc_ref() argument 288 if (ldsem_down_read_trylock(&tty->ldisc_sem)) { in tty_ldisc_ref() [all …]
|
| D | tty_io.c | 115 # define tty_debug_hangup(tty, f, args...) tty_debug(tty, f, ##args) argument 117 # define tty_debug_hangup(tty, f, args...) do { } while (0) argument 158 static void release_tty(struct tty_struct *tty, int idx); 169 static void free_tty_struct(struct tty_struct *tty) in free_tty_struct() argument 171 tty_ldisc_deinit(tty); in free_tty_struct() 172 put_device(tty->dev); in free_tty_struct() 173 kfree(tty->write_buf); in free_tty_struct() 174 tty->magic = 0xDEADDEAD; in free_tty_struct() 175 kfree(tty); in free_tty_struct() 180 return ((struct tty_file_private *)file->private_data)->tty; in file_tty() [all …]
|
| D | tty_ioctl.c | 32 # define tty_debug_wait_until_sent(tty, f, args...) tty_debug(tty, f, ##args) argument 34 # define tty_debug_wait_until_sent(tty, f, args...) do {} while (0) argument 57 int tty_chars_in_buffer(struct tty_struct *tty) in tty_chars_in_buffer() argument 59 if (tty->ops->chars_in_buffer) in tty_chars_in_buffer() 60 return tty->ops->chars_in_buffer(tty); in tty_chars_in_buffer() 77 int tty_write_room(struct tty_struct *tty) in tty_write_room() argument 79 if (tty->ops->write_room) in tty_write_room() 80 return tty->ops->write_room(tty); in tty_write_room() 93 void tty_driver_flush_buffer(struct tty_struct *tty) in tty_driver_flush_buffer() argument 95 if (tty->ops->flush_buffer) in tty_driver_flush_buffer() [all …]
|
| D | pty.c | 36 # define tty_debug_hangup(tty, f, args...) tty_debug(tty, f, ##args) argument 38 # define tty_debug_hangup(tty, f, args...) do {} while (0) argument 47 static void pty_close(struct tty_struct *tty, struct file *filp) in pty_close() argument 49 BUG_ON(!tty); in pty_close() 50 if (tty->driver->subtype == PTY_TYPE_MASTER) in pty_close() 51 WARN_ON(tty->count > 1); in pty_close() 53 if (tty_io_error(tty)) in pty_close() 55 if (tty->count > 2) in pty_close() 58 set_bit(TTY_IO_ERROR, &tty->flags); in pty_close() 59 wake_up_interruptible(&tty->read_wait); in pty_close() [all …]
|
| 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_info(tty, f, ...) tty_msg(pr_info, tty, f, ##__VA_ARGS__) argument 14 #define tty_notice(tty, f, ...) tty_msg(pr_notice, tty, f, ##__VA_ARGS__) argument 15 #define tty_warn(tty, f, ...) tty_msg(pr_warn, tty, f, ##__VA_ARGS__) argument 16 #define tty_err(tty, f, ...) tty_msg(pr_err, tty, f, ##__VA_ARGS__) argument 18 #define tty_info_ratelimited(tty, f, ...) \ argument 19 tty_msg(pr_info_ratelimited, tty, f, ##__VA_ARGS__) 48 static inline void __tty_set_flow_change(struct tty_struct *tty, int val) in __tty_set_flow_change() argument [all …]
|
| D | tty_jobctrl.c | 32 int __tty_check_change(struct tty_struct *tty, int sig) in __tty_check_change() argument 38 if (current->signal->tty != tty) in __tty_check_change() 44 spin_lock_irqsave(&tty->ctrl_lock, flags); in __tty_check_change() 45 tty_pgrp = tty->pgrp; in __tty_check_change() 46 spin_unlock_irqrestore(&tty->ctrl_lock, flags); in __tty_check_change() 63 tty_warn(tty, "sig=%d, tty->pgrp == NULL!\n", sig); in __tty_check_change() 68 int tty_check_change(struct tty_struct *tty) in tty_check_change() argument 70 return __tty_check_change(tty, SIGTTOU); in tty_check_change() 77 struct tty_struct *tty; in proc_clear_tty() local 79 tty = p->signal->tty; in proc_clear_tty() [all …]
|
| D | tty_mutex.c | 15 void tty_lock(struct tty_struct *tty) in tty_lock() argument 17 if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty)) in tty_lock() 19 tty_kref_get(tty); in tty_lock() 20 mutex_lock(&tty->legacy_mutex); in tty_lock() 24 int tty_lock_interruptible(struct tty_struct *tty) in tty_lock_interruptible() argument 28 if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty)) in tty_lock_interruptible() 30 tty_kref_get(tty); in tty_lock_interruptible() 31 ret = mutex_lock_interruptible(&tty->legacy_mutex); in tty_lock_interruptible() 33 tty_kref_put(tty); in tty_lock_interruptible() 37 void tty_unlock(struct tty_struct *tty) in tty_unlock() argument [all …]
|
| D | tty_port.c | 28 struct tty_struct *tty; in tty_port_default_receive_buf() local 31 tty = READ_ONCE(port->itty); in tty_port_default_receive_buf() 32 if (!tty) in tty_port_default_receive_buf() 35 disc = tty_ldisc_ref(tty); in tty_port_default_receive_buf() 48 struct tty_struct *tty = tty_port_tty_get(port); in tty_port_default_wakeup() local 50 if (tty) { in tty_port_default_wakeup() 51 tty_wakeup(tty); in tty_port_default_wakeup() 52 tty_kref_put(tty); in tty_port_default_wakeup() 287 struct tty_struct *tty; in tty_port_tty_get() local 290 tty = tty_kref_get(port->tty); in tty_port_tty_get() [all …]
|
| D | amiserial.c | 38 tty->name, (info->tport.flags), serial_driver->refcount,info->count,tty->count,s) 112 static void change_speed(struct tty_struct *tty, struct serial_state *info, 114 static void rs_wait_until_sent(struct tty_struct *tty, int timeout); 155 static void rs_stop(struct tty_struct *tty) in rs_stop() argument 157 struct serial_state *info = tty->driver_data; in rs_stop() 172 static void rs_start(struct tty_struct *tty) in rs_start() argument 174 struct serial_state *info = tty->driver_data; in rs_start() 278 do_SAK(info->tport.tty); in receive_chars() 312 || info->tport.tty->stopped in transmit_chars() 313 || info->tport.tty->hw_stopped) { in transmit_chars() [all …]
|
| D | n_hdlc.c | 164 static void flush_rx_queue(struct tty_struct *tty) in flush_rx_queue() argument 166 struct n_hdlc *n_hdlc = tty->disc_data; in flush_rx_queue() 173 static void flush_tx_queue(struct tty_struct *tty) in flush_tx_queue() argument 175 struct n_hdlc *n_hdlc = tty->disc_data; in flush_tx_queue() 199 static void n_hdlc_tty_close(struct tty_struct *tty) in n_hdlc_tty_close() argument 201 struct n_hdlc *n_hdlc = tty->disc_data; in n_hdlc_tty_close() 208 clear_bit(TTY_NO_WRITE_SPLIT, &tty->flags); in n_hdlc_tty_close() 210 tty->disc_data = NULL; in n_hdlc_tty_close() 213 wake_up_interruptible(&tty->read_wait); in n_hdlc_tty_close() 214 wake_up_interruptible(&tty->write_wait); in n_hdlc_tty_close() [all …]
|
| D | vcc.c | 33 struct tty_struct *tty; /* only populated while dev is open */ member 285 static int vcc_rx_check(struct tty_struct *tty, int size) in vcc_rx_check() argument 287 if (WARN_ON(!tty || !tty->port)) in vcc_rx_check() 293 if (test_bit(TTY_THROTTLED, &tty->flags) || in vcc_rx_check() 294 (tty_buffer_request_room(tty->port, VCC_BUFF_LEN) < VCC_BUFF_LEN)) in vcc_rx_check() 300 static int vcc_rx(struct tty_struct *tty, char *buf, int size) in vcc_rx() argument 304 if (WARN_ON(!tty || !tty->port)) in vcc_rx() 307 len = tty_insert_flip_string(tty->port, buf, size); in vcc_rx() 309 tty_flip_buffer_push(tty->port); in vcc_rx() 317 struct tty_struct *tty; in vcc_ldc_read() local [all …]
|
| D | isicom.c | 174 static void isicom_start(struct tty_struct *tty); 400 struct tty_struct *tty; in isicom_tx() local 427 tty = tty_port_tty_get(&port->port); in isicom_tx() 428 if (tty == NULL) in isicom_tx() 438 if (txcount <= 0 || tty->stopped || tty->hw_stopped) in isicom_tx() 491 tty_wakeup(tty); in isicom_tx() 495 tty_kref_put(tty); in isicom_tx() 511 struct tty_struct *tty; in isicom_interrupt() local 554 tty = tty_port_tty_get(&port->port); in isicom_interrupt() 555 if (tty == NULL) { in isicom_interrupt() [all …]
|
| /kernel/linux/linux-5.10/drivers/tty/ipwireless/ |
| D | tty.c | 91 struct ipw_tty *tty = get_tty(linux_tty->index); in ipw_open() local 93 if (!tty) in ipw_open() 96 mutex_lock(&tty->ipw_tty_mutex); in ipw_open() 97 if (tty->port.count == 0) in ipw_open() 98 tty->tx_bytes_queued = 0; in ipw_open() 100 tty->port.count++; in ipw_open() 102 tty->port.tty = linux_tty; in ipw_open() 103 linux_tty->driver_data = tty; in ipw_open() 104 tty->port.low_latency = 1; in ipw_open() 106 if (tty->tty_type == TTYTYPE_MODEM) in ipw_open() [all …]
|
| /kernel/linux/linux-5.10/drivers/tty/serdev/ |
| D | serdev-ttyport.c | 15 struct tty_struct *tty; member 52 struct tty_struct *tty; in ttyport_write_wakeup() local 54 tty = tty_port_tty_get(port); in ttyport_write_wakeup() 55 if (!tty) in ttyport_write_wakeup() 58 if (test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags) && in ttyport_write_wakeup() 63 wake_up_interruptible(&tty->write_wait); in ttyport_write_wakeup() 65 tty_kref_put(tty); in ttyport_write_wakeup() 80 struct tty_struct *tty = serport->tty; in ttyport_write_buf() local 85 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in ttyport_write_buf() 86 return tty->ops->write(serport->tty, data, len); in ttyport_write_buf() [all …]
|
| /kernel/linux/linux-5.10/drivers/accessibility/speakup/ |
| D | selection.c | 22 struct tty_struct *tty; member 30 struct tty_struct *tty; in __speakup_set_selection() local 39 tty = xchg(&ssw->tty, NULL); in __speakup_set_selection() 51 set_selection_kernel(&sel, tty); in __speakup_set_selection() 54 tty_kref_put(tty); in __speakup_set_selection() 62 int speakup_set_selection(struct tty_struct *tty) in speakup_set_selection() argument 70 tty_kref_get(tty); in speakup_set_selection() 71 if (cmpxchg(&speakup_sel_work.tty, NULL, tty)) { in speakup_set_selection() 72 tty_kref_put(tty); in speakup_set_selection() 94 struct tty_struct *tty; in speakup_cancel_selection() local [all …]
|
| D | spk_ttyio.c | 46 static int spk_ttyio_ldisc_open(struct tty_struct *tty) in spk_ttyio_ldisc_open() argument 50 if (tty != speakup_tty) in spk_ttyio_ldisc_open() 54 if (!tty->ops->write) in spk_ttyio_ldisc_open() 63 tty->disc_data = ldisc_data; in spk_ttyio_ldisc_open() 68 static void spk_ttyio_ldisc_close(struct tty_struct *tty) in spk_ttyio_ldisc_close() argument 76 static int spk_ttyio_receive_buf2(struct tty_struct *tty, in spk_ttyio_receive_buf2() argument 79 struct spk_ldisc_data *ldisc_data = tty->disc_data; in spk_ttyio_receive_buf2() 136 static inline void get_termios(struct tty_struct *tty, in get_termios() argument 139 down_read(&tty->termios_rwsem); in get_termios() 140 *out_termios = tty->termios; in get_termios() [all …]
|
| /kernel/linux/linux-5.10/net/nfc/nci/ |
| D | uart.c | 86 struct tty_struct *tty = nu->tty; in nci_uart_write_work() local 98 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in nci_uart_write_work() 99 len = tty->ops->write(tty, skb->data, skb->len); in nci_uart_write_work() 117 static int nci_uart_set_driver(struct tty_struct *tty, unsigned int driver) in nci_uart_set_driver() argument 133 nu->tty = tty; in nci_uart_set_driver() 134 tty->disc_data = nu; in nci_uart_set_driver() 141 tty->disc_data = NULL; in nci_uart_set_driver() 145 tty->disc_data = NULL; in nci_uart_set_driver() 163 static int nci_uart_tty_open(struct tty_struct *tty) in nci_uart_tty_open() argument 168 if (!tty->ops->write) in nci_uart_tty_open() [all …]
|
| /kernel/linux/linux-5.10/drivers/usb/serial/ |
| D | upd78f0730.c | 188 static int upd78f0730_tiocmget(struct tty_struct *tty) in upd78f0730_tiocmget() argument 190 struct device *dev = tty->dev; in upd78f0730_tiocmget() 192 struct usb_serial_port *port = tty->driver_data; in upd78f0730_tiocmget() 210 static int upd78f0730_tiocmset(struct tty_struct *tty, in upd78f0730_tiocmset() argument 213 struct device *dev = tty->dev; in upd78f0730_tiocmset() 214 struct usb_serial_port *port = tty->driver_data; in upd78f0730_tiocmset() 247 static void upd78f0730_break_ctl(struct tty_struct *tty, int break_state) in upd78f0730_break_ctl() argument 249 struct device *dev = tty->dev; in upd78f0730_break_ctl() 251 struct usb_serial_port *port = tty->driver_data; in upd78f0730_break_ctl() 273 struct tty_struct *tty = port->port.tty; in upd78f0730_dtr_rts() local [all …]
|
| /kernel/linux/linux-5.10/drivers/input/serio/ |
| D | serport.c | 32 struct tty_struct *tty; member 47 return -(serport->tty->ops->write(serport->tty, &data, 1) != 1); in serport_serio_write() 78 static int serport_ldisc_open(struct tty_struct *tty) in serport_ldisc_open() argument 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() 104 static void serport_ldisc_close(struct tty_struct *tty) in serport_ldisc_close() argument 106 struct serport *serport = (struct serport *) tty->disc_data; in serport_ldisc_close() 117 static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *cp, char *fp, int co… in serport_ldisc_receive() argument [all …]
|
| /kernel/linux/linux-5.10/drivers/bluetooth/ |
| D | hci_ldisc.c | 148 struct tty_struct *tty = hu->tty; in hci_uart_write_work() local 162 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in hci_uart_write_work() 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 230 BT_DBG("hdev %p tty %p", hdev, tty); in hci_uart_flush() 237 tty_ldisc_flush(tty); in hci_uart_flush() 238 tty_driver_flush_buffer(tty); in hci_uart_flush() 301 if (hu->tty->driver->ops->tiocmget && hu->tty->driver->ops->tiocmset) in hci_uart_has_flow_control() 310 struct tty_struct *tty = hu->tty; in hci_uart_set_flow_control() local 324 ktermios = tty->termios; in hci_uart_set_flow_control() [all …]
|
| /kernel/linux/linux-5.10/drivers/ipack/devices/ |
| D | ipoctal.c | 72 static int ipoctal_port_activate(struct tty_port *port, struct tty_struct *tty) in ipoctal_port_activate() argument 76 channel = dev_get_drvdata(tty->dev); in ipoctal_port_activate() 87 static int ipoctal_install(struct tty_driver *driver, struct tty_struct *tty) in ipoctal_install() argument 89 struct ipoctal_channel *channel = dev_get_drvdata(tty->dev); in ipoctal_install() 90 struct ipoctal *ipoctal = chan_to_ipoctal(channel, tty->index); in ipoctal_install() 96 res = tty_standard_install(driver, tty); in ipoctal_install() 100 tty->driver_data = channel; in ipoctal_install() 110 static int ipoctal_open(struct tty_struct *tty, struct file *file) in ipoctal_open() argument 112 struct ipoctal_channel *channel = tty->driver_data; in ipoctal_open() 114 return tty_port_open(&channel->tty_port, tty, file); in ipoctal_open() [all …]
|
| /kernel/linux/linux-5.10/sound/soc/codecs/ |
| 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() 212 static int v253_open(struct tty_struct *tty) in v253_open() argument 217 if (!tty->ops->write) in v253_open() 221 if (!tty->disc_data) in v253_open() 224 tty->receive_room = 16; in v253_open() 225 if (tty->ops->write(tty, v253_init, len) != len) { in v253_open() 232 tty->disc_data = NULL; in v253_open() 237 static void v253_close(struct tty_struct *tty) in v253_close() argument [all …]
|