Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp809861pxf; Thu, 1 Apr 2021 14:17:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLnM1V+woUGVH+msLq5c0qbLKx35dZssXi8xtq7zDLsS5x/3t6d+Mk9JhGe6fXSb2GxC3h X-Received: by 2002:a5d:8d12:: with SMTP id p18mr8453745ioj.31.1617311863944; Thu, 01 Apr 2021 14:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617311863; cv=none; d=google.com; s=arc-20160816; b=J1UCAMV96auYCDAU+u/N5IJh4Oss1OXEuLyVSyo7zzz8DIwFV83zuDSHSmJgoo9Nvd RnLOvNRzD3TyY075iiKKVc5PLGzjhK7lWIVh1rfpdSiG+rP41AtBP5KA5hZYFfqymHin wwO1pelwOaf/eVKKEVjCJBtye/3mSCyYg+2vK2BQaAdOkKAhluGVjBnzVWZLnn35x0A5 Bv4I+Pk6ijMBZwxONAVoXVa2zmIi7pCgwVPKIEXeXOlbufG2IqNx806nWple/n+QDwh1 fMhIiEceXQI59B1tioSENbvSbi2R+r1piuGl6M+NG3kT0XhmdAlB4d3+7rYOgWyctYyn eqbg== 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=bSrTASaAjl6GFLySRGQ8IuA+5XxvwjR6NtVXMaVGdmE=; b=0UqfWE+7H0GjjJL92P9UmiTnEEQnYPz0RZbVnRN9ExeO75E5ujEN1DTUG7iGLIillK DQk3FXXsq+635mPekL/a1WTQv6EFhh+parTJ7ltZTsvWNh+hRiiBLDHpZDXTrHvTt/ac y5qXP6RmjAIExVw+3+w2gOdsMwdS/kwYYT8IJZ6LhonWpHmfpEqOPbJjFRmVn8QgnKoB Zrdm7DYOXLxgbUeWIsDYNzTGw1jihc4MuAqmFxNwfIeHuiAfCTZKpohtZeb3CeKrd8S6 cQC3WROBJenmzrY2Wx29tNn6IrstGwFx0G6yIPdRsuiJoWUKCPue+WLHzod2gK7s9ReE ki1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=gCRb3fjG; 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 x9si5823904jan.85.2021.04.01.14.17.26; Thu, 01 Apr 2021 14:17:43 -0700 (PDT) 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=gCRb3fjG; 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 S234791AbhDAVQk (ORCPT + 99 others); Thu, 1 Apr 2021 17:16:40 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:33684 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234649AbhDAVQf (ORCPT ); Thu, 1 Apr 2021 17:16:35 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1617311795; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=bSrTASaAjl6GFLySRGQ8IuA+5XxvwjR6NtVXMaVGdmE=; b=gCRb3fjGJqFNTTCWvN53+JY7Ebjt2JivypSJ7d1QNy2VXLmKx/MB1sFlc6VPzuPBKb39TTBX JqeS2KmV51i54KXPi4ktCQl8PbhqHvkbUV6arlXNyc4H44smqju0MLA2W8+zkGDrxBLnZpa2 LBbjjug8penVP7zglI6kgfRendc= X-Mailgun-Sending-Ip: 198.61.254.9 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-n05.prod.us-east-1.postgun.com with SMTP id 606638308166b7eff7a2d62b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 01 Apr 2021 21:16:32 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 21C79C433ED; Thu, 1 Apr 2021 21:16:32 +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 4A0DCC43462; Thu, 1 Apr 2021 21:16:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4A0DCC43462 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, carl.yin@quectel.com, naveen.kumar@quectel.com, loic.poulain@linaro.org, Bhaumik Bhatt Subject: [PATCH v8 9/9] bus: mhi: Improve documentation on channel transfer setup APIs Date: Thu, 1 Apr 2021 14:16:18 -0700 Message-Id: <1617311778-1254-10-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1617311778-1254-1-git-send-email-bbhatt@codeaurora.org> References: <1617311778-1254-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 Reviewed-by: Manivannan Sadhasivam --- 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 b16afd3..43a66e1 100644 --- a/include/linux/mhi.h +++ b/include/linux/mhi.h @@ -714,13 +714,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