diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-12-20 06:51:25 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-12-20 06:51:25 -0800 |
| commit | 323f28a620f43dd6887c059effe0f0b6b61419cd (patch) | |
| tree | b913d3577521adecf31f8cd7383bf6e203baef3c | |
| parent | d67787b7c6a3edf348ea61b10a5031e42d3abfed (diff) | |
| parent | 56ebcfcaca063f8cedf59a6e053fe687d419bae0 (diff) | |
Merge "clk: msm: mmss: Add dev_pm_ops for MMSS PLL for 8996"
| -rw-r--r-- | drivers/clk/msm/clock-mmss-8996.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/clk/msm/clock-mmss-8996.c b/drivers/clk/msm/clock-mmss-8996.c index 30169d3f3a98..339ae1622005 100644 --- a/drivers/clk/msm/clock-mmss-8996.c +++ b/drivers/clk/msm/clock-mmss-8996.c @@ -3648,6 +3648,21 @@ void __iomem *gpu_base; u64 efuse; int gpu_speed_bin; +static int mmss_pll_suspend(struct device *dev) +{ + return 0; +} + +static int mmss_pll_resume(struct device *dev) +{ +#ifdef CONFIG_HIBERNATION + mmpll9.c.ops->set_rate(&mmpll9.c, 1248000000); + mmpll8.c.ops->set_rate(&mmpll8.c, 510000); + mmpll2.c.ops->set_rate(&mmpll2.c, 510000); +#endif + return 0; +} + int msm_mmsscc_8996_probe(struct platform_device *pdev) { struct resource *res; @@ -3810,11 +3825,19 @@ static struct of_device_id msm_clock_mmss_match_table[] = { {}, }; +static const struct dev_pm_ops msm_clock_mmss_pm_ops = { + .freeze_late = mmss_pll_suspend, + .thaw_early = mmss_pll_resume, + .poweroff_late = mmss_pll_suspend, + .restore_early = mmss_pll_resume, +}; + static struct platform_driver msm_clock_mmss_driver = { .probe = msm_mmsscc_8996_probe, .driver = { .name = "qcom,mmsscc-8996", .of_match_table = msm_clock_mmss_match_table, + .pm = &msm_clock_mmss_pm_ops, .owner = THIS_MODULE, }, }; |
