Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp605187pxb; Wed, 11 Nov 2020 11:26:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGfnLtU0yJ87OZa08RO97AvABpeqr3F5kZwoJYeXMZBAqzNHLCORVq0E7py67XmXOX0xFk X-Received: by 2002:a17:906:f1d8:: with SMTP id gx24mr26520264ejb.73.1605122781949; Wed, 11 Nov 2020 11:26:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605122781; cv=none; d=google.com; s=arc-20160816; b=bXw1jXb2F65TJPUPgOSeB8ACbWWhpsSHI2gArDwVXCRl+k2NQmKi3hR2tb4hFBXJGU jk67Vf5X3D9uoryoSDPnQ2D6r2hY6GNx6L55fxHLMSgun2s536f8qF6bMOsreIoAyo2Y BXFyF5Xe9BEVbiptFQOXZ4e8NgSAtGurGYHVGMJGdRJk4CFAOpc0lGofOKyHd+kR+I5/ cJyDoSDKnowAztDNSiWrBJS7oMVgdYYKZYQT4FXjmy9h+eLoystN6PcOU9/AhoUe2dp7 /cDsWhEx8lj9aeFtOCN4fH47Z7K+qyI3ETOug1QfTgK+B2oilLGnG7AIPrXK4bLT13Zj 9JDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=veCajDnYzKnYRNGbSNuVCbZM+Fh4NCCtNWMvGjUUsBU=; b=WSw/CNK+80/dR1FxfiP3AXAZLdWZyhUNZDCh3CaswOQxtMdcFIg6KqvNJoMHXbm2U8 KrnI7spGJ8Xsq4h/PgvH45huFhzxQI8OGt9YzyGGBGTKdIUJwSxlnxfOrvF86oWm6VWi 3efXDgqDvEV+cVRjgBDmeTF+j3cx4zlr1wr/fI3z6lDuI4928YEpiNa17/tuHSr25Qa3 kiLEoNyz+loF1kF0pq0nIr5O7mZQeqAivFyHgeP1yLSYEjnUvl4O34Q9MUgpMyX8i4QN gI0l0hDnSA8x0Mhc26h8+JxhhWREXuYzhD1qI1sVncBE6CJw4w4ofnMSXHK6y9IqiEy+ mTBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=A+BlXKIZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o14si2207484edi.218.2020.11.11.11.25.58; Wed, 11 Nov 2020 11:26:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=A+BlXKIZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727717AbgKKTVu (ORCPT + 99 others); Wed, 11 Nov 2020 14:21:50 -0500 Received: from m42-4.mailgun.net ([69.72.42.4]:33184 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727740AbgKKTVa (ORCPT ); Wed, 11 Nov 2020 14:21:30 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1605122490; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=veCajDnYzKnYRNGbSNuVCbZM+Fh4NCCtNWMvGjUUsBU=; b=A+BlXKIZDNU4hXHQ8Z2xiCKe6b1weHlGMct5Mqgn/eFYaicffHHRXF+zoKpTpUzMIjOa9QZW gyr97j/nOrUkzEEs9fKUdo8Fp2dKNloTTNoU1kGMjvJGDFF16EvZZu/g43n8Wss0Fd1Befa+ C1rNvsgYQU5HHwsSXJzuObZcf+I= X-Mailgun-Sending-Ip: 69.72.42.4 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-west-2.postgun.com with SMTP id 5fac39b49a53d19da9a7f3d9 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 11 Nov 2020 19:21:24 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 411DFC433C9; Wed, 11 Nov 2020 19:21:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from malabar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bbhatt) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4FD7FC43382; Wed, 11 Nov 2020 19:21:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4FD7FC43382 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=bbhatt@codeaurora.org From: Bhaumik Bhatt To: manivannan.sadhasivam@linaro.org Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, loic.poulain@linaro.org, kvalo@codeaurora.org, linux-kernel@vger.kernel.org, Bhaumik Bhatt Subject: [PATCH v2 6/6] bus: mhi: Improve documentation on channel transfer setup APIs Date: Wed, 11 Nov 2020 11:21:13 -0800 Message-Id: <1605122473-12179-7-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1605122473-12179-1-git-send-email-bbhatt@codeaurora.org> References: <1605122473-12179-1-git-send-email-bbhatt@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The mhi_prepare_for_transfer() and mhi_unprepare_from_transfer() APIs could use better explanation, especially with the addition of two new APIs to start and stop the transfers on channels. Add better set of information for those APIs to avoid confusion going forward. Signed-off-by: Bhaumik Bhatt --- include/linux/mhi.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/include/linux/mhi.h b/include/linux/mhi.h index aee8494..ee9537f 100644 --- a/include/linux/mhi.h +++ b/include/linux/mhi.h @@ -690,13 +690,27 @@ int mhi_device_get_sync(struct mhi_device *mhi_dev); void mhi_device_put(struct mhi_device *mhi_dev); /** - * mhi_prepare_for_transfer - Setup channel for data transfer + * mhi_prepare_for_transfer - Setup UL and DL channels for data transfer. + * Allocate and initialize the channel context and + * also issue the START channel command to both + * channels. Channels can be started only if both + * host and device execution environments match and + * channels are in a DISABLED state. * @mhi_dev: Device associated with the channels */ int mhi_prepare_for_transfer(struct mhi_device *mhi_dev); /** - * mhi_unprepare_from_transfer - Unprepare the channels + * mhi_unprepare_from_transfer - Reset UL and DL channels for data transfer. + * Issue the RESET channel command and let the + * device clean-up the context so no incoming + * transfers are seen on the host. Free memory + * associated with the context on host. If device + * is unresponsive, only perform a host side + * clean-up. Channels can be reset only if both + * host and device execution environments match + * and channels are in an ENABLED, STOPPED or + * SUSPENDED state. * @mhi_dev: Device associated with the channels */ void mhi_unprepare_from_transfer(struct mhi_device *mhi_dev); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project