Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5aad101 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "clk: qcom: sm6150: Add dev_pm_ops for scc"

parents 6a6e9b4b e6629c11
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -541,10 +541,26 @@ static const struct of_device_id scc_sm6150_match_table[] = {
};
MODULE_DEVICE_TABLE(of, scc_sm6150_match_table);

static int scc_sa6150_resume(struct device *dev)
{
	struct regmap *regmap = dev_get_drvdata(dev);

	clk_alpha_pll_configure(&scc_pll_out_aux2, regmap,
			scc_pll_out_aux2.config);

	return 0;
}

static const struct dev_pm_ops scc_sa6150_pm_ops = {
	.restore_early = scc_sa6150_resume,
};

static void scc_sm6150_fixup_sa6155(struct platform_device *pdev)
{
	vdd_scc_cx.num_levels = VDD_NUM_SA6155;
	vdd_scc_cx.cur_level = VDD_NUM_SA6155;

	pdev->dev.driver->pm =  &scc_sa6150_pm_ops;
}

static int scc_sm6150_probe(struct platform_device *pdev)
@@ -588,6 +604,9 @@ static int scc_sm6150_probe(struct platform_device *pdev)
		return ret;
	}

	if (is_sa6155)
		dev_set_drvdata(&pdev->dev, regmap);

	dev_info(&pdev->dev, "Registered SCC clocks\n");

	return ret;