Skip to content

Commit 75d6872

Browse files
Pixepmathieupoirier
authored andcommitted
doc: rmpsg: Update with rpmsg_endpoint
It seems the documentation was not updated when `rpmsg_sendto` and related switched from `rpmsg_channel` to `rpmsg_endpoint`. This change updates the proper calls, text, and the sample. Signed-off-by: Adrien Leravat <adrien.leravat@gmail.com> Link: https://lore.kernel.org/r/20231203200606.255302-1-adrien.leravat@gmail.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
1 parent 98b1cc8 commit 75d6872

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

Documentation/staging/rpmsg.rst

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -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,
7575
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.
7879

7980
In case there are no TX buffers available, the function will block until
8081
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.
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,
9394
to 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,
9697
its length (in bytes), and an explicit destination address.
9798

9899
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).
101103

102104
In case there are no TX buffers available, the function will block until
103105
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.
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

117119
sends a message across to the remote processor, using the src and dst
118120
addresses 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,
121123
its length (in bytes), and explicit source and destination addresses.
122124
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).
125128

126129
In case there are no TX buffers available, the function will block until
127130
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.
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,
141144
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.
144148

145149
In case there are no TX buffers available, the function will immediately
146150
return -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,
157161
to a destination address provided by the user.
158162

159163
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.
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

Comments
 (0)