From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Adrien Leravat <adrien.leravat@gmail.com>
Cc: andersson@kernel.org, corbet@lwn.net,
linux-remoteproc@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] doc: rmpsg: update with rpmsg_endpoint
Date: Fri, 8 Dec 2023 13:33:28 -0700 [thread overview]
Message-ID: <ZXN9mAXUeHopmdiQ@p14s> (raw)
In-Reply-To: <20231203200606.255302-1-adrien.leravat@gmail.com>
On Sun, Dec 03, 2023 at 12:06:04PM -0800, Adrien Leravat wrote:
> 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>
> ---
> Documentation/staging/rpmsg.rst | 50 ++++++++++++++++++---------------
> 1 file changed, 27 insertions(+), 23 deletions(-)
>
Thanks for the refactoring. I have applied this patch.
Mathieu
> diff --git a/Documentation/staging/rpmsg.rst b/Documentation/staging/rpmsg.rst
> index 1ce353cb232a..dba3e5f65612 100644
> --- a/Documentation/staging/rpmsg.rst
> +++ b/Documentation/staging/rpmsg.rst
> @@ -68,13 +68,14 @@ User API
>
> ::
>
> - int rpmsg_send(struct rpmsg_channel *rpdev, void *data, int len);
> + int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len);
>
> -sends a message across to the remote processor on a given channel.
> -The caller should specify the channel, the data it wants to send,
> +sends a message across to the remote processor from the given endpoint.
> +The caller should specify the endpoint, the data it wants to send,
> and its length (in bytes). The message will be sent on the specified
> -channel, i.e. its source and destination address fields will be
> -set to the channel's src and dst addresses.
> +endpoint's channel, i.e. its source and destination address fields will be
> +respectively set to the endpoint's src address and its parent channel
> +dst addresses.
>
> In case there are no TX buffers available, the function will block until
> 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.
>
> ::
>
> - int rpmsg_sendto(struct rpmsg_channel *rpdev, void *data, int len, u32 dst);
> + int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst);
>
> -sends a message across to the remote processor on a given channel,
> +sends a message across to the remote processor from a given endpoint,
> to a destination address provided by the caller.
>
> -The caller should specify the channel, the data it wants to send,
> +The caller should specify the endpoint, the data it wants to send,
> its length (in bytes), and an explicit destination address.
>
> The message will then be sent to the remote processor to which the
> -channel belongs, using the channel's src address, and the user-provided
> -dst address (thus the channel's dst address will be ignored).
> +endpoints's channel belongs, using the endpoints's src address,
> +and the user-provided dst address (thus the channel's dst address
> +will be ignored).
>
> In case there are no TX buffers available, the function will block until
> 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.
>
> ::
>
> - int rpmsg_send_offchannel(struct rpmsg_channel *rpdev, u32 src, u32 dst,
> + int rpmsg_send_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst,
> void *data, int len);
>
>
> sends a message across to the remote processor, using the src and dst
> addresses provided by the user.
>
> -The caller should specify the channel, the data it wants to send,
> +The caller should specify the endpoint, the data it wants to send,
> its length (in bytes), and explicit source and destination addresses.
> The message will then be sent to the remote processor to which the
> -channel belongs, but the channel's src and dst addresses will be
> -ignored (and the user-provided addresses will be used instead).
> +endpoint's channel belongs, but the endpoint's src and channel dst
> +addresses will be ignored (and the user-provided addresses will
> +be used instead).
>
> In case there are no TX buffers available, the function will block until
> 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.
>
> ::
>
> - int rpmsg_trysend(struct rpmsg_channel *rpdev, void *data, int len);
> + int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len);
>
> -sends a message across to the remote processor on a given channel.
> -The caller should specify the channel, the data it wants to send,
> +sends a message across to the remote processor from a given endpoint.
> +The caller should specify the endpoint, the data it wants to send,
> and its length (in bytes). The message will be sent on the specified
> -channel, i.e. its source and destination address fields will be
> -set to the channel's src and dst addresses.
> +endpoint's channel, i.e. its source and destination address fields will be
> +respectively set to the endpoint's src address and its parent channel
> +dst addresses.
>
> In case there are no TX buffers available, the function will immediately
> return -ENOMEM without waiting until one becomes available.
> @@ -150,10 +154,10 @@ Returns 0 on success and an appropriate error value on failure.
>
> ::
>
> - int rpmsg_trysendto(struct rpmsg_channel *rpdev, void *data, int len, u32 dst)
> + int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst)
>
>
> -sends a message across to the remote processor on a given channel,
> +sends a message across to the remote processor from a given endoint,
> to a destination address provided by the user.
>
> 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.
>
> ::
>
> - int rpmsg_trysend_offchannel(struct rpmsg_channel *rpdev, u32 src, u32 dst,
> + int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst,
> void *data, int len);
>
>
> @@ -284,7 +288,7 @@ content to the console.
> dev_info(&rpdev->dev, "chnl: 0x%x -> 0x%x\n", rpdev->src, rpdev->dst);
>
> /* send a message on our channel */
> - err = rpmsg_send(rpdev, "hello!", 6);
> + err = rpmsg_send(rpdev->ept, "hello!", 6);
> if (err) {
> pr_err("rpmsg_send failed: %d\n", err);
> return err;
> --
> 2.43.0
>
prev parent reply other threads:[~2023-12-08 20:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-03 20:06 [PATCH] doc: rmpsg: update with rpmsg_endpoint Adrien Leravat
2023-12-08 20:33 ` Mathieu Poirier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZXN9mAXUeHopmdiQ@p14s \
--to=mathieu.poirier@linaro.org \
--cc=adrien.leravat@gmail.com \
--cc=andersson@kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).