Skip to content

Commit 548fdf7

Browse files
Nitin Rawatmartinkpetersen
authored andcommitted
scsi: ufs: core: Export ufshcd_is_hba_active()
Export ufshcd_is_hba_active() to allow driver modules to check the state of the host controller. Signed-off-by: Nitin Rawat <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 6cae9a3 commit 548fdf7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,10 +969,11 @@ static inline void ufshcd_hba_start(struct ufs_hba *hba)
969969
*
970970
* Return: true if and only if the controller is active.
971971
*/
972-
static inline bool ufshcd_is_hba_active(struct ufs_hba *hba)
972+
bool ufshcd_is_hba_active(struct ufs_hba *hba)
973973
{
974974
return ufshcd_readl(hba, REG_CONTROLLER_ENABLE) & CONTROLLER_ENABLE;
975975
}
976+
EXPORT_SYMBOL_GPL(ufshcd_is_hba_active);
976977

977978
u32 ufshcd_get_local_unipro_ver(struct ufs_hba *hba)
978979
{

include/ufs/ufshcd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,7 @@ int ufshcd_wb_toggle_buf_flush(struct ufs_hba *hba, bool enable);
13851385
int ufshcd_suspend_prepare(struct device *dev);
13861386
int __ufshcd_suspend_prepare(struct device *dev, bool rpm_ok_for_spm);
13871387
void ufshcd_resume_complete(struct device *dev);
1388+
bool ufshcd_is_hba_active(struct ufs_hba *hba);
13881389

13891390
/* Wrapper functions for safely calling variant operations */
13901391
static inline int ufshcd_vops_init(struct ufs_hba *hba)

0 commit comments

Comments
 (0)