Lines Matching refs:clk_scaling
1080 memcpy(&new_pwr_info, &hba->clk_scaling.saved_pwr_info.info, in ufshcd_scale_gear()
1089 memcpy(&hba->clk_scaling.saved_pwr_info.info, in ufshcd_scale_gear()
1190 clk_scaling.suspend_work); in ufshcd_clk_scaling_suspend_work()
1194 if (hba->clk_scaling.active_reqs || hba->clk_scaling.is_suspended) { in ufshcd_clk_scaling_suspend_work()
1198 hba->clk_scaling.is_suspended = true; in ufshcd_clk_scaling_suspend_work()
1207 clk_scaling.resume_work); in ufshcd_clk_scaling_resume_work()
1211 if (!hba->clk_scaling.is_suspended) { in ufshcd_clk_scaling_resume_work()
1215 hba->clk_scaling.is_suspended = false; in ufshcd_clk_scaling_resume_work()
1241 if (!hba->clk_scaling.active_reqs) in ufshcd_devfreq_target()
1267 queue_work(hba->clk_scaling.workq, in ufshcd_devfreq_target()
1268 &hba->clk_scaling.suspend_work); in ufshcd_devfreq_target()
1278 struct ufs_clk_scaling *scaling = &hba->clk_scaling; in ufshcd_devfreq_get_dev_status()
1373 hba->clk_scaling.window_start_t = 0; in __ufshcd_suspend_clkscaling()
1386 if (!hba->clk_scaling.is_suspended) { in ufshcd_suspend_clkscaling()
1388 hba->clk_scaling.is_suspended = true; in ufshcd_suspend_clkscaling()
1405 if (hba->clk_scaling.is_suspended) { in ufshcd_resume_clkscaling()
1407 hba->clk_scaling.is_suspended = false; in ufshcd_resume_clkscaling()
1420 return snprintf(buf, PAGE_SIZE, "%d\n", hba->clk_scaling.is_allowed); in ufshcd_clkscale_enable_show()
1434 if (value == hba->clk_scaling.is_allowed) in ufshcd_clkscale_enable_store()
1440 cancel_work_sync(&hba->clk_scaling.suspend_work); in ufshcd_clkscale_enable_store()
1441 cancel_work_sync(&hba->clk_scaling.resume_work); in ufshcd_clkscale_enable_store()
1443 hba->clk_scaling.is_allowed = value; in ufshcd_clkscale_enable_store()
1463 hba->clk_scaling.enable_attr.show = ufshcd_clkscale_enable_show; in ufshcd_clkscaling_init_sysfs()
1464 hba->clk_scaling.enable_attr.store = ufshcd_clkscale_enable_store; in ufshcd_clkscaling_init_sysfs()
1465 sysfs_attr_init(&hba->clk_scaling.enable_attr.attr); in ufshcd_clkscaling_init_sysfs()
1466 hba->clk_scaling.enable_attr.attr.name = "clkscale_enable"; in ufshcd_clkscaling_init_sysfs()
1467 hba->clk_scaling.enable_attr.attr.mode = 0644; in ufshcd_clkscaling_init_sysfs()
1468 if (device_create_file(hba->dev, &hba->clk_scaling.enable_attr)) in ufshcd_clkscaling_init_sysfs()
1760 INIT_WORK(&hba->clk_scaling.suspend_work, in ufshcd_init_clk_scaling()
1762 INIT_WORK(&hba->clk_scaling.resume_work, in ufshcd_init_clk_scaling()
1767 hba->clk_scaling.workq = create_singlethread_workqueue(wq_name); in ufshcd_init_clk_scaling()
1777 destroy_workqueue(hba->clk_scaling.workq); in ufshcd_exit_clk_scaling()
1835 if (!hba->clk_scaling.active_reqs++) in ufshcd_clk_scaling_start_busy()
1838 if (!hba->clk_scaling.is_allowed || hba->pm_op_in_progress) in ufshcd_clk_scaling_start_busy()
1842 queue_work(hba->clk_scaling.workq, in ufshcd_clk_scaling_start_busy()
1843 &hba->clk_scaling.resume_work); in ufshcd_clk_scaling_start_busy()
1845 if (!hba->clk_scaling.window_start_t) { in ufshcd_clk_scaling_start_busy()
1846 hba->clk_scaling.window_start_t = jiffies; in ufshcd_clk_scaling_start_busy()
1847 hba->clk_scaling.tot_busy_t = 0; in ufshcd_clk_scaling_start_busy()
1848 hba->clk_scaling.is_busy_started = false; in ufshcd_clk_scaling_start_busy()
1851 if (!hba->clk_scaling.is_busy_started) { in ufshcd_clk_scaling_start_busy()
1852 hba->clk_scaling.busy_start_t = ktime_get(); in ufshcd_clk_scaling_start_busy()
1853 hba->clk_scaling.is_busy_started = true; in ufshcd_clk_scaling_start_busy()
1859 struct ufs_clk_scaling *scaling = &hba->clk_scaling; in ufshcd_clk_scaling_update_busy()
4842 hba->clk_scaling.active_reqs--; in __ufshcd_transfer_req_compl()
6959 memcpy(&hba->clk_scaling.saved_pwr_info.info, in ufshcd_probe_hba()
6962 hba->clk_scaling.saved_pwr_info.is_valid = true; in ufshcd_probe_hba()
6968 hba->clk_scaling.is_allowed = true; in ufshcd_probe_hba()
7772 if (hba->clk_scaling.is_allowed) { in ufshcd_suspend()
7773 cancel_work_sync(&hba->clk_scaling.suspend_work); in ufshcd_suspend()
7774 cancel_work_sync(&hba->clk_scaling.resume_work); in ufshcd_suspend()
7853 if (hba->clk_scaling.is_allowed) in ufshcd_suspend()
7864 if (hba->clk_scaling.is_allowed) in ufshcd_suspend()
7950 if (hba->clk_scaling.is_allowed) in ufshcd_resume()
7969 if (hba->clk_scaling.is_allowed) in ufshcd_resume()
8184 device_remove_file(hba->dev, &hba->clk_scaling.enable_attr); in ufshcd_remove()