rpmsg: Introduce "poll" to endpoint ops

This allows rpmsg backends to implement polling of the outgoing buffer,
which provides poll support to user space when using the rpmsg character
device.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Bjorn Andersson
2017-01-11 06:35:10 -08:00
parent 5e53c42c33
commit 84d58132d2
3 changed files with 36 additions and 0 deletions

View File

@@ -21,6 +21,7 @@
#define __RPMSG_INTERNAL_H__
#include <linux/rpmsg.h>
#include <linux/poll.h>
#define to_rpmsg_device(d) container_of(d, struct rpmsg_device, dev)
#define to_rpmsg_driver(d) container_of(d, struct rpmsg_driver, drv)
@@ -70,6 +71,8 @@ struct rpmsg_endpoint_ops {
int (*trysendto)(struct rpmsg_endpoint *ept, void *data, int len, u32 dst);
int (*trysend_offchannel)(struct rpmsg_endpoint *ept, u32 src, u32 dst,
void *data, int len);
unsigned int (*poll)(struct rpmsg_endpoint *ept, struct file *filp,
poll_table *wait);
};
int rpmsg_register_device(struct rpmsg_device *rpdev);