Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1590566pxb; Thu, 4 Feb 2021 17:51:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1rRwEMPwRBmQWBPOEagI5hDYchxjbaieZasOCRGCt9XxuvKwa8HWicWwxAQZT9ew4juEF X-Received: by 2002:aa7:d817:: with SMTP id v23mr1316109edq.192.1612489885301; Thu, 04 Feb 2021 17:51:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612489885; cv=none; d=google.com; s=arc-20160816; b=QmqWhC0V9b4coQoUha1BkLDM1RlDl6HOprN/R7CrxaDDaLrnRiAEfVkOxowm+y45Kz 6kEGgV9cOGVUoJZHk42XeMvkTI8zf+hw6dfh7tdqmZnide9pGmqC2Wc3w/5n1O1ZNjBY 77HKPxNI53y4MkwOufPOdmrQp/TrCWya1YEKvizwYGERPBg5HYtW2B/TMX/pQLGWuvPV IeKnnWHjCydY3PYq4df770lbM/jgVFDfhTpEWxXv/m5xMwXvPK/GBEM7o1I6LnUIbvuj zqYl77gREExBwnxSM1/KZoGx/0FfVJLfSlxc1/CaStHrAWSYf2Lzbss3moOZf3KH6YqV t7eg== 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=OJNE6TNqx/WKO5brTEWQuBNl2UxyIZ44lKKNsLoq5TA=; b=SW1pI2iWX/BEoOpgmn7lHH6/D+qvaS5bEzzEvK7J2/yWidl3GmxkonyJX//YIjFZrG R8ucafrPOg+WZRpgw8Pj+AUmU+x5up3VcobtjRUhxEWT4TYh0xeVuwjijrmgqt3B88Ye GCAaVmq/oKqlpJv4r5qgHwEQrdfSRhJHqRq0NEEr3fRvzBEFgIjAZtr2C682fEM/dLAw 2hL8uWH8RRJMhobz0Tl2Qeyj/R7hHbGDe1n5moFmkEdl2SxKGC0gZ2WfMw3go+MAWbaj 4c1fVf78FSvaTYEJGi2T7YTqdD57TmjtcrNFwc48aEU5T+LRzDB37ueYY12d0nT3GjFz S72Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=H+LAPi20; 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 p12si3361231ejb.496.2021.02.04.17.51.01; Thu, 04 Feb 2021 17:51:25 -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=H+LAPi20; 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 S240198AbhBDUgs (ORCPT + 99 others); Thu, 4 Feb 2021 15:36:48 -0500 Received: from so15.mailgun.net ([198.61.254.15]:24468 "EHLO so15.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240139AbhBDU3F (ORCPT ); Thu, 4 Feb 2021 15:29:05 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1612470525; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=OJNE6TNqx/WKO5brTEWQuBNl2UxyIZ44lKKNsLoq5TA=; b=H+LAPi20Ew6DaF5l9TPxvkB5OYGJG2Zas463m/fMhY8ZGBfjUY2dvTs8du+7X9fDWimyIZ8A k0kbK69W1sj+g7c0Na/tPu90I3nGoP8AGV0TDkA65AXZ/HyDpD3AgI/VD7RButRolzFB/OHF fqfG+vwVTbis9ieeT5KyVWWfeNw= X-Mailgun-Sending-Ip: 198.61.254.15 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-n03.prod.us-east-1.postgun.com with SMTP id 601c58e20bb8f50fb92ddd10 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 04 Feb 2021 20:28:18 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 0BC19C43465; Thu, 4 Feb 2021 20:28:18 +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 0612DC433C6; Thu, 4 Feb 2021 20:28:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0612DC433C6 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, linux-kernel@vger.kernel.org, loic.poulain@linaro.org, Bhaumik Bhatt Subject: [PATCH v6 7/8] bus: mhi: Improve documentation on channel transfer setup APIs Date: Thu, 4 Feb 2021 12:28:05 -0800 Message-Id: <1612470486-10440-8-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1612470486-10440-1-git-send-email-bbhatt@codeaurora.org> References: <1612470486-10440-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. Add details on what MHI does when these APIs are used. Signed-off-by: Bhaumik Bhatt Reviewed-by: Hemant Kumar --- 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 d26acc8..56c4c52 100644 --- a/include/linux/mhi.h +++ b/include/linux/mhi.h @@ -712,13 +712,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