Lines Matching refs:tty
70 struct tty_struct *tty; member
85 static void ldisc_tx_wakeup(struct tty_struct *tty);
90 ser->tty->stopped << 5 | in update_tty_status()
91 ser->tty->flow_stopped << 3 | in update_tty_status()
92 ser->tty->packet << 2 | in update_tty_status()
93 ser->tty->port->low_latency << 1; in update_tty_status()
95 static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty) in debugfs_init() argument
98 debugfs_create_dir(tty->name, debugfsdir); in debugfs_init()
146 static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty) in debugfs_init() argument
168 static void ldisc_receive(struct tty_struct *tty, const u8 *data, in ldisc_receive() argument
176 ser = tty->disc_data; in ldisc_receive()
219 struct tty_struct *tty; in handle_tx() local
223 tty = ser->tty; in handle_tx()
235 room = tty_write_room(tty); in handle_tx()
245 tty_wr = tty->ops->write(tty, skb->data, len); in handle_tx()
249 ldisc_receive(tty, skb->data, NULL, len); in handle_tx()
299 static void ldisc_tx_wakeup(struct tty_struct *tty) in ldisc_tx_wakeup() argument
303 ser = tty->disc_data; in ldisc_tx_wakeup()
305 WARN_ON(ser->tty != tty); in ldisc_tx_wakeup()
332 static int ldisc_open(struct tty_struct *tty) in ldisc_open() argument
340 if (tty->ops->write == NULL) in ldisc_open()
348 result = snprintf(name, sizeof(name), "cf%s", tty->name); in ldisc_open()
357 ser->tty = tty_kref_get(tty); in ldisc_open()
359 debugfs_init(ser, tty); in ldisc_open()
360 tty->receive_room = N_TTY_BUF_SIZE; in ldisc_open()
361 tty->disc_data = ser; in ldisc_open()
362 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in ldisc_open()
380 static void ldisc_close(struct tty_struct *tty) in ldisc_close() argument
382 struct ser_device *ser = tty->disc_data; in ldisc_close()
384 tty_kref_put(ser->tty); in ldisc_close()