@@ -68,13 +68,14 @@ User API
68
68
69
69
::
70
70
71
- int rpmsg_send(struct rpmsg_channel *rpdev , void *data, int len);
71
+ int rpmsg_send(struct rpmsg_endpoint *ept , void *data, int len);
72
72
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,
75
75
and 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.
78
79
79
80
In case there are no TX buffers available, the function will block until
80
81
one becomes available (i.e. until the remote processor consumes
@@ -87,17 +88,18 @@ Returns 0 on success and an appropriate error value on failure.
87
88
88
89
::
89
90
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);
91
92
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 ,
93
94
to a destination address provided by the caller.
94
95
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,
96
97
its length (in bytes), and an explicit destination address.
97
98
98
99
The 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).
101
103
102
104
In case there are no TX buffers available, the function will block until
103
105
one becomes available (i.e. until the remote processor consumes
@@ -110,18 +112,19 @@ Returns 0 on success and an appropriate error value on failure.
110
112
111
113
::
112
114
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,
114
116
void *data, int len);
115
117
116
118
117
119
sends a message across to the remote processor, using the src and dst
118
120
addresses provided by the user.
119
121
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,
121
123
its length (in bytes), and explicit source and destination addresses.
122
124
The 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).
125
128
126
129
In case there are no TX buffers available, the function will block until
127
130
one becomes available (i.e. until the remote processor consumes
@@ -134,13 +137,14 @@ Returns 0 on success and an appropriate error value on failure.
134
137
135
138
::
136
139
137
- int rpmsg_trysend(struct rpmsg_channel *rpdev , void *data, int len);
140
+ int rpmsg_trysend(struct rpmsg_endpoint *ept , void *data, int len);
138
141
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,
141
144
and 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.
144
148
145
149
In case there are no TX buffers available, the function will immediately
146
150
return -ENOMEM without waiting until one becomes available.
@@ -150,10 +154,10 @@ Returns 0 on success and an appropriate error value on failure.
150
154
151
155
::
152
156
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)
154
158
155
159
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 ,
157
161
to a destination address provided by the user.
158
162
159
163
The 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.
171
175
172
176
::
173
177
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,
175
179
void *data, int len);
176
180
177
181
@@ -284,7 +288,7 @@ content to the console.
284
288
dev_info(&rpdev->dev, "chnl: 0x%x -> 0x%x\n", rpdev->src, rpdev->dst);
285
289
286
290
/* send a message on our channel */
287
- err = rpmsg_send(rpdev, "hello!", 6);
291
+ err = rpmsg_send(rpdev->ept , "hello!", 6);
288
292
if (err) {
289
293
pr_err("rpmsg_send failed: %d\n", err);
290
294
return err;
0 commit comments