Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1146523iog; Wed, 15 Jun 2022 23:07:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tPS2eP8FIS6NyvvKjolASlAnQ2G/KODvg41RP4YzM7jAbKOVs3JbJJ9EdM6apvaimMRF1j X-Received: by 2002:a05:6402:452:b0:434:a373:f9f8 with SMTP id p18-20020a056402045200b00434a373f9f8mr4349456edw.290.1655359657740; Wed, 15 Jun 2022 23:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655359657; cv=none; d=google.com; s=arc-20160816; b=PtGzQ6dgztE3ZS11r9ErTCRwFOAvye9gVSj3Nb6nuQzhM7qltDayx4C9j7F8/fx1EM 9EvUo53yNXCxX2ERJcZT2BhzdUUv4jfIVpwl5ONMwfV9/TI5VdZVPpbYZD71ezfoauLb Ug7rJYdU/X7vCAYJGBL9HfcAczkY/XUPtXgPuJbkpWxApGzKuIrPp0AmsCI6aBOTc/lq jWR2ZWryF98jRYQJxPVohF7pZV6MgK49QP+5Dghamxyz3hwVs18O+rHQGRTY/dISVP/P EJKvThn7bG1e+F/nRW/x/+gvOvOKINbUT4nBxEr8jqdoVDuga3+gRyipx+/oQN1bn5rO 5WZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=3NvvB9KQZmuKtZnQWh3xu+t2KqCoW1s9UARQttGgqr4=; b=UcoTCUlNpMuwNlqIC7QVWF3IcSu84BlePQB2B3tijCMbyKieFBvuIPoHSjRsSr1U2k 279bm5xPDKqAyHJZVlDBdvoJWWs1fk6aQjobOyvG5mh6IN3fs/1DPkM0pZfkCiVZTzOQ uh5vXYspWZQhCHRyzgzRlJbFcKbbFCyrt8BZmZrmMVpnjYAjXB/e3ovC/54OdkiM0oEE sNa7GdbmN8GmEwdvwfBkcWk6eTscd8dx/rlBxRPI66Iy8x/mQ11CfJdhvfcvVbu08nll oaqQ6BZYIbENW7PIZ2H58rDMkcDzApx4CUgdzFU3E6eK3ePnTqWKIegRIW0m2a9x2KjP jQpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a17090699c300b00711f5622a37si920265ejn.242.2022.06.15.23.07.10; Wed, 15 Jun 2022 23:07:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242913AbiFPFiT (ORCPT + 99 others); Thu, 16 Jun 2022 01:38:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358713AbiFPFhn (ORCPT ); Thu, 16 Jun 2022 01:37:43 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10E8357B05; Wed, 15 Jun 2022 22:37:38 -0700 (PDT) X-UUID: 616f2755938b4300ae28e73f226982f1-20220616 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.6,REQID:b428eaec-096f-4346-8ab2-655c129c59a5,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACTI ON:release,TS:0 X-CID-META: VersionHash:b14ad71,CLOUDID:35aeb248-4c92-421c-ad91-b806c0f58b2a,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil ,QS:nil,BEC:nil,COL:0 X-UUID: 616f2755938b4300ae28e73f226982f1-20220616 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1416724095; Thu, 16 Jun 2022 13:37:27 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Thu, 16 Jun 2022 13:37:26 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 16 Jun 2022 13:37:26 +0800 From: Stanley Chu To: , , , , , , CC: , , , , , , , , , , , , Subject: [PATCH v5 01/11] scsi: ufs: Export ufshcd_uic_change_pwr_mode() Date: Thu, 16 Jun 2022 13:37:15 +0800 Message-ID: <20220616053725.5681-2-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220616053725.5681-1-stanley.chu@mediatek.com> References: <20220616053725.5681-1-stanley.chu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Export ufshcd_uic_change_pwr_mode() to allow vendors to use it for SoC-specific power mode change design limitation. Reviewed-by: Bart Van Assche Signed-off-by: Stanley Chu --- drivers/ufs/core/ufshcd.c | 3 ++- include/ufs/ufshcd.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 936a6d5467c9..19e17c898319 100755 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -4091,7 +4091,7 @@ static int ufshcd_uic_pwr_ctrl(struct ufs_hba *hba, struct uic_command *cmd) * * Returns 0 on success, non-zero value on failure */ -static int ufshcd_uic_change_pwr_mode(struct ufs_hba *hba, u8 mode) +int ufshcd_uic_change_pwr_mode(struct ufs_hba *hba, u8 mode) { struct uic_command uic_cmd = {0}; int ret; @@ -4116,6 +4116,7 @@ static int ufshcd_uic_change_pwr_mode(struct ufs_hba *hba, u8 mode) out: return ret; } +EXPORT_SYMBOL_GPL(ufshcd_uic_change_pwr_mode); int ufshcd_link_recovery(struct ufs_hba *hba) { diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h index a92271421718..aa778418703f 100755 --- a/include/ufs/ufshcd.h +++ b/include/ufs/ufshcd.h @@ -1087,6 +1087,7 @@ extern int ufshcd_dme_get_attr(struct ufs_hba *hba, u32 attr_sel, u32 *mib_val, u8 peer); extern int ufshcd_config_pwr_mode(struct ufs_hba *hba, struct ufs_pa_layer_attr *desired_pwr_mode); +extern int ufshcd_uic_change_pwr_mode(struct ufs_hba *hba, u8 mode); /* UIC command interfaces for DME primitives */ #define DME_LOCAL 0 -- 2.18.0