Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2481158rdb; Sun, 3 Dec 2023 20:06:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQfyLba84ROyO5cpV/9ZyG9fvd9/gNTZfHuK7BnuquItPRN/IfJVJqyAqF8INUXJuXPfuY X-Received: by 2002:a05:6a20:13c5:b0:18f:97c:4f5c with SMTP id ho5-20020a056a2013c500b0018f097c4f5cmr980826pzc.104.1701662788615; Sun, 03 Dec 2023 20:06:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701662788; cv=none; d=google.com; s=arc-20160816; b=Dgq8vv85QQ2wSHSCrAA1OUkQcgMrnh6YmUCOWAs+vmb+nnfADFtWDS1ZzdKCitRYWt oY/NRiSbIOZo+fUVScIjssJfQ0IS5dIXWY0IO2qkc8jxxTmf578xVHRlvRgeWsuXLFBy 19RedLlqCo14ThdBfW96cnZPevz1tunzmEQiO7+kzJHYq/DhjOFIwALroEDZGS+kVk9W +uZFnsAQYoQItXLQhAszwnM5x0q5l0hTiHmdyTULNZVjVKSOCQyUBHkWoV28sQwvbaxi bunAgMBS6ZwGWxreTRnkInEklItiPjWTMjC1zFjv73PKAZdi45oMjhrRCtiS3B+35sF5 cL/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CbkCHx96etqSfTuELzIWMZk408/Yxj+/7Dk7WZ5k3MY=; fh=ELpXPFm1zemMOcOYFAbN6s5vZjCjKmjIDanWNFhPi9M=; b=O2uFJrgjEdGYK0V0aH9G5uDmS5Iq/2deZ6/RSzPOxePL4LULIaqw4BxzExlmmyLrmv 9K3K931iVLnfRhHMBgMxib5xZl0Btz7pElbRtcUzKIAycnps16ZGtmZ1bqjUQEblMwZJ 5UEmsu5YlztQz5eGrA+a4JQIGD4z/d3japARnClj60dmFarq7sjfWiGrzgn/PGYJFSCW UAK/phTzIZ7K0pi1z/dJF/Wc6rUqLKVFskZuUAae2CurVAsZNlRIQixoTNz6u4GI7HVA q+JUvGixkrSOdpn9yUIW7c2N4nSK6rYy7GFrVWwrBtFx5+VXG1mPDZHtSbxFHod8CrRn 16zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DFK0G+Iz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id jm1-20020a17090304c100b001d07d6916fesi2505102plb.88.2023.12.03.20.06.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 20:06:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DFK0G+Iz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BB2D4807F66A; Sun, 3 Dec 2023 20:06:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234378AbjLDEGK (ORCPT + 99 others); Sun, 3 Dec 2023 23:06:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjLDEGI (ORCPT ); Sun, 3 Dec 2023 23:06:08 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F0BFF3; Sun, 3 Dec 2023 20:06:14 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1d05199f34dso13412425ad.3; Sun, 03 Dec 2023 20:06:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701662774; x=1702267574; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CbkCHx96etqSfTuELzIWMZk408/Yxj+/7Dk7WZ5k3MY=; b=DFK0G+Iz2ZSBFS+IA3UStPS36CkBwmzEvgWn98Or7aGFot08MBdQiFfayTm8SJwdb+ 91aCmLAOYUYVuypEL49SApdGSY9vsb2ieKuitb9no+biiwKlzy1/g0RKSSHciSgcVGGp Ti7PPOHEFZQ2dMTPthPP64+WjDCSMw+FiSHUCI4qAo2joA0R3LOmYXXeUG0ObGxfj+3S nr6hWlQvJCajRg/qNGZBOxLQSkY1lHLaXojlQOSaSIqyDu5GS5kj5QB0JG6sWA4JwuSR Ea9fA2uWx4uKmrOf/YiNxCJa+g08gMT9Yq6+d+3Tv5f2lOryhNmlHPYCCTzyAfb8Ya6q AuTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701662774; x=1702267574; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CbkCHx96etqSfTuELzIWMZk408/Yxj+/7Dk7WZ5k3MY=; b=Yp/25NkZ7rEBESoXS8ZEPXZ+TPLIvXeu9Df2gGUdNwSoT4acStzw/vonYM+oAPvVLn 03DzioaaHwo3ZCLOCHk1wJD5+TCJ4ekU9yABs2sGMGj95eDYbxNKH7MNmTwM4klAi7hm 58ucUm39HwfRha8KlWkL6fCNWYvwKFAKG2+GiHVanr0fwqMFMGwP6qK2gSYax9geifRZ W204NpX/cKdVGmIRncZx31CcfclQZ4cjkHeOMkEM6/XPiOphQo42araPoiSE0kUUqfiP p4P7Z7aciX6dVaQKGgzp7RrGmLv1SotuDQCKyioNsbnv4fpLF1rGEU/mOgPBAGPIfz8T NuJw== X-Gm-Message-State: AOJu0YxdMZKQIGLkeJRppq4Wsk/7clF7emvRRC/IMBq5Z5Oy6zV/uUpr 50uDtnUJ2Cmqcfb2jYoO5qM= X-Received: by 2002:a17:902:ced2:b0:1d0:6ffd:6e68 with SMTP id d18-20020a170902ced200b001d06ffd6e68mr1451983plg.96.1701662773729; Sun, 03 Dec 2023 20:06:13 -0800 (PST) Received: from localhost.localdomain (c-73-254-2-55.hsd1.wa.comcast.net. [73.254.2.55]) by smtp.gmail.com with ESMTPSA id f13-20020a170902ce8d00b001d08f173f00sm1736084plg.194.2023.12.03.20.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 20:06:13 -0800 (PST) From: Adrien Leravat To: andersson@kernel.org, mathieu.poirier@linaro.org, corbet@lwn.net Cc: Adrien Leravat , linux-remoteproc@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] doc: rmpsg: update with rpmsg_endpoint Date: Sun, 3 Dec 2023 12:06:04 -0800 Message-ID: <20231203200606.255302-1-adrien.leravat@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.5 required=5.0 tests=DATE_IN_PAST_06_12,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sun, 03 Dec 2023 20:06:25 -0800 (PST) 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 --- Documentation/staging/rpmsg.rst | 50 ++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 23 deletions(-) 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