Lines Matching refs:tty
110 static int rfcomm_dev_activate(struct tty_port *port, struct tty_struct *tty) in rfcomm_dev_activate() argument
117 set_bit(TTY_IO_ERROR, &tty->flags); in rfcomm_dev_activate()
321 struct device *tty; in rfcomm_dev_add() local
331 tty = tty_port_register_device(&dev->port, rfcomm_tty_driver, in rfcomm_dev_add()
333 if (IS_ERR(tty)) { in rfcomm_dev_add()
335 return PTR_ERR(tty); in rfcomm_dev_add()
338 dev->tty_dev = tty; in rfcomm_dev_add()
677 static void rfcomm_tty_cleanup(struct tty_struct *tty) in rfcomm_tty_cleanup() argument
679 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_cleanup()
684 tty->driver_data = NULL; in rfcomm_tty_cleanup()
700 static int rfcomm_tty_install(struct tty_driver *driver, struct tty_struct *tty) in rfcomm_tty_install() argument
706 dev = rfcomm_dev_get(tty->index); in rfcomm_tty_install()
714 tty->driver_data = dev; in rfcomm_tty_install()
719 err = tty_port_install(&dev->port, driver, tty); in rfcomm_tty_install()
721 rfcomm_tty_cleanup(tty); in rfcomm_tty_install()
738 static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp) in rfcomm_tty_open() argument
740 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_open()
743 BT_DBG("tty %p id %d", tty, tty->index); in rfcomm_tty_open()
748 err = tty_port_open(&dev->port, tty, filp); in rfcomm_tty_open()
764 static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp) in rfcomm_tty_close() argument
766 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_close()
768 BT_DBG("tty %p dev %p dlc %p opened %d", tty, dev, dev->dlc, in rfcomm_tty_close()
771 tty_port_close(&dev->port, tty, filp); in rfcomm_tty_close()
774 static ssize_t rfcomm_tty_write(struct tty_struct *tty, const u8 *buf, in rfcomm_tty_write() argument
777 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_write()
782 BT_DBG("tty %p count %zu", tty, count); in rfcomm_tty_write()
804 static unsigned int rfcomm_tty_write_room(struct tty_struct *tty) in rfcomm_tty_write_room() argument
806 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_write_room()
812 BT_DBG("tty %p room %d", tty, room); in rfcomm_tty_write_room()
817 static int rfcomm_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) in rfcomm_tty_ioctl() argument
819 BT_DBG("tty %p cmd 0x%02x", tty, cmd); in rfcomm_tty_ioctl()
850 static void rfcomm_tty_set_termios(struct tty_struct *tty, in rfcomm_tty_set_termios() argument
853 struct ktermios *new = &tty->termios; in rfcomm_tty_set_termios()
860 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_set_termios()
862 BT_DBG("tty %p termios %p", tty, old); in rfcomm_tty_set_termios()
990 static void rfcomm_tty_throttle(struct tty_struct *tty) in rfcomm_tty_throttle() argument
992 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_throttle()
994 BT_DBG("tty %p dev %p", tty, dev); in rfcomm_tty_throttle()
999 static void rfcomm_tty_unthrottle(struct tty_struct *tty) in rfcomm_tty_unthrottle() argument
1001 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_unthrottle()
1003 BT_DBG("tty %p dev %p", tty, dev); in rfcomm_tty_unthrottle()
1008 static unsigned int rfcomm_tty_chars_in_buffer(struct tty_struct *tty) in rfcomm_tty_chars_in_buffer() argument
1010 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_chars_in_buffer()
1012 BT_DBG("tty %p dev %p", tty, dev); in rfcomm_tty_chars_in_buffer()
1023 static void rfcomm_tty_flush_buffer(struct tty_struct *tty) in rfcomm_tty_flush_buffer() argument
1025 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_flush_buffer()
1027 BT_DBG("tty %p dev %p", tty, dev); in rfcomm_tty_flush_buffer()
1033 tty_wakeup(tty); in rfcomm_tty_flush_buffer()
1036 static void rfcomm_tty_send_xchar(struct tty_struct *tty, u8 ch) in rfcomm_tty_send_xchar() argument
1038 BT_DBG("tty %p ch %c", tty, ch); in rfcomm_tty_send_xchar()
1041 static void rfcomm_tty_wait_until_sent(struct tty_struct *tty, int timeout) in rfcomm_tty_wait_until_sent() argument
1043 BT_DBG("tty %p timeout %d", tty, timeout); in rfcomm_tty_wait_until_sent()
1046 static void rfcomm_tty_hangup(struct tty_struct *tty) in rfcomm_tty_hangup() argument
1048 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_hangup()
1050 BT_DBG("tty %p dev %p", tty, dev); in rfcomm_tty_hangup()
1055 static int rfcomm_tty_tiocmget(struct tty_struct *tty) in rfcomm_tty_tiocmget() argument
1057 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_tiocmget()
1061 BT_DBG("tty %p dev %p", tty, dev); in rfcomm_tty_tiocmget()
1068 static int rfcomm_tty_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear) in rfcomm_tty_tiocmset() argument
1070 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_tiocmset()
1074 BT_DBG("tty %p dev %p set 0x%02x clear 0x%02x", tty, dev, set, clear); in rfcomm_tty_tiocmset()