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

Commit 1464460d authored by Diptanshu Jamgade's avatar Diptanshu Jamgade Committed by Gerrit - the friendly Code Review server
Browse files

clk: qcom: clk-alpha: Update round_rate to return minimal rate



Update  clk_alpha_pll_round_rate to return minimum rate depending
on the VCO table's minimum and maximum rate.

Change-Id: I793cf91ae54cf25ecf863d9f019c1f599d70dd3c
Signed-off-by: default avatarDiptanshu Jamgade <djamgade@codeaurora.org>
parent ff722117
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -703,9 +703,7 @@ static long clk_alpha_pll_round_rate(struct clk_hw *hw, unsigned long rate,
		return pll->min_supported_freq;

	rate = alpha_pll_round_rate(pll, rate, *prate, &l, &a);
	if ((pll->type == ALPHA_PLL && alpha_pll_find_vco(pll, rate)) ||
		(pll->type == FABIA_PLL || alpha_pll_find_vco(pll, rate))
		|| pll->type == AGERA_PLL)
	if (!pll->vco_table || alpha_pll_find_vco(pll, rate))
		return rate;

	min_freq = pll->vco_table[0].min_freq;