File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 10
10
#include <linux/phy/phy.h>
11
11
#include <linux/gpio/consumer.h>
12
12
#include <linux/reset-controller.h>
13
+ #include <linux/devfreq.h>
13
14
14
15
#include "ufshcd.h"
15
16
#include "ufshcd-pltfrm.h"
@@ -1689,6 +1690,29 @@ static void ufs_qcom_device_reset(struct ufs_hba *hba)
1689
1690
usleep_range (10 , 15 );
1690
1691
}
1691
1692
1693
+ #if IS_ENABLED (CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND )
1694
+ static void ufs_qcom_config_scaling_param (struct ufs_hba * hba ,
1695
+ struct devfreq_dev_profile * p ,
1696
+ void * data )
1697
+ {
1698
+ static struct devfreq_simple_ondemand_data * d ;
1699
+
1700
+ if (!data )
1701
+ return ;
1702
+
1703
+ d = (struct devfreq_simple_ondemand_data * )data ;
1704
+ p -> polling_ms = 60 ;
1705
+ d -> upthreshold = 70 ;
1706
+ d -> downdifferential = 5 ;
1707
+ }
1708
+ #else
1709
+ static void ufs_qcom_config_scaling_param (struct ufs_hba * hba ,
1710
+ struct devfreq_dev_profile * p ,
1711
+ void * data )
1712
+ {
1713
+ }
1714
+ #endif
1715
+
1692
1716
/**
1693
1717
* struct ufs_hba_qcom_vops - UFS QCOM specific variant operations
1694
1718
*
@@ -1710,6 +1734,7 @@ static const struct ufs_hba_variant_ops ufs_hba_qcom_vops = {
1710
1734
.resume = ufs_qcom_resume ,
1711
1735
.dbg_register_dump = ufs_qcom_dump_dbg_regs ,
1712
1736
.device_reset = ufs_qcom_device_reset ,
1737
+ .config_scaling_param = ufs_qcom_config_scaling_param ,
1713
1738
};
1714
1739
1715
1740
/**
You can’t perform that action at this time.
0 commit comments