Linux Kernel
3.7.1
|
#include <rpmsg.h>
Data Fields | |
struct rpmsg_channel * | rpdev |
struct kref | refcount |
rpmsg_rx_cb_t | cb |
struct mutex | cb_lock |
u32 | addr |
void * | priv |
struct rpmsg_endpoint - binds a local rpmsg address to its user : rpmsg channel device : when this drops to zero, the ept is deallocated : rx callback handler : must be taken before accessing/changing : local rpmsg address : private data for the driver's use
In essence, an rpmsg endpoint represents a listener on the rpmsg bus, as it binds an rpmsg address with an rx callback handler.
Simple rpmsg drivers shouldn't use this struct directly, because things just work: every rpmsg driver provides an rx callback upon registering to the bus, and that callback is then bound to its rpmsg address when the driver is probed. When relevant inbound messages arrive (i.e. messages which their dst address equals to the src address of the rpmsg channel), the driver's handler is invoked to process it.
More complicated drivers though, that do need to allocate additional rpmsg addresses, and bind them to different rx callbacks, must explicitly create additional endpoints by themselves (see rpmsg_create_ept()).
struct rpmsg_channel* rpdev |