summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs/ufs.h
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2020-11-03 17:14:02 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-11-05 07:03:28 +0300
commitfe1d4c2ebcae994dffe8673cc3cba10102d15d11 (patch)
tree1c0acec2f96d93c6aa4471d0d6fbd1989115afd7 /drivers/scsi/ufs/ufs.h
parent1f889b58716a5f5e3e4fe0e6742c1a4472f29ac1 (diff)
downloadlinux-fe1d4c2ebcae994dffe8673cc3cba10102d15d11.tar.xz
scsi: ufs: Add DeepSleep feature
DeepSleep is a UFS v3.1 feature that achieves the lowest power consumption of the device, apart from power off. In DeepSleep mode, no commands are accepted, and the only way to exit is using a hardware reset or power cycle. This patch assumes that if a power cycle was an option, then power off would be preferable, so only exit via a hardware reset is supported. Drivers that wish to support DeepSleep need to set a new capability flag UFSHCD_CAP_DEEPSLEEP and provide a hardware reset via the existing ->device_reset() callback. It is assumed that UFS devices with wspecversion >= 0x310 support DeepSleep. [mkp: dropped sysfs ABI doc due to conflicts] Link: https://lore.kernel.org/r/20201103141403.2142-2-adrian.hunter@intel.com Reviewed-by: Bean Huo <beanhuo@micron.com> Reviewed-by: Asutosh Das <asutoshd@codeaurora.org> Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Can Guo <cang@codeaurora.org> Acked-by: Jonathan Corbet <corbet@lwn.net> Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs.h')
-rw-r--r--drivers/scsi/ufs/ufs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index f8ab16f30fdc..d593edb48767 100644
--- a/drivers/scsi/ufs/ufs.h
+++ b/drivers/scsi/ufs/ufs.h
@@ -442,6 +442,7 @@ enum ufs_dev_pwr_mode {
UFS_ACTIVE_PWR_MODE = 1,
UFS_SLEEP_PWR_MODE = 2,
UFS_POWERDOWN_PWR_MODE = 3,
+ UFS_DEEPSLEEP_PWR_MODE = 4,
};
#define UFS_WB_BUF_REMAIN_PERCENT(val) ((val) / 10)