diff options
author | Stanley Chu <stanley.chu@mediatek.com> | 2019-05-21 14:44:52 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-06-18 19:46:23 -0400 |
commit | ee5f1042b20e1ffbc5c7eb0e0883fdbc05cec85f (patch) | |
tree | 90e056f19fe096a05c206e45b444c9e2ab5a3acb /drivers/scsi/ufs/ufshcd.h | |
parent | a1b6fb947f92352bc8edab901d773306c5b80b8b (diff) | |
download | lwn-ee5f1042b20e1ffbc5c7eb0e0883fdbc05cec85f.tar.gz lwn-ee5f1042b20e1ffbc5c7eb0e0883fdbc05cec85f.zip |
scsi: ufs: Introduce ufshcd_is_auto_hibern8_supported()
The checking of Auto-Hibernation support is used in many places in the
driver, thus re-factor it as ufshcd_is_auto_hibern8_supported() to make
code more clean.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufshcd.h')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index ecfa898b9ccc..994d73d03207 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -740,6 +740,11 @@ return true; #endif } +static inline bool ufshcd_is_auto_hibern8_supported(struct ufs_hba *hba) +{ + return (hba->capabilities & MASK_AUTO_HIBERN8_SUPPORT); +} + #define ufshcd_writel(hba, val, reg) \ writel((val), (hba)->mmio_base + (reg)) #define ufshcd_readl(hba, reg) \ |