Lines Matching refs:scale_up
260 static int ufshcd_scale_clks(struct ufs_hba *hba, bool scale_up);
982 static int ufshcd_set_clk_freq(struct ufs_hba *hba, bool scale_up) in ufshcd_set_clk_freq() argument
993 if (scale_up && clki->max_freq) { in ufshcd_set_clk_freq()
1011 } else if (!scale_up && clki->min_freq) { in ufshcd_set_clk_freq()
1045 static int ufshcd_scale_clks(struct ufs_hba *hba, bool scale_up) in ufshcd_scale_clks() argument
1050 ret = ufshcd_vops_clk_scale_notify(hba, scale_up, PRE_CHANGE); in ufshcd_scale_clks()
1054 ret = ufshcd_set_clk_freq(hba, scale_up); in ufshcd_scale_clks()
1058 ret = ufshcd_vops_clk_scale_notify(hba, scale_up, POST_CHANGE); in ufshcd_scale_clks()
1060 ufshcd_set_clk_freq(hba, !scale_up); in ufshcd_scale_clks()
1064 (scale_up ? "up" : "down"), in ufshcd_scale_clks()
1077 bool scale_up) in ufshcd_is_devfreq_scaling_required() argument
1087 if (scale_up && clki->max_freq) { in ufshcd_is_devfreq_scaling_required()
1091 } else if (!scale_up && clki->min_freq) { in ufshcd_is_devfreq_scaling_required()
1189 static int ufshcd_scale_gear(struct ufs_hba *hba, bool scale_up) in ufshcd_scale_gear() argument
1194 if (scale_up) { in ufshcd_scale_gear()
1253 static void ufshcd_clock_scaling_unprepare(struct ufs_hba *hba, int err, bool scale_up) in ufshcd_clock_scaling_unprepare() argument
1259 ufshcd_wb_toggle(hba, scale_up); in ufshcd_clock_scaling_unprepare()
1276 static int ufshcd_devfreq_scale(struct ufs_hba *hba, bool scale_up) in ufshcd_devfreq_scale() argument
1285 if (!scale_up) { in ufshcd_devfreq_scale()
1291 ret = ufshcd_scale_clks(hba, scale_up); in ufshcd_devfreq_scale()
1293 if (!scale_up) in ufshcd_devfreq_scale()
1299 if (scale_up) { in ufshcd_devfreq_scale()
1308 ufshcd_clock_scaling_unprepare(hba, ret, scale_up); in ufshcd_devfreq_scale()
1352 bool scale_up, sched_clk_scaling_suspend_work = false; in ufshcd_devfreq_target() local
1378 scale_up = *freq == clki->max_freq; in ufshcd_devfreq_target()
1379 if (!scale_up) in ufshcd_devfreq_target()
1382 if (!ufshcd_is_devfreq_scaling_required(hba, scale_up)) { in ufshcd_devfreq_target()
1390 ret = ufshcd_devfreq_scale(hba, scale_up); in ufshcd_devfreq_target()
1393 (scale_up ? "up" : "down"), in ufshcd_devfreq_target()