Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Adrien Leravat and committed by
Mathieu Poirier
75d68729 98b1cc82

+27 -23
+27 -23
Documentation/staging/rpmsg.rst
··· 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 ··· 88 87 89 88 :: 90 89 91 - int rpmsg_sendto(struct rpmsg_channel *rpdev, void *data, int len, u32 dst); 90 + int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst); 92 91 93 - sends a message across to the remote processor on a given channel, 92 + sends a message across to the remote processor from a given endpoint, 94 93 to a destination address provided by the caller. 95 94 96 - The caller should specify the channel, the data it wants to send, 95 + The caller should specify the endpoint, the data it wants to send, 97 96 its length (in bytes), and an explicit destination address. 98 97 99 98 The message will then be sent to the remote processor to which the 100 - channel belongs, using the channel's src address, and the user-provided 101 - dst address (thus the channel's dst address will be ignored). 99 + endpoints's channel belongs, using the endpoints's src address, 100 + and the user-provided dst address (thus the channel's dst address 101 + will be ignored). 102 102 103 103 In case there are no TX buffers available, the function will block until 104 104 one becomes available (i.e. until the remote processor consumes ··· 112 110 113 111 :: 114 112 115 - int rpmsg_send_offchannel(struct rpmsg_channel *rpdev, u32 src, u32 dst, 113 + int rpmsg_send_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst, 116 114 void *data, int len); 117 115 118 116 119 117 sends a message across to the remote processor, using the src and dst 120 118 addresses provided by the user. 121 119 122 - The caller should specify the channel, the data it wants to send, 120 + The caller should specify the endpoint, the data it wants to send, 123 121 its length (in bytes), and explicit source and destination addresses. 124 122 The message will then be sent to the remote processor to which the 125 - channel belongs, but the channel's src and dst addresses will be 126 - ignored (and the user-provided addresses will be used instead). 123 + endpoint's channel belongs, but the endpoint's src and channel dst 124 + addresses will be ignored (and the user-provided addresses will 125 + be used instead). 127 126 128 127 In case there are no TX buffers available, the function will block until 129 128 one becomes available (i.e. until the remote processor consumes ··· 137 134 138 135 :: 139 136 140 - int rpmsg_trysend(struct rpmsg_channel *rpdev, void *data, int len); 137 + int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len); 141 138 142 - sends a message across to the remote processor on a given channel. 143 - The caller should specify the channel, the data it wants to send, 139 + sends a message across to the remote processor from a given endpoint. 140 + The caller should specify the endpoint, the data it wants to send, 144 141 and its length (in bytes). The message will be sent on the specified 145 - channel, i.e. its source and destination address fields will be 146 - set to the channel's src and dst addresses. 142 + endpoint's channel, i.e. its source and destination address fields will be 143 + respectively set to the endpoint's src address and its parent channel 144 + dst addresses. 147 145 148 146 In case there are no TX buffers available, the function will immediately 149 147 return -ENOMEM without waiting until one becomes available. ··· 154 150 155 151 :: 156 152 157 - int rpmsg_trysendto(struct rpmsg_channel *rpdev, void *data, int len, u32 dst) 153 + int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst) 158 154 159 155 160 - sends a message across to the remote processor on a given channel, 156 + sends a message across to the remote processor from a given endoint, 161 157 to a destination address provided by the user. 162 158 163 159 The user should specify the channel, the data it wants to send, ··· 175 171 176 172 :: 177 173 178 - int rpmsg_trysend_offchannel(struct rpmsg_channel *rpdev, u32 src, u32 dst, 174 + int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst, 179 175 void *data, int len); 180 176 181 177 ··· 288 284 dev_info(&rpdev->dev, "chnl: 0x%x -> 0x%x\n", rpdev->src, rpdev->dst); 289 285 290 286 /* send a message on our channel */ 291 - err = rpmsg_send(rpdev, "hello!", 6); 287 + err = rpmsg_send(rpdev->ept, "hello!", 6); 292 288 if (err) { 293 289 pr_err("rpmsg_send failed: %d\n", err); 294 290 return err;