Loading drivers/scsi/ufs/ufshcd.c +8 −1 Original line number Diff line number Diff line Loading @@ -1344,7 +1344,8 @@ start: hba->clk_gating.state = REQ_CLKS_ON; trace_ufshcd_clk_gating(dev_name(hba->dev), hba->clk_gating.state); schedule_work(&hba->clk_gating.ungate_work); queue_work(hba->clk_gating.ungating_workq, &hba->clk_gating.ungate_work); /* * fall through to check if we should wait for this * work to be done or not. Loading Loading @@ -1617,6 +1618,7 @@ static enum hrtimer_restart ufshcd_clkgate_hrtimer_handler( static void ufshcd_init_clk_gating(struct ufs_hba *hba) { struct ufs_clk_gating *gating = &hba->clk_gating; char wq_name[sizeof("ufs_clk_ungating_00")]; hba->clk_gating.state = CLKS_ON; Loading Loading @@ -1645,6 +1647,10 @@ static void ufshcd_init_clk_gating(struct ufs_hba *hba) hrtimer_init(&gating->gate_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); gating->gate_hrtimer.function = ufshcd_clkgate_hrtimer_handler; snprintf(wq_name, ARRAY_SIZE(wq_name), "ufs_clk_ungating_%d", hba->host->host_no); hba->clk_gating.ungating_workq = create_singlethread_workqueue(wq_name); gating->is_enabled = true; gating->delay_ms_pwr_save = UFSHCD_CLK_GATING_DELAY_MS_PWR_SAVE; Loading Loading @@ -1707,6 +1713,7 @@ static void ufshcd_exit_clk_gating(struct ufs_hba *hba) device_remove_file(hba->dev, &hba->clk_gating.enable_attr); ufshcd_cancel_gate_work(hba); cancel_work_sync(&hba->clk_gating.ungate_work); destroy_workqueue(hba->clk_gating.ungating_workq); } static void ufshcd_set_auto_hibern8_timer(struct ufs_hba *hba, u32 delay) Loading drivers/scsi/ufs/ufshcd.h +1 −0 Original line number Diff line number Diff line Loading @@ -431,6 +431,7 @@ struct ufs_clk_gating { struct device_attribute enable_attr; bool is_enabled; int active_reqs; struct workqueue_struct *ungating_workq; }; /* Hibern8 state */ Loading Loading
drivers/scsi/ufs/ufshcd.c +8 −1 Original line number Diff line number Diff line Loading @@ -1344,7 +1344,8 @@ start: hba->clk_gating.state = REQ_CLKS_ON; trace_ufshcd_clk_gating(dev_name(hba->dev), hba->clk_gating.state); schedule_work(&hba->clk_gating.ungate_work); queue_work(hba->clk_gating.ungating_workq, &hba->clk_gating.ungate_work); /* * fall through to check if we should wait for this * work to be done or not. Loading Loading @@ -1617,6 +1618,7 @@ static enum hrtimer_restart ufshcd_clkgate_hrtimer_handler( static void ufshcd_init_clk_gating(struct ufs_hba *hba) { struct ufs_clk_gating *gating = &hba->clk_gating; char wq_name[sizeof("ufs_clk_ungating_00")]; hba->clk_gating.state = CLKS_ON; Loading Loading @@ -1645,6 +1647,10 @@ static void ufshcd_init_clk_gating(struct ufs_hba *hba) hrtimer_init(&gating->gate_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); gating->gate_hrtimer.function = ufshcd_clkgate_hrtimer_handler; snprintf(wq_name, ARRAY_SIZE(wq_name), "ufs_clk_ungating_%d", hba->host->host_no); hba->clk_gating.ungating_workq = create_singlethread_workqueue(wq_name); gating->is_enabled = true; gating->delay_ms_pwr_save = UFSHCD_CLK_GATING_DELAY_MS_PWR_SAVE; Loading Loading @@ -1707,6 +1713,7 @@ static void ufshcd_exit_clk_gating(struct ufs_hba *hba) device_remove_file(hba->dev, &hba->clk_gating.enable_attr); ufshcd_cancel_gate_work(hba); cancel_work_sync(&hba->clk_gating.ungate_work); destroy_workqueue(hba->clk_gating.ungating_workq); } static void ufshcd_set_auto_hibern8_timer(struct ufs_hba *hba, u32 delay) Loading
drivers/scsi/ufs/ufshcd.h +1 −0 Original line number Diff line number Diff line Loading @@ -431,6 +431,7 @@ struct ufs_clk_gating { struct device_attribute enable_attr; bool is_enabled; int active_reqs; struct workqueue_struct *ungating_workq; }; /* Hibern8 state */ Loading