• Home
  • Raw
  • Download

Lines Matching refs:cport

37 	struct rpmsg_tty_port *cport = dev_get_drvdata(&rpdev->dev);  in rpmsg_tty_cb()  local
42 copied = tty_insert_flip_string(&cport->port, data, len); in rpmsg_tty_cb()
45 tty_flip_buffer_push(&cport->port); in rpmsg_tty_cb()
52 struct rpmsg_tty_port *cport = idr_find(&tty_idr, tty->index); in rpmsg_tty_install() local
55 tty->driver_data = cport; in rpmsg_tty_install()
57 port = tty_port_get(&cport->port); in rpmsg_tty_install()
79 struct rpmsg_tty_port *cport = tty->driver_data; in rpmsg_tty_write() local
84 rpdev = cport->rpdev; in rpmsg_tty_write()
107 struct rpmsg_tty_port *cport = tty->driver_data; in rpmsg_tty_write_room() local
110 size = rpmsg_get_mtu(cport->rpdev->ept); in rpmsg_tty_write_room()
134 struct rpmsg_tty_port *cport; in rpmsg_tty_alloc_cport() local
137 cport = kzalloc(sizeof(*cport), GFP_KERNEL); in rpmsg_tty_alloc_cport()
138 if (!cport) in rpmsg_tty_alloc_cport()
142 ret = idr_alloc(&tty_idr, cport, 0, MAX_TTY_RPMSG, GFP_KERNEL); in rpmsg_tty_alloc_cport()
146 kfree(cport); in rpmsg_tty_alloc_cport()
150 cport->id = ret; in rpmsg_tty_alloc_cport()
152 return cport; in rpmsg_tty_alloc_cport()
157 struct rpmsg_tty_port *cport = container_of(port, struct rpmsg_tty_port, port); in rpmsg_tty_destruct_port() local
160 idr_remove(&tty_idr, cport->id); in rpmsg_tty_destruct_port()
163 kfree(cport); in rpmsg_tty_destruct_port()
173 struct rpmsg_tty_port *cport; in rpmsg_tty_probe() local
178 cport = rpmsg_tty_alloc_cport(); in rpmsg_tty_probe()
179 if (IS_ERR(cport)) in rpmsg_tty_probe()
180 return dev_err_probe(dev, PTR_ERR(cport), "Failed to alloc tty port\n"); in rpmsg_tty_probe()
182 tty_port_init(&cport->port); in rpmsg_tty_probe()
183 cport->port.ops = &rpmsg_tty_port_ops; in rpmsg_tty_probe()
185 tty_dev = tty_port_register_device(&cport->port, rpmsg_tty_driver, in rpmsg_tty_probe()
186 cport->id, dev); in rpmsg_tty_probe()
189 tty_port_put(&cport->port); in rpmsg_tty_probe()
193 cport->rpdev = rpdev; in rpmsg_tty_probe()
195 dev_set_drvdata(dev, cport); in rpmsg_tty_probe()
198 rpdev->src, rpdev->dst, cport->id); in rpmsg_tty_probe()
205 struct rpmsg_tty_port *cport = dev_get_drvdata(&rpdev->dev); in rpmsg_tty_remove() local
207 dev_dbg(&rpdev->dev, "Removing rpmsg tty device %d\n", cport->id); in rpmsg_tty_remove()
210 tty_port_tty_hangup(&cport->port, false); in rpmsg_tty_remove()
212 tty_unregister_device(rpmsg_tty_driver, cport->id); in rpmsg_tty_remove()
214 tty_port_put(&cport->port); in rpmsg_tty_remove()