[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220614011639.2825-2-stanley.chu@mediatek.com>
Date: Tue, 14 Jun 2022 09:16:32 +0800
From: Stanley Chu <stanley.chu@...iatek.com>
To: <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<martin.petersen@...cle.com>, <avri.altman@....com>,
<alim.akhtar@...sung.com>, <jejb@...ux.ibm.com>,
<bvanassche@....org>
CC: <peter.wang@...iatek.com>, <chun-hung.wu@...iatek.com>,
<alice.chao@...iatek.com>, <powen.kao@...iatek.com>,
<mason.zhang@...iatek.com>, <qilin.tan@...iatek.com>,
<lin.gui@...iatek.com>, <eddie.huang@...iatek.com>,
<tun-yu.yu@...iatek.com>, <cc.chou@...iatek.com>,
<chaotian.jing@...iatek.com>, <jiajie.hao@...iatek.com>,
<stanley.chu@...iatek.com>
Subject: [PATCH v2 1/8] scsi: ufs: Export ufshcd_uic_change_pwr_mode()
Export ufshcd_uic_change_pwr_mode() to allow vendors to
use it for SoC-specific power mode change design limitation.
Signed-off-by: Stanley Chu <stanley.chu@...iatek.com>
---
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
Powered by blists - more mailing lists