Lines Matching full:tty

5  * The rpmsg tty driver implements serial communication on the RPMsg bus to makes
7 * tty protocol.
9 * The remote processor can instantiate a new tty by requesting a "rpmsg-tty" RPMsg service.
10 * The "rpmsg-tty" service is directly used for data exchange. No flow control is implemented yet.
18 #include <linux/tty.h>
24 static DEFINE_IDR(tty_idr); /* tty instance id */
30 struct tty_port port; /* TTY port data */
31 int id; /* TTY rpmsg index */
50 static int rpmsg_tty_install(struct tty_driver *driver, struct tty_struct *tty) in rpmsg_tty_install() argument
52 struct rpmsg_tty_port *cport = idr_find(&tty_idr, tty->index); in rpmsg_tty_install()
55 tty->driver_data = cport; in rpmsg_tty_install()
58 return tty_port_install(port, driver, tty); in rpmsg_tty_install()
61 static void rpmsg_tty_cleanup(struct tty_struct *tty) in rpmsg_tty_cleanup() argument
63 tty_port_put(tty->port); in rpmsg_tty_cleanup()
66 static int rpmsg_tty_open(struct tty_struct *tty, struct file *filp) in rpmsg_tty_open() argument
68 return tty_port_open(tty->port, tty, filp); in rpmsg_tty_open()
71 static void rpmsg_tty_close(struct tty_struct *tty, struct file *filp) in rpmsg_tty_close() argument
73 return tty_port_close(tty->port, tty, filp); in rpmsg_tty_close()
76 static ssize_t rpmsg_tty_write(struct tty_struct *tty, const u8 *buf, in rpmsg_tty_write() argument
79 struct rpmsg_tty_port *cport = tty->driver_data; in rpmsg_tty_write()
105 static unsigned int rpmsg_tty_write_room(struct tty_struct *tty) in rpmsg_tty_write_room() argument
107 struct rpmsg_tty_port *cport = tty->driver_data; in rpmsg_tty_write_room()
117 static void rpmsg_tty_hangup(struct tty_struct *tty) in rpmsg_tty_hangup() argument
119 tty_port_hangup(tty->port); in rpmsg_tty_hangup()
180 return dev_err_probe(dev, PTR_ERR(cport), "Failed to alloc tty port\n"); in rpmsg_tty_probe()
188 ret = dev_err_probe(dev, PTR_ERR(tty_dev), "Failed to register tty port\n"); in rpmsg_tty_probe()
207 dev_dbg(&rpdev->dev, "Removing rpmsg tty device %d\n", cport->id); in rpmsg_tty_remove()
209 /* User hang up to release the tty */ in rpmsg_tty_remove()
218 { .name = "rpmsg-tty" },
287 MODULE_DESCRIPTION("remote processor messaging tty driver");