@@ -68,13 +68,14 @@ User API
6868
6969::
7070
71- int rpmsg_send(struct rpmsg_channel *rpdev , void *data, int len);
71+ int rpmsg_send(struct rpmsg_endpoint *ept , void *data, int len);
7272
73- sends a message across to the remote processor on a given channel .
74- The caller should specify the channel , the data it wants to send,
73+ sends a message across to the remote processor from the given endpoint .
74+ The caller should specify the endpoint , the data it wants to send,
7575and its length (in bytes). The message will be sent on the specified
76- channel, i.e. its source and destination address fields will be
77- set to the channel's src and dst addresses.
76+ endpoint's channel, i.e. its source and destination address fields will be
77+ respectively set to the endpoint's src address and its parent channel
78+ dst addresses.
7879
7980In case there are no TX buffers available, the function will block until
8081one becomes available (i.e. until the remote processor consumes
@@ -87,17 +88,18 @@ Returns 0 on success and an appropriate error value on failure.
8788
8889::
8990
90- int rpmsg_sendto(struct rpmsg_channel *rpdev , void *data, int len, u32 dst);
91+ int rpmsg_sendto(struct rpmsg_endpoint *ept , void *data, int len, u32 dst);
9192
92- sends a message across to the remote processor on a given channel ,
93+ sends a message across to the remote processor from a given endpoint ,
9394to a destination address provided by the caller.
9495
95- The caller should specify the channel , the data it wants to send,
96+ The caller should specify the endpoint , the data it wants to send,
9697its length (in bytes), and an explicit destination address.
9798
9899The message will then be sent to the remote processor to which the
99- channel belongs, using the channel's src address, and the user-provided
100- dst address (thus the channel's dst address will be ignored).
100+ endpoints's channel belongs, using the endpoints's src address,
101+ and the user-provided dst address (thus the channel's dst address
102+ will be ignored).
101103
102104In case there are no TX buffers available, the function will block until
103105one becomes available (i.e. until the remote processor consumes
@@ -110,18 +112,19 @@ Returns 0 on success and an appropriate error value on failure.
110112
111113::
112114
113- int rpmsg_send_offchannel(struct rpmsg_channel *rpdev , u32 src, u32 dst,
115+ int rpmsg_send_offchannel(struct rpmsg_endpoint *ept , u32 src, u32 dst,
114116 void *data, int len);
115117
116118
117119sends a message across to the remote processor, using the src and dst
118120addresses provided by the user.
119121
120- The caller should specify the channel , the data it wants to send,
122+ The caller should specify the endpoint , the data it wants to send,
121123its length (in bytes), and explicit source and destination addresses.
122124The message will then be sent to the remote processor to which the
123- channel belongs, but the channel's src and dst addresses will be
124- ignored (and the user-provided addresses will be used instead).
125+ endpoint's channel belongs, but the endpoint's src and channel dst
126+ addresses will be ignored (and the user-provided addresses will
127+ be used instead).
125128
126129In case there are no TX buffers available, the function will block until
127130one becomes available (i.e. until the remote processor consumes
@@ -134,13 +137,14 @@ Returns 0 on success and an appropriate error value on failure.
134137
135138::
136139
137- int rpmsg_trysend(struct rpmsg_channel *rpdev , void *data, int len);
140+ int rpmsg_trysend(struct rpmsg_endpoint *ept , void *data, int len);
138141
139- sends a message across to the remote processor on a given channel .
140- The caller should specify the channel , the data it wants to send,
142+ sends a message across to the remote processor from a given endpoint .
143+ The caller should specify the endpoint , the data it wants to send,
141144and its length (in bytes). The message will be sent on the specified
142- channel, i.e. its source and destination address fields will be
143- set to the channel's src and dst addresses.
145+ endpoint's channel, i.e. its source and destination address fields will be
146+ respectively set to the endpoint's src address and its parent channel
147+ dst addresses.
144148
145149In case there are no TX buffers available, the function will immediately
146150return -ENOMEM without waiting until one becomes available.
@@ -150,10 +154,10 @@ Returns 0 on success and an appropriate error value on failure.
150154
151155::
152156
153- int rpmsg_trysendto(struct rpmsg_channel *rpdev , void *data, int len, u32 dst)
157+ int rpmsg_trysendto(struct rpmsg_endpoint *ept , void *data, int len, u32 dst)
154158
155159
156- sends a message across to the remote processor on a given channel ,
160+ sends a message across to the remote processor from a given endoint ,
157161to a destination address provided by the user.
158162
159163The user should specify the channel, the data it wants to send,
@@ -171,7 +175,7 @@ Returns 0 on success and an appropriate error value on failure.
171175
172176::
173177
174- int rpmsg_trysend_offchannel(struct rpmsg_channel *rpdev , u32 src, u32 dst,
178+ int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept , u32 src, u32 dst,
175179 void *data, int len);
176180
177181
@@ -284,7 +288,7 @@ content to the console.
284288 dev_info(&rpdev->dev, "chnl: 0x%x -> 0x%x\n", rpdev->src, rpdev->dst);
285289
286290 /* send a message on our channel */
287- err = rpmsg_send(rpdev, "hello!", 6);
291+ err = rpmsg_send(rpdev->ept , "hello!", 6);
288292 if (err) {
289293 pr_err("rpmsg_send failed: %d\n", err);
290294 return err;
0 commit comments