Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1143324pxb; Thu, 28 Jan 2021 09:00:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyjVqATR77Kzq5dx7q+M6Wby6FLRo1ccp+2fSpNZr00taIymW2yVWjjOVFxl0WrStFLFYjI X-Received: by 2002:a17:906:7798:: with SMTP id s24mr312614ejm.19.1611853225929; Thu, 28 Jan 2021 09:00:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611853225; cv=none; d=google.com; s=arc-20160816; b=YFluqivrREfPS+l45OUcVZs2AI9Bk1ko+EybQ03qWogdAek800YaiFwcS1Sm0RWlbm 6L6GhTajUw99O7+9WqEUU7kw1m0MJkayFHJbfoSz1ITIMIlhFtZM2Xfgmqzd8DyyiFKj EFC3wTFfrWKkhAaduC9+Z9jC4f/XhjQI3rY3eoJXAw15wKb29FuubowVqAWQhMGwIXC3 TGrq/L2fEOEmM7UkrGVaehbESKTBg9iPbC3MgAcepnoF/9ieu3G2G9XK+HV/8FttxJet YLZDGvM/PeB8usCB5QSicnJQ5aW4+3ARcCSOV9O+NHqq4HMR2EwunjgR90DoZEJKhHNR FJyg== 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; bh=AoKKfchrWbTUguChfX3k47OB5F9Qsk4a46KMfwTJMzk=; b=O0qcx3PkB27oa9GGUe7Z+vrwOd3tq0rneixezWJDLOgNLz54bDzkHeTN4KgWwWra1t dbxME8eRFlAfgdDwhg2tU5TSMpr+V0mapeKIkkG7vcsMRZRM8S4bHHYhcRKFAN1yBZ0H l4Z8spuAkBEtosTL1y430es6GCvmEnjSg4iSaFHvBhSaLidM9Sdous6HWqeqSdegGqJW 1fhKulzg8SwwC9CEMBoX1BX8GOopwbH1TlYSK6+bg5ZlR8ckPPzKFBJYNxebHQ5Znc6t dnHi/jyKvcIlYANUouadsQRLKGzOT4BMkwAH69v3EjK46oDdmtCIqJgI42z1ionPUE0Q sVWw== ARC-Authentication-Results: i=1; mx.google.com; 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 z12si3715125edc.117.2021.01.28.08.59.58; Thu, 28 Jan 2021 09:00: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; 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 S231209AbhA1Q5I (ORCPT + 99 others); Thu, 28 Jan 2021 11:57:08 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:62233 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232237AbhA1Q4w (ORCPT ); Thu, 28 Jan 2021 11:56:52 -0500 Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 28 Jan 2021 08:55:33 -0800 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 28 Jan 2021 08:55:31 -0800 X-QCInternal: smtphost Received: from nitirawa-linux.qualcomm.com ([10.206.25.176]) by ironmsg02-blr.qualcomm.com with ESMTP; 28 Jan 2021 22:25:03 +0530 Received: by nitirawa-linux.qualcomm.com (Postfix, from userid 2342877) id A9BA12A73; Thu, 28 Jan 2021 22:25:03 +0530 (IST) From: Nitin Rawat To: asutoshd@codeaurora.org, cang@codeaurora.org, stummala@codeaurora.org, vbadigan@codeaurora.org, alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com Cc: bvanassche@acm.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Nitin Rawat , "Bao D . Nguyen" Subject: [PATCH V1 1/3] scsi: ufs: export api for use in vendor file Date: Thu, 28 Jan 2021 22:24:57 +0530 Message-Id: <1611852899-2171-2-git-send-email-nitirawa@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611852899-2171-1-git-send-email-nitirawa@codeaurora.org> References: <1611852899-2171-1-git-send-email-nitirawa@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Exporting functions ufshcd_set_dev_pwr_mode, ufshcd_disable_vreg and ufshcd_enable_vreg so that vendor drivers can make use of them in setting vendor specific regulator setting in vendor specific file. Signed-off-by: Nitin Rawat Signed-off-by: Bao D. Nguyen Signed-off-by: Veerabhadrarao Badiganti --- drivers/scsi/ufs/ufshcd.c | 9 ++++++--- drivers/scsi/ufs/ufshcd.h | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 9c691e4..000a03a 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -8091,7 +8091,7 @@ static int ufshcd_config_vreg(struct device *dev, return ret; } -static int ufshcd_enable_vreg(struct device *dev, struct ufs_vreg *vreg) +int ufshcd_enable_vreg(struct device *dev, struct ufs_vreg *vreg) { int ret = 0; @@ -8110,8 +8110,9 @@ static int ufshcd_enable_vreg(struct device *dev, struct ufs_vreg *vreg) out: return ret; } +EXPORT_SYMBOL(ufshcd_enable_vreg); -static int ufshcd_disable_vreg(struct device *dev, struct ufs_vreg *vreg) +int ufshcd_disable_vreg(struct device *dev, struct ufs_vreg *vreg) { int ret = 0; @@ -8131,6 +8132,7 @@ static int ufshcd_disable_vreg(struct device *dev, struct ufs_vreg *vreg) out: return ret; } +EXPORT_SYMBOL(ufshcd_disable_vreg); static int ufshcd_setup_vreg(struct ufs_hba *hba, bool on) { @@ -8455,7 +8457,7 @@ ufshcd_send_request_sense(struct ufs_hba *hba, struct scsi_device *sdp) * Returns 0 if requested power mode is set successfully * Returns non-zero if failed to set the requested power mode */ -static int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba, +int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba, enum ufs_dev_pwr_mode pwr_mode) { unsigned char cmd[6] = { START_STOP }; @@ -8513,6 +8515,7 @@ static int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba, hba->host->eh_noresume = 0; return ret; } +EXPORT_SYMBOL(ufshcd_set_dev_pwr_mode); static int ufshcd_link_state_transition(struct ufs_hba *hba, enum uic_link_state req_link_state, diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index ee61f82..1410c95 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -997,6 +997,10 @@ 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_set_dev_pwr_mode(struct ufs_hba *hba, + enum ufs_dev_pwr_mode pwr_mode); +extern int ufshcd_enable_vreg(struct device *dev, struct ufs_vreg *vreg); +extern int ufshcd_disable_vreg(struct device *dev, struct ufs_vreg *vreg); /* UIC command interfaces for DME primitives */ #define DME_LOCAL 0 -- 2.7.4