Lines Matching refs:tty
47 struct tty_struct *tty; member
65 struct tty_struct *tty = cs->hw.ser->tty; in write_modem() local
70 if (!tty || !tty->driver || !skb) in write_modem()
79 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in write_modem()
80 if (tty->ops->write) in write_modem()
81 sent = tty->ops->write(tty, skb->data, skb->len); in write_modem()
107 struct tty_struct *tty = cs->hw.ser->tty; in send_cb() local
112 if (!tty || !tty->driver) in send_cb()
120 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in send_cb()
121 sent = tty->ops->write(tty, cb->buf + cb->offset, cb->len); in send_cb()
432 struct tty_struct *tty = cs->hw.ser->tty; in gigaset_set_modem_ctrl() local
435 if (!tty || !tty->driver || !tty->ops->tiocmset) in gigaset_set_modem_ctrl()
442 return tty->ops->tiocmset(tty, set, clear); in gigaset_set_modem_ctrl()
479 static struct cardstate *cs_get(struct tty_struct *tty) in cs_get() argument
481 struct cardstate *cs = tty->disc_data; in cs_get()
502 gigaset_tty_open(struct tty_struct *tty) in gigaset_tty_open() argument
524 cs->hw.ser->tty = tty; in gigaset_tty_open()
527 tty->disc_data = cs; in gigaset_tty_open()
537 tty->receive_room = RBUFSIZE/2; in gigaset_tty_open()
555 tty->disc_data = NULL; in gigaset_tty_open()
565 gigaset_tty_close(struct tty_struct *tty) in gigaset_tty_close() argument
567 struct cardstate *cs = tty->disc_data; in gigaset_tty_close()
577 tty->disc_data = NULL; in gigaset_tty_close()
603 static int gigaset_tty_hangup(struct tty_struct *tty) in gigaset_tty_hangup() argument
605 gigaset_tty_close(tty); in gigaset_tty_hangup()
614 gigaset_tty_read(struct tty_struct *tty, struct file *file, in gigaset_tty_read() argument
625 gigaset_tty_write(struct tty_struct *tty, struct file *file, in gigaset_tty_write() argument
637 gigaset_tty_ioctl(struct tty_struct *tty, struct file *file, in gigaset_tty_ioctl() argument
640 struct cardstate *cs = cs_get(tty); in gigaset_tty_ioctl()
670 rc = n_tty_ioctl_helper(tty, file, cmd, arg); in gigaset_tty_ioctl()
690 gigaset_tty_receive(struct tty_struct *tty, const unsigned char *buf, in gigaset_tty_receive() argument
693 struct cardstate *cs = cs_get(tty); in gigaset_tty_receive()
746 gigaset_tty_wakeup(struct tty_struct *tty) in gigaset_tty_wakeup() argument
748 struct cardstate *cs = cs_get(tty); in gigaset_tty_wakeup()
750 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in gigaset_tty_wakeup()