Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1445526pxb; Fri, 6 Nov 2020 09:46:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJw31dVu7JY6Q+kxB/SAT/oe78JPV+ay4fIZ3Kj8qUE+5G9XCqHKE1dMCCY7UumQqA+NIwnw X-Received: by 2002:aa7:c2c3:: with SMTP id m3mr3192469edp.361.1604684816910; Fri, 06 Nov 2020 09:46:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604684816; cv=none; d=google.com; s=arc-20160816; b=x1I9qAbPKIvpOspxZgPsr1JsyVFIQdOWiHYdFxfgnbtu4+m11oExCRZJ54br6IrnoL aB/I4rXYr6iZGUbq13yb4udeMfI1BaKJF945Bukk5Gtp8PqVurmEiDvkRVuP3eN+9c8r 2vd9d782WHeF3XOxgEhZlJrRfT55wzgheZ4HjCPq5VsNhn5Pdhh9kdH9d9wWY5NJRwAE 4ybosiIzIc6Xfe8eAMix6TxjbSl+QEMzkpfRrfaLu/ukRAbPAINz28jOy8airjOQfWET JSqoxAjQY2s57W6OUE0FTWnSqordephHRu4REwxX6bL5E/bVJPwxbUMhcuJsCydHRefN UzMQ== 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=cmdYTrPHVdknh1uYsFnqObWrTOBRzDB0z34Hl+734WQ=; b=DjCntcLp8T7DzUksZCQ1Q9k4xfiju+z83GPQdONOKnVFcdNUVf+GrhjU1ci+SLnFG6 mKVRhNfPAzuLI50ISUk9QGBf+U7sNKddM/ccfhTQRy3IPWd89mthUfuyOMPaZMeBkoRs wC+10fE4cB5uo0qkKf3SYhxGMmkanwIiNCNj0N5t4yGzA6aU36CnqjVPaFHfMzvdEclG n+a4z5wFBzEQph4b5DCSsT94sVcrBf356FqJtUW6Yb7+KSBc7CRaXsyJAPnsK5unlbrA 3HzC5V0maC+m9OzoGJWqvOcyklbQjfdIKSItJX+NnrQvJsrMxrI1uNzBtapTeblpPUHw JY/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=ddhYFS3y; 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 pg1si1400083ejb.96.2020.11.06.09.46.34; Fri, 06 Nov 2020 09:46:56 -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=ddhYFS3y; 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 S1727828AbgKFRpD (ORCPT + 99 others); Fri, 6 Nov 2020 12:45:03 -0500 Received: from z5.mailgun.us ([104.130.96.5]:33020 "EHLO z5.mailgun.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727626AbgKFRpA (ORCPT ); Fri, 6 Nov 2020 12:45:00 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1604684700; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=cmdYTrPHVdknh1uYsFnqObWrTOBRzDB0z34Hl+734WQ=; b=ddhYFS3yxf9xa2Ad+4z0NWH5LjzuMeN6e3a+OUuZzDG7iIhEXp7WVgSW/zWGI2Qhh5fO/4ym lw2kBYeKDIOSpRtqVLvqSuyyTaBD58Ut8yE4vWVh5OWYgTGr0udPaAiF+bGo5768LbK59HVz SRSJTJr2VAsbeXUQwf9/wfvxHIk= X-Mailgun-Sending-Ip: 104.130.96.5 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-n07.prod.us-west-2.postgun.com with SMTP id 5fa58b9b7d4f16f92f4b7d8c (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 06 Nov 2020 17:44:59 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 896DFC43382; Fri, 6 Nov 2020 17:44:59 +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 AAE6FC433C8; Fri, 6 Nov 2020 17:44:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AAE6FC433C8 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, Bhaumik Bhatt Subject: [PATCH v2 3/6] bus: mhi: core: Expose mhi_get_exec_env() API for controllers Date: Fri, 6 Nov 2020 09:44:47 -0800 Message-Id: <1604684690-31065-4-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1604684690-31065-1-git-send-email-bbhatt@codeaurora.org> References: <1604684690-31065-1-git-send-email-bbhatt@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The mhi_get_exec_env() APIs can be used by the controller drivers to query the execution environment of the MHI device. Expose it so it can be used in some scenarios to determine behavior of controllers. Signed-off-by: Bhaumik Bhatt --- drivers/bus/mhi/core/internal.h | 1 - drivers/bus/mhi/core/main.c | 1 + include/linux/mhi.h | 6 ++++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/bus/mhi/core/internal.h b/drivers/bus/mhi/core/internal.h index 7989269..124c1b9 100644 --- a/drivers/bus/mhi/core/internal.h +++ b/drivers/bus/mhi/core/internal.h @@ -609,7 +609,6 @@ enum mhi_pm_state __must_check mhi_tryset_pm_state( struct mhi_controller *mhi_cntrl, enum mhi_pm_state state); const char *to_mhi_pm_state_str(enum mhi_pm_state state); -enum mhi_ee_type mhi_get_exec_env(struct mhi_controller *mhi_cntrl); int mhi_queue_state_transition(struct mhi_controller *mhi_cntrl, enum dev_st_transition state); void mhi_pm_st_worker(struct work_struct *work); diff --git a/drivers/bus/mhi/core/main.c b/drivers/bus/mhi/core/main.c index 778897e..7c45657 100644 --- a/drivers/bus/mhi/core/main.c +++ b/drivers/bus/mhi/core/main.c @@ -123,6 +123,7 @@ enum mhi_ee_type mhi_get_exec_env(struct mhi_controller *mhi_cntrl) return (ret) ? MHI_EE_MAX : exec; } +EXPORT_SYMBOL_GPL(mhi_get_exec_env); enum mhi_state mhi_get_mhi_state(struct mhi_controller *mhi_cntrl) { diff --git a/include/linux/mhi.h b/include/linux/mhi.h index d4841e5..9225d55 100644 --- a/include/linux/mhi.h +++ b/include/linux/mhi.h @@ -659,6 +659,12 @@ int mhi_download_rddm_img(struct mhi_controller *mhi_cntrl, bool in_panic); int mhi_force_rddm_mode(struct mhi_controller *mhi_cntrl); /** + * mhi_get_exec_env - Get BHI execution environment of the device + * @mhi_cntrl: MHI controller + */ +enum mhi_ee_type mhi_get_exec_env(struct mhi_controller *mhi_cntrl); + +/** * mhi_get_mhi_state - Get MHI state of the device * @mhi_cntrl: MHI controller */ -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project