Lines Matching refs:tty
149 struct tty_struct *tty = hu->tty; in hci_uart_write_work() local
163 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in hci_uart_write_work()
164 len = tty->ops->write(tty, skb->data, skb->len); in hci_uart_write_work()
229 struct tty_struct *tty = hu->tty; in hci_uart_flush() local
231 BT_DBG("hdev %p tty %p", hdev, tty); in hci_uart_flush()
238 tty_ldisc_flush(tty); in hci_uart_flush()
239 tty_driver_flush_buffer(tty); in hci_uart_flush()
302 if (hu->tty->driver->ops->tiocmget && hu->tty->driver->ops->tiocmset) in hci_uart_has_flow_control()
311 struct tty_struct *tty = hu->tty; in hci_uart_set_flow_control() local
325 ktermios = tty->termios; in hci_uart_set_flow_control()
327 status = tty_set_termios(tty, &ktermios); in hci_uart_set_flow_control()
333 status = tty->driver->ops->tiocmget(tty); in hci_uart_set_flow_control()
342 status = tty->driver->ops->tiocmset(tty, set, clear); in hci_uart_set_flow_control()
346 status = tty->driver->ops->tiocmget(tty); in hci_uart_set_flow_control()
355 status = tty->driver->ops->tiocmset(tty, set, clear); in hci_uart_set_flow_control()
359 ktermios = tty->termios; in hci_uart_set_flow_control()
361 status = tty_set_termios(tty, &ktermios); in hci_uart_set_flow_control()
376 struct tty_struct *tty = hu->tty; in hci_uart_set_baudrate() local
379 ktermios = tty->termios; in hci_uart_set_baudrate()
384 tty_set_termios(tty, &ktermios); in hci_uart_set_baudrate()
387 tty->termios.c_ispeed, tty->termios.c_ospeed); in hci_uart_set_baudrate()
477 static int hci_uart_tty_open(struct tty_struct *tty) in hci_uart_tty_open() argument
481 BT_DBG("tty %p", tty); in hci_uart_tty_open()
486 if (tty->ops->write == NULL) in hci_uart_tty_open()
495 tty->disc_data = hu; in hci_uart_tty_open()
496 hu->tty = tty; in hci_uart_tty_open()
497 tty->receive_room = 65536; in hci_uart_tty_open()
509 tty_driver_flush_buffer(tty); in hci_uart_tty_open()
519 static void hci_uart_tty_close(struct tty_struct *tty) in hci_uart_tty_close() argument
521 struct hci_uart *hu = tty->disc_data; in hci_uart_tty_close()
524 BT_DBG("tty %p", tty); in hci_uart_tty_close()
527 tty->disc_data = NULL; in hci_uart_tty_close()
565 static void hci_uart_tty_wakeup(struct tty_struct *tty) in hci_uart_tty_wakeup() argument
567 struct hci_uart *hu = tty->disc_data; in hci_uart_tty_wakeup()
574 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in hci_uart_tty_wakeup()
576 if (tty != hu->tty) in hci_uart_tty_wakeup()
595 static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, in hci_uart_tty_receive() argument
598 struct hci_uart *hu = tty->disc_data; in hci_uart_tty_receive()
600 if (!hu || tty != hu->tty) in hci_uart_tty_receive()
619 tty_unthrottle(tty); in hci_uart_tty_receive()
653 SET_HCIDEV_DEV(hdev, hu->tty->dev); in hci_uart_register_dev()
745 static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file *file, in hci_uart_tty_ioctl() argument
748 struct hci_uart *hu = tty->disc_data; in hci_uart_tty_ioctl()
793 err = n_tty_ioctl_helper(tty, file, cmd, arg); in hci_uart_tty_ioctl()
803 static ssize_t hci_uart_tty_read(struct tty_struct *tty, struct file *file, in hci_uart_tty_read() argument
809 static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file, in hci_uart_tty_write() argument
815 static __poll_t hci_uart_tty_poll(struct tty_struct *tty, in hci_uart_tty_poll() argument