Lines Matching refs:tty

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()
326 status = tty_set_termios(tty, &ktermios); in hci_uart_set_flow_control()
332 status = tty->driver->ops->tiocmget(tty); in hci_uart_set_flow_control()
341 status = tty->driver->ops->tiocmset(tty, set, clear); in hci_uart_set_flow_control()
345 status = tty->driver->ops->tiocmget(tty); in hci_uart_set_flow_control()
354 status = tty->driver->ops->tiocmset(tty, set, clear); in hci_uart_set_flow_control()
358 ktermios = tty->termios; in hci_uart_set_flow_control()
360 status = tty_set_termios(tty, &ktermios); in hci_uart_set_flow_control()
375 struct tty_struct *tty = hu->tty; in hci_uart_set_baudrate() local
378 ktermios = tty->termios; in hci_uart_set_baudrate()
383 tty_set_termios(tty, &ktermios); in hci_uart_set_baudrate()
386 tty->termios.c_ispeed, tty->termios.c_ospeed); in hci_uart_set_baudrate()
476 static int hci_uart_tty_open(struct tty_struct *tty) in hci_uart_tty_open() argument
480 BT_DBG("tty %p", tty); in hci_uart_tty_open()
488 if (tty->ops->write == NULL) in hci_uart_tty_open()
497 tty->disc_data = hu; in hci_uart_tty_open()
498 hu->tty = tty; in hci_uart_tty_open()
499 tty->receive_room = 65536; in hci_uart_tty_open()
511 tty_driver_flush_buffer(tty); in hci_uart_tty_open()
521 static void hci_uart_tty_close(struct tty_struct *tty) in hci_uart_tty_close() argument
523 struct hci_uart *hu = tty->disc_data; in hci_uart_tty_close()
526 BT_DBG("tty %p", tty); in hci_uart_tty_close()
529 tty->disc_data = NULL; in hci_uart_tty_close()
568 static void hci_uart_tty_wakeup(struct tty_struct *tty) in hci_uart_tty_wakeup() argument
570 struct hci_uart *hu = tty->disc_data; in hci_uart_tty_wakeup()
577 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in hci_uart_tty_wakeup()
579 if (tty != hu->tty) in hci_uart_tty_wakeup()
598 static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, in hci_uart_tty_receive() argument
601 struct hci_uart *hu = tty->disc_data; in hci_uart_tty_receive()
603 if (!hu || tty != hu->tty) in hci_uart_tty_receive()
622 tty_unthrottle(tty); in hci_uart_tty_receive()
656 SET_HCIDEV_DEV(hdev, hu->tty->dev); in hci_uart_register_dev()
748 static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file *file, in hci_uart_tty_ioctl() argument
751 struct hci_uart *hu = tty->disc_data; in hci_uart_tty_ioctl()
796 err = n_tty_ioctl_helper(tty, cmd, arg); in hci_uart_tty_ioctl()
806 static ssize_t hci_uart_tty_read(struct tty_struct *tty, struct file *file, in hci_uart_tty_read() argument
813 static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file, in hci_uart_tty_write() argument
819 static __poll_t hci_uart_tty_poll(struct tty_struct *tty, in hci_uart_tty_poll() argument