linux/drivers/tty/rpmsg_tty.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2021 STMicroelectronics - All Rights Reserved
 *
 * The rpmsg tty driver implements serial communication on the RPMsg bus to makes
 * possible for user-space programs to send and receive rpmsg messages as a standard
 * tty protocol.
 *
 * The remote processor can instantiate a new tty by requesting a "rpmsg-tty" RPMsg service.
 * The "rpmsg-tty" service is directly used for data exchange. No flow control is implemented yet.
 */

#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/rpmsg.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>

#define RPMSG_TTY_NAME
#define MAX_TTY_RPMSG

static DEFINE_IDR(tty_idr);	/* tty instance id */
static DEFINE_MUTEX(idr_lock);	/* protects tty_idr */

static struct tty_driver *rpmsg_tty_driver;

struct rpmsg_tty_port {};

static int rpmsg_tty_cb(struct rpmsg_device *rpdev, void *data, int len, void *priv, u32 src)
{}

static int rpmsg_tty_install(struct tty_driver *driver, struct tty_struct *tty)
{}

static void rpmsg_tty_cleanup(struct tty_struct *tty)
{}

static int rpmsg_tty_open(struct tty_struct *tty, struct file *filp)
{}

static void rpmsg_tty_close(struct tty_struct *tty, struct file *filp)
{}

static ssize_t rpmsg_tty_write(struct tty_struct *tty, const u8 *buf,
			       size_t len)
{}

static unsigned int rpmsg_tty_write_room(struct tty_struct *tty)
{}

static void rpmsg_tty_hangup(struct tty_struct *tty)
{}

static const struct tty_operations rpmsg_tty_ops =;

static struct rpmsg_tty_port *rpmsg_tty_alloc_cport(void)
{}

static void rpmsg_tty_destruct_port(struct tty_port *port)
{}

static const struct tty_port_operations rpmsg_tty_port_ops =;


static int rpmsg_tty_probe(struct rpmsg_device *rpdev)
{}

static void rpmsg_tty_remove(struct rpmsg_device *rpdev)
{}

static struct rpmsg_device_id rpmsg_driver_tty_id_table[] =;
MODULE_DEVICE_TABLE(rpmsg, rpmsg_driver_tty_id_table);

static struct rpmsg_driver rpmsg_tty_rpmsg_drv =;

static int __init rpmsg_tty_init(void)
{}

static void __exit rpmsg_tty_exit(void)
{}

module_init();
module_exit(rpmsg_tty_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();