linux/drivers/rpmsg/rpmsg_char.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2022, STMicroelectronics
 * Copyright (c) 2016, Linaro Ltd.
 * Copyright (c) 2012, Michal Simek <[email protected]>
 * Copyright (c) 2012, PetaLogix
 * Copyright (c) 2011, Texas Instruments, Inc.
 * Copyright (c) 2011, Google, Inc.
 *
 * Based on rpmsg performance statistics driver by Michal Simek, which in turn
 * was based on TI & Google OMX rpmsg driver.
 */

#define pr_fmt(fmt)

#include <linux/cdev.h>
#include <linux/device.h>
#include <linux/fs.h>
#include <linux/idr.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/poll.h>
#include <linux/rpmsg.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <uapi/linux/rpmsg.h>

#include "rpmsg_char.h"
#include "rpmsg_internal.h"

#define RPMSG_DEV_MAX

static dev_t rpmsg_major;

static DEFINE_IDA(rpmsg_ept_ida);
static DEFINE_IDA(rpmsg_minor_ida);

#define dev_to_eptdev(dev)
#define cdev_to_eptdev(i_cdev)

/**
 * struct rpmsg_eptdev - endpoint device context
 * @dev:	endpoint device
 * @cdev:	cdev for the endpoint device
 * @rpdev:	underlaying rpmsg device
 * @chinfo:	info used to open the endpoint
 * @ept_lock:	synchronization of @ept modifications
 * @ept:	rpmsg endpoint reference, when open
 * @queue_lock:	synchronization of @queue operations
 * @queue:	incoming message queue
 * @readq:	wait object for incoming queue
 * @default_ept: set to channel default endpoint if the default endpoint should be re-used
 *              on device open to prevent endpoint address update.
 * @remote_flow_restricted: to indicate if the remote has requested for flow to be limited
 * @remote_flow_updated: to indicate if the flow control has been requested
 */
struct rpmsg_eptdev {};

int rpmsg_chrdev_eptdev_destroy(struct device *dev, void *data)
{}
EXPORT_SYMBOL();

static int rpmsg_ept_cb(struct rpmsg_device *rpdev, void *buf, int len,
			void *priv, u32 addr)
{}

static int rpmsg_ept_flow_cb(struct rpmsg_device *rpdev, void *priv, bool enable)
{}

static int rpmsg_eptdev_open(struct inode *inode, struct file *filp)
{}

static int rpmsg_eptdev_release(struct inode *inode, struct file *filp)
{}

static ssize_t rpmsg_eptdev_read_iter(struct kiocb *iocb, struct iov_iter *to)
{}

static ssize_t rpmsg_eptdev_write_iter(struct kiocb *iocb,
				       struct iov_iter *from)
{}

static __poll_t rpmsg_eptdev_poll(struct file *filp, poll_table *wait)
{}

static long rpmsg_eptdev_ioctl(struct file *fp, unsigned int cmd,
			       unsigned long arg)
{}

static const struct file_operations rpmsg_eptdev_fops =;

static ssize_t name_show(struct device *dev, struct device_attribute *attr,
			 char *buf)
{}
static DEVICE_ATTR_RO(name);

static ssize_t src_show(struct device *dev, struct device_attribute *attr,
			 char *buf)
{}
static DEVICE_ATTR_RO(src);

static ssize_t dst_show(struct device *dev, struct device_attribute *attr,
			 char *buf)
{}
static DEVICE_ATTR_RO(dst);

static struct attribute *rpmsg_eptdev_attrs[] =;
ATTRIBUTE_GROUPS();

static void rpmsg_eptdev_release_device(struct device *dev)
{}

static struct rpmsg_eptdev *rpmsg_chrdev_eptdev_alloc(struct rpmsg_device *rpdev,
						      struct device *parent)
{}

static int rpmsg_chrdev_eptdev_add(struct rpmsg_eptdev *eptdev, struct rpmsg_channel_info chinfo)
{}

int rpmsg_chrdev_eptdev_create(struct rpmsg_device *rpdev, struct device *parent,
			       struct rpmsg_channel_info chinfo)
{}
EXPORT_SYMBOL();

static int rpmsg_chrdev_probe(struct rpmsg_device *rpdev)
{}

static void rpmsg_chrdev_remove(struct rpmsg_device *rpdev)
{}

static struct rpmsg_device_id rpmsg_chrdev_id_table[] =;

static struct rpmsg_driver rpmsg_chrdev_driver =;

static int rpmsg_chrdev_init(void)
{}
postcore_initcall(rpmsg_chrdev_init);

static void rpmsg_chrdev_exit(void)
{}
module_exit(rpmsg_chrdev_exit);

MODULE_ALIAS();
MODULE_DESCRIPTION();
MODULE_LICENSE();