/linux-6.6.21/include/linux/ ! |
D | tty.h | 35 #define INTR_CHAR(tty) ((tty)->termios.c_cc[VINTR]) argument 36 #define QUIT_CHAR(tty) ((tty)->termios.c_cc[VQUIT]) argument 37 #define ERASE_CHAR(tty) ((tty)->termios.c_cc[VERASE]) argument 38 #define KILL_CHAR(tty) ((tty)->termios.c_cc[VKILL]) argument 39 #define EOF_CHAR(tty) ((tty)->termios.c_cc[VEOF]) argument 40 #define TIME_CHAR(tty) ((tty)->termios.c_cc[VTIME]) argument 41 #define MIN_CHAR(tty) ((tty)->termios.c_cc[VMIN]) argument 42 #define SWTC_CHAR(tty) ((tty)->termios.c_cc[VSWTC]) argument 43 #define START_CHAR(tty) ((tty)->termios.c_cc[VSTART]) argument 44 #define STOP_CHAR(tty) ((tty)->termios.c_cc[VSTOP]) argument [all …]
|
D | tty_driver.h | 353 int (*install)(struct tty_driver *driver, struct tty_struct *tty); 354 void (*remove)(struct tty_driver *driver, struct tty_struct *tty); 355 int (*open)(struct tty_struct * tty, struct file * filp); 356 void (*close)(struct tty_struct * tty, struct file * filp); 357 void (*shutdown)(struct tty_struct *tty); 358 void (*cleanup)(struct tty_struct *tty); 359 ssize_t (*write)(struct tty_struct *tty, const u8 *buf, size_t count); 360 int (*put_char)(struct tty_struct *tty, u8 ch); 361 void (*flush_chars)(struct tty_struct *tty); 362 unsigned int (*write_room)(struct tty_struct *tty); [all …]
|
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); 241 ssize_t (*read)(struct tty_struct *tty, struct file *file, u8 *buf, 243 ssize_t (*write)(struct tty_struct *tty, struct file *file, 245 int (*ioctl)(struct tty_struct *tty, unsigned int cmd, 247 int (*compat_ioctl)(struct tty_struct *tty, unsigned int cmd, 249 void (*set_termios)(struct tty_struct *tty, const struct ktermios *old); 250 __poll_t (*poll)(struct tty_struct *tty, struct file *file, 252 void (*hangup)(struct tty_struct *tty); [all …]
|
/linux-6.6.21/drivers/tty/ ! |
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 139 static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc) in tty_ldisc_get() argument 167 ld->tty = tty; in tty_ldisc_get() 239 struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty) in tty_ldisc_ref_wait() argument 243 ldsem_down_read(&tty->ldisc_sem, MAX_SCHEDULE_TIMEOUT); in tty_ldisc_ref_wait() 244 ld = tty->ldisc; in tty_ldisc_ref_wait() 246 ldsem_up_read(&tty->ldisc_sem); in tty_ldisc_ref_wait() 259 struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty) in tty_ldisc_ref() argument 263 if (ldsem_down_read_trylock(&tty->ldisc_sem)) { in tty_ldisc_ref() [all …]
|
D | n_tty.c | 161 static void zero_buffer(const struct tty_struct *tty, u8 *buffer, size_t size) in zero_buffer() argument 163 if (L_ICANON(tty) && !L_ECHO(tty)) in zero_buffer() 167 static void tty_copy(const struct tty_struct *tty, void *to, size_t tail, 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() 199 static void n_tty_kick_worker(const struct tty_struct *tty) in n_tty_kick_worker() argument 201 struct n_tty_data *ldata = tty->disc_data; in n_tty_kick_worker() [all …]
|
D | tty_io.c | 116 # define tty_debug_hangup(tty, f, args...) tty_debug(tty, f, ##args) argument 118 # define tty_debug_hangup(tty, f, args...) do { } while (0) argument 159 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 kvfree(tty->write_buf); in free_tty_struct() 174 kfree(tty); in free_tty_struct() 179 return ((struct tty_file_private *)file->private_data)->tty; in file_tty() 196 void tty_add_file(struct tty_struct *tty, struct file *file) in tty_add_file() argument [all …]
|
D | tty_ioctl.c | 51 unsigned int tty_chars_in_buffer(struct tty_struct *tty) in tty_chars_in_buffer() argument 53 if (tty->ops->chars_in_buffer) in tty_chars_in_buffer() 54 return tty->ops->chars_in_buffer(tty); in tty_chars_in_buffer() 70 unsigned int tty_write_room(struct tty_struct *tty) in tty_write_room() argument 72 if (tty->ops->write_room) in tty_write_room() 73 return tty->ops->write_room(tty); in tty_write_room() 86 void tty_driver_flush_buffer(struct tty_struct *tty) in tty_driver_flush_buffer() argument 88 if (tty->ops->flush_buffer) in tty_driver_flush_buffer() 89 tty->ops->flush_buffer(tty); in tty_driver_flush_buffer() 106 void tty_unthrottle(struct tty_struct *tty) in tty_unthrottle() argument [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 if (tty->driver->subtype == PTY_TYPE_MASTER) in pty_close() 50 WARN_ON(tty->count > 1); in pty_close() 52 if (tty_io_error(tty)) in pty_close() 54 if (tty->count > 2) in pty_close() 57 set_bit(TTY_IO_ERROR, &tty->flags); in pty_close() 58 wake_up_interruptible(&tty->read_wait); in pty_close() 59 wake_up_interruptible(&tty->write_wait); in pty_close() [all …]
|
D | tty_jobctrl.c | 33 int __tty_check_change(struct tty_struct *tty, int sig) in __tty_check_change() argument 39 if (current->signal->tty != tty) in __tty_check_change() 45 spin_lock_irqsave(&tty->ctrl.lock, flags); in __tty_check_change() 46 tty_pgrp = tty->ctrl.pgrp; in __tty_check_change() 47 spin_unlock_irqrestore(&tty->ctrl.lock, flags); in __tty_check_change() 64 tty_warn(tty, "sig=%d, tty->pgrp == NULL!\n", sig); in __tty_check_change() 69 int tty_check_change(struct tty_struct *tty) in tty_check_change() argument 71 return __tty_check_change(tty, SIGTTOU); in tty_check_change() 78 struct tty_struct *tty; in proc_clear_tty() local 81 tty = p->signal->tty; in proc_clear_tty() [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_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 18 tty_msg(pr_info_ratelimited, tty, f, ##__VA_ARGS__) 47 static inline void __tty_set_flow_change(struct tty_struct *tty, int val) in __tty_set_flow_change() argument 49 tty->flow_change = val; in __tty_set_flow_change() [all …]
|
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() 22 int tty_lock_interruptible(struct tty_struct *tty) in tty_lock_interruptible() argument 26 tty_kref_get(tty); in tty_lock_interruptible() 27 ret = mutex_lock_interruptible(&tty->legacy_mutex); in tty_lock_interruptible() 29 tty_kref_put(tty); in tty_lock_interruptible() 33 void tty_unlock(struct tty_struct *tty) in tty_unlock() argument 35 mutex_unlock(&tty->legacy_mutex); in tty_unlock() 36 tty_kref_put(tty); in tty_unlock() [all …]
|
D | tty_port.c | 26 struct tty_struct *tty; in tty_port_default_receive_buf() local 29 tty = READ_ONCE(port->itty); in tty_port_default_receive_buf() 30 if (!tty) in tty_port_default_receive_buf() 33 ld = tty_ldisc_ref(tty); in tty_port_default_receive_buf() 47 struct tty_struct *tty; in tty_port_default_lookahead_buf() local 50 tty = READ_ONCE(port->itty); in tty_port_default_lookahead_buf() 51 if (!tty) in tty_port_default_lookahead_buf() 54 ld = tty_ldisc_ref(tty); in tty_port_default_lookahead_buf() 59 ld->ops->lookahead_buf(ld->tty, p, f, count); in tty_port_default_lookahead_buf() 66 struct tty_struct *tty = tty_port_tty_get(port); in tty_port_default_wakeup() local [all …]
|
D | amiserial.c | 96 static void change_speed(struct tty_struct *tty, struct serial_state *info, 98 static void rs_wait_until_sent(struct tty_struct *tty, int timeout); 133 static void rs_stop(struct tty_struct *tty) in rs_stop() argument 135 struct serial_state *info = tty->driver_data; in rs_stop() 150 static void rs_start(struct tty_struct *tty) in rs_start() argument 152 struct serial_state *info = tty->driver_data; in rs_start() 243 do_SAK(info->tport.tty); in receive_chars() 277 || info->tport.tty->flow.stopped in transmit_chars() 278 || info->tport.tty->hw_stopped) { in transmit_chars() 293 tty_wakeup(info->tport.tty); in transmit_chars() [all …]
|
D | n_hdlc.c | 159 static void flush_rx_queue(struct tty_struct *tty) in flush_rx_queue() argument 161 struct n_hdlc *n_hdlc = tty->disc_data; in flush_rx_queue() 168 static void flush_tx_queue(struct tty_struct *tty) in flush_tx_queue() argument 170 struct n_hdlc *n_hdlc = tty->disc_data; in flush_tx_queue() 194 static void n_hdlc_tty_close(struct tty_struct *tty) in n_hdlc_tty_close() argument 196 struct n_hdlc *n_hdlc = tty->disc_data; in n_hdlc_tty_close() 199 clear_bit(TTY_NO_WRITE_SPLIT, &tty->flags); in n_hdlc_tty_close() 201 tty->disc_data = NULL; in n_hdlc_tty_close() 204 wake_up_interruptible(&tty->read_wait); in n_hdlc_tty_close() 205 wake_up_interruptible(&tty->write_wait); in n_hdlc_tty_close() [all …]
|
D | vcc.c | 27 struct tty_struct *tty; /* only populated while dev is open */ member 277 static int vcc_rx_check(struct tty_struct *tty, int size) in vcc_rx_check() argument 279 if (WARN_ON(!tty || !tty->port)) in vcc_rx_check() 285 if (test_bit(TTY_THROTTLED, &tty->flags) || in vcc_rx_check() 286 (tty_buffer_request_room(tty->port, VCC_BUFF_LEN) < VCC_BUFF_LEN)) in vcc_rx_check() 292 static int vcc_rx(struct tty_struct *tty, char *buf, int size) in vcc_rx() argument 296 if (WARN_ON(!tty || !tty->port)) in vcc_rx() 299 len = tty_insert_flip_string(tty->port, buf, size); in vcc_rx() 301 tty_flip_buffer_push(tty->port); in vcc_rx() 309 struct tty_struct *tty; in vcc_ldc_read() local [all …]
|
/linux-6.6.21/drivers/tty/ipwireless/ ! |
D | tty.c | 90 struct ipw_tty *tty = get_tty(linux_tty->index); in ipw_open() local 92 if (!tty) in ipw_open() 95 mutex_lock(&tty->ipw_tty_mutex); in ipw_open() 96 if (tty->port.count == 0) in ipw_open() 97 tty->tx_bytes_queued = 0; in ipw_open() 99 tty->port.count++; in ipw_open() 101 tty->port.tty = linux_tty; in ipw_open() 102 linux_tty->driver_data = tty; in ipw_open() 104 if (tty->tty_type == TTYTYPE_MODEM) in ipw_open() 105 ipwireless_ppp_open(tty->network); in ipw_open() [all …]
|
/linux-6.6.21/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 …]
|
/linux-6.6.21/drivers/accessibility/speakup/ ! |
D | spk_ttyio.c | 47 static int spk_ttyio_ldisc_open(struct tty_struct *tty) in spk_ttyio_ldisc_open() argument 51 if (tty != speakup_tty) in spk_ttyio_ldisc_open() 55 if (!tty->ops->write) in spk_ttyio_ldisc_open() 64 tty->disc_data = ldisc_data; in spk_ttyio_ldisc_open() 69 static void spk_ttyio_ldisc_close(struct tty_struct *tty) in spk_ttyio_ldisc_close() argument 71 kfree(tty->disc_data); in spk_ttyio_ldisc_close() 74 static size_t spk_ttyio_receive_buf2(struct tty_struct *tty, const u8 *cp, in spk_ttyio_receive_buf2() argument 77 struct spk_ldisc_data *ldisc_data = tty->disc_data; in spk_ttyio_receive_buf2() 135 static inline void get_termios(struct tty_struct *tty, in get_termios() argument 138 down_read(&tty->termios_rwsem); in get_termios() [all …]
|
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 …]
|
/linux-6.6.21/net/nfc/nci/ ! |
D | uart.c | 74 struct tty_struct *tty = nu->tty; in nci_uart_write_work() local 86 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in nci_uart_write_work() 87 len = tty->ops->write(tty, skb->data, skb->len); in nci_uart_write_work() 105 static int nci_uart_set_driver(struct tty_struct *tty, unsigned int driver) in nci_uart_set_driver() argument 121 nu->tty = tty; in nci_uart_set_driver() 122 tty->disc_data = nu; in nci_uart_set_driver() 129 tty->disc_data = NULL; in nci_uart_set_driver() 133 tty->disc_data = NULL; in nci_uart_set_driver() 151 static int nci_uart_tty_open(struct tty_struct *tty) in nci_uart_tty_open() argument 156 if (!tty->ops->write) in nci_uart_tty_open() [all …]
|
/linux-6.6.21/drivers/usb/serial/ ! |
D | upd78f0730.c | 183 static int upd78f0730_tiocmget(struct tty_struct *tty) in upd78f0730_tiocmget() argument 186 struct usb_serial_port *port = tty->driver_data; in upd78f0730_tiocmget() 204 static int upd78f0730_tiocmset(struct tty_struct *tty, in upd78f0730_tiocmset() argument 207 struct usb_serial_port *port = tty->driver_data; in upd78f0730_tiocmset() 241 static int upd78f0730_break_ctl(struct tty_struct *tty, int break_state) in upd78f0730_break_ctl() argument 244 struct usb_serial_port *port = tty->driver_data; in upd78f0730_break_ctl() 270 struct tty_struct *tty = port->port.tty; in upd78f0730_dtr_rts() local 279 upd78f0730_tiocmset(tty, set, clear); in upd78f0730_dtr_rts() 282 static speed_t upd78f0730_get_baud_rate(struct tty_struct *tty) in upd78f0730_get_baud_rate() argument 284 const speed_t baud_rate = tty_get_baud_rate(tty); in upd78f0730_get_baud_rate() [all …]
|
/linux-6.6.21/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 …]
|
/linux-6.6.21/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 = tty->disc_data; in serport_ldisc_close() 117 static void serport_ldisc_receive(struct tty_struct *tty, const u8 *cp, in serport_ldisc_receive() argument [all …]
|
/linux-6.6.21/tools/testing/selftests/tty/ ! |
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 …]
|
/linux-6.6.21/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 …]
|