Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
rpmsg_endpoint Struct Reference

#include <rpmsg.h>

Data Fields

struct rpmsg_channelrpdev
 
struct kref refcount
 
rpmsg_rx_cb_t cb
 
struct mutex cb_lock
 
u32 addr
 
voidpriv
 

Detailed Description

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()).

Definition at line 145 of file rpmsg.h.

Field Documentation

u32 addr

Definition at line 150 of file rpmsg.h.

Definition at line 148 of file rpmsg.h.

struct mutex cb_lock

Definition at line 149 of file rpmsg.h.

Definition at line 151 of file rpmsg.h.

struct kref refcount

Definition at line 147 of file rpmsg.h.

Definition at line 146 of file rpmsg.h.


The documentation for this struct was generated from the following file: