summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs/ufshcd.h
diff options
context:
space:
mode:
authorSahitya Tummala <stummala@codeaurora.org>2016-12-22 18:40:50 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2017-01-05 18:10:03 -0500
commitfcb0c4b08a18fe35c3adc594d3edc8e335ff7960 (patch)
tree9d121a227c0a77473c2654aa686afe37f3ea3846 /drivers/scsi/ufs/ufshcd.h
parentb427411abb3d61c234cb7dd58bc9b9f92c0fd8cb (diff)
scsi: ufs: Add sysfs node to dynamically control clock scaling
Provide an option to enable/disable clock scaling during runtime. Write 1/0 to "clkscale_enable" sysfs node to enable/disable clock scaling. Signed-off-by: Sahitya Tummala <stummala@codeaurora.org> Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> 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.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index 0882ba67ccb1..bdd2284967f2 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -342,6 +342,8 @@ struct ufs_clk_scaling {
bool is_busy_started;
unsigned long tot_busy_t;
unsigned long window_start_t;
+ struct device_attribute enable_attr;
+ bool is_allowed;
};
/**
@@ -580,7 +582,7 @@ static inline bool ufshcd_can_hibern8_during_gating(struct ufs_hba *hba)
{
return hba->caps & UFSHCD_CAP_HIBERN8_WITH_CLK_GATING;
}
-static inline int ufshcd_is_clkscaling_enabled(struct ufs_hba *hba)
+static inline int ufshcd_is_clkscaling_supported(struct ufs_hba *hba)
{
return hba->caps & UFSHCD_CAP_CLK_SCALING;
}