Lines Matching refs:tty
141 struct tty_struct *tty = hu->tty; in hci_uart_write_work() local
155 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in hci_uart_write_work()
156 len = tty->ops->write(tty, skb->data, skb->len); in hci_uart_write_work()
218 struct tty_struct *tty = hu->tty; in hci_uart_flush() local
220 BT_DBG("hdev %p tty %p", hdev, tty); in hci_uart_flush()
227 tty_ldisc_flush(tty); in hci_uart_flush()
228 tty_driver_flush_buffer(tty); in hci_uart_flush()
263 struct tty_struct *tty = hu->tty; in hci_uart_set_flow_control() local
271 ktermios = tty->termios; in hci_uart_set_flow_control()
273 status = tty_set_termios(tty, &ktermios); in hci_uart_set_flow_control()
279 status = tty->driver->ops->tiocmget(tty); in hci_uart_set_flow_control()
288 status = tty->driver->ops->tiocmset(tty, set, clear); in hci_uart_set_flow_control()
292 status = tty->driver->ops->tiocmget(tty); in hci_uart_set_flow_control()
301 status = tty->driver->ops->tiocmset(tty, set, clear); in hci_uart_set_flow_control()
305 ktermios = tty->termios; in hci_uart_set_flow_control()
307 status = tty_set_termios(tty, &ktermios); in hci_uart_set_flow_control()
322 struct tty_struct *tty = hu->tty; in hci_uart_init_tty() local
326 ktermios = tty->termios; in hci_uart_init_tty()
336 tty_set_termios(tty, &ktermios); in hci_uart_init_tty()
341 struct tty_struct *tty = hu->tty; in hci_uart_set_baudrate() local
344 ktermios = tty->termios; in hci_uart_set_baudrate()
349 tty_set_termios(tty, &ktermios); in hci_uart_set_baudrate()
352 tty->termios.c_ispeed, tty->termios.c_ospeed); in hci_uart_set_baudrate()
440 static int hci_uart_tty_open(struct tty_struct *tty) in hci_uart_tty_open() argument
444 BT_DBG("tty %p", tty); in hci_uart_tty_open()
448 if (tty->ops->write == NULL) in hci_uart_tty_open()
457 tty->disc_data = hu; in hci_uart_tty_open()
458 hu->tty = tty; in hci_uart_tty_open()
459 tty->receive_room = 65536; in hci_uart_tty_open()
469 if (tty->ldisc->ops->flush_buffer) in hci_uart_tty_open()
470 tty->ldisc->ops->flush_buffer(tty); in hci_uart_tty_open()
471 tty_driver_flush_buffer(tty); in hci_uart_tty_open()
481 static void hci_uart_tty_close(struct tty_struct *tty) in hci_uart_tty_close() argument
483 struct hci_uart *hu = tty->disc_data; in hci_uart_tty_close()
486 BT_DBG("tty %p", tty); in hci_uart_tty_close()
489 tty->disc_data = NULL; in hci_uart_tty_close()
520 static void hci_uart_tty_wakeup(struct tty_struct *tty) in hci_uart_tty_wakeup() argument
522 struct hci_uart *hu = tty->disc_data; in hci_uart_tty_wakeup()
529 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in hci_uart_tty_wakeup()
531 if (tty != hu->tty) in hci_uart_tty_wakeup()
550 static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, in hci_uart_tty_receive() argument
553 struct hci_uart *hu = tty->disc_data; in hci_uart_tty_receive()
555 if (!hu || tty != hu->tty) in hci_uart_tty_receive()
569 tty_unthrottle(tty); in hci_uart_tty_receive()
602 SET_HCIDEV_DEV(hdev, hu->tty->dev); in hci_uart_register_dev()
686 static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file *file, in hci_uart_tty_ioctl() argument
689 struct hci_uart *hu = tty->disc_data; in hci_uart_tty_ioctl()
732 err = n_tty_ioctl_helper(tty, file, cmd, arg); in hci_uart_tty_ioctl()
742 static ssize_t hci_uart_tty_read(struct tty_struct *tty, struct file *file, in hci_uart_tty_read() argument
748 static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file, in hci_uart_tty_write() argument
754 static unsigned int hci_uart_tty_poll(struct tty_struct *tty, in hci_uart_tty_poll() argument