Lines Matching refs:tty

111 static int rfcomm_dev_activate(struct tty_port *port, struct tty_struct *tty)  in rfcomm_dev_activate()  argument
118 set_bit(TTY_IO_ERROR, &tty->flags); in rfcomm_dev_activate()
320 struct device *tty; in rfcomm_dev_add() local
330 tty = tty_port_register_device(&dev->port, rfcomm_tty_driver, in rfcomm_dev_add()
332 if (IS_ERR(tty)) { in rfcomm_dev_add()
334 return PTR_ERR(tty); in rfcomm_dev_add()
337 dev->tty_dev = tty; in rfcomm_dev_add()
442 struct tty_struct *tty; in __rfcomm_release_dev() local
468 tty = tty_port_tty_get(&dev->port); in __rfcomm_release_dev()
469 if (tty) { in __rfcomm_release_dev()
470 tty_vhangup(tty); in __rfcomm_release_dev()
471 tty_kref_put(tty); in __rfcomm_release_dev()
686 static void rfcomm_tty_cleanup(struct tty_struct *tty) in rfcomm_tty_cleanup() argument
688 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_cleanup()
693 tty->driver_data = NULL; in rfcomm_tty_cleanup()
709 static int rfcomm_tty_install(struct tty_driver *driver, struct tty_struct *tty) in rfcomm_tty_install() argument
715 dev = rfcomm_dev_get(tty->index); in rfcomm_tty_install()
723 tty->driver_data = dev; in rfcomm_tty_install()
728 err = tty_port_install(&dev->port, driver, tty); in rfcomm_tty_install()
730 rfcomm_tty_cleanup(tty); in rfcomm_tty_install()
747 static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp) in rfcomm_tty_open() argument
749 struct rfcomm_dev *dev = tty->driver_data; in rfcomm_tty_open()
752 BT_DBG("tty %p id %d", tty, tty->index); in rfcomm_tty_open()
757 err = tty_port_open(&dev->port, tty, filp); in rfcomm_tty_open()
773 static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp) in rfcomm_tty_close() argument
775 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; in rfcomm_tty_close()
777 BT_DBG("tty %p dev %p dlc %p opened %d", tty, dev, dev->dlc, in rfcomm_tty_close()
780 tty_port_close(&dev->port, tty, filp); in rfcomm_tty_close()
783 static int rfcomm_tty_write(struct tty_struct *tty, const unsigned char *buf, int count) in rfcomm_tty_write() argument
785 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; in rfcomm_tty_write()
790 BT_DBG("tty %p count %d", tty, count); in rfcomm_tty_write()
812 static int rfcomm_tty_write_room(struct tty_struct *tty) in rfcomm_tty_write_room() argument
814 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; in rfcomm_tty_write_room()
820 BT_DBG("tty %p room %d", tty, room); in rfcomm_tty_write_room()
825 static int rfcomm_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) in rfcomm_tty_ioctl() argument
827 BT_DBG("tty %p cmd 0x%02x", tty, cmd); in rfcomm_tty_ioctl()
870 static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old) in rfcomm_tty_set_termios() argument
872 struct ktermios *new = &tty->termios; in rfcomm_tty_set_termios()
879 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; in rfcomm_tty_set_termios()
881 BT_DBG("tty %p termios %p", tty, old); in rfcomm_tty_set_termios()
1009 static void rfcomm_tty_throttle(struct tty_struct *tty) in rfcomm_tty_throttle() argument
1011 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; in rfcomm_tty_throttle()
1013 BT_DBG("tty %p dev %p", tty, dev); in rfcomm_tty_throttle()
1018 static void rfcomm_tty_unthrottle(struct tty_struct *tty) in rfcomm_tty_unthrottle() argument
1020 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; in rfcomm_tty_unthrottle()
1022 BT_DBG("tty %p dev %p", tty, dev); in rfcomm_tty_unthrottle()
1027 static int rfcomm_tty_chars_in_buffer(struct tty_struct *tty) in rfcomm_tty_chars_in_buffer() argument
1029 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; in rfcomm_tty_chars_in_buffer()
1031 BT_DBG("tty %p dev %p", tty, dev); in rfcomm_tty_chars_in_buffer()
1042 static void rfcomm_tty_flush_buffer(struct tty_struct *tty) in rfcomm_tty_flush_buffer() argument
1044 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; in rfcomm_tty_flush_buffer()
1046 BT_DBG("tty %p dev %p", tty, dev); in rfcomm_tty_flush_buffer()
1052 tty_wakeup(tty); in rfcomm_tty_flush_buffer()
1055 static void rfcomm_tty_send_xchar(struct tty_struct *tty, char ch) in rfcomm_tty_send_xchar() argument
1057 BT_DBG("tty %p ch %c", tty, ch); in rfcomm_tty_send_xchar()
1060 static void rfcomm_tty_wait_until_sent(struct tty_struct *tty, int timeout) in rfcomm_tty_wait_until_sent() argument
1062 BT_DBG("tty %p timeout %d", tty, timeout); in rfcomm_tty_wait_until_sent()
1065 static void rfcomm_tty_hangup(struct tty_struct *tty) in rfcomm_tty_hangup() argument
1067 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; in rfcomm_tty_hangup()
1069 BT_DBG("tty %p dev %p", tty, dev); in rfcomm_tty_hangup()
1074 static int rfcomm_tty_tiocmget(struct tty_struct *tty) in rfcomm_tty_tiocmget() argument
1076 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; in rfcomm_tty_tiocmget()
1078 BT_DBG("tty %p dev %p", tty, dev); in rfcomm_tty_tiocmget()
1083 static int rfcomm_tty_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear) in rfcomm_tty_tiocmset() argument
1085 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; in rfcomm_tty_tiocmset()
1089 BT_DBG("tty %p dev %p set 0x%02x clear 0x%02x", tty, dev, set, clear); in rfcomm_tty_tiocmset()