clk: qcom: support for dynamic updating the PLL
authorAbhishek Sahu <absahu@codeaurora.org>
Thu, 28 Sep 2017 17:50:45 +0000 (23:20 +0530)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 14 Dec 2017 00:54:08 +0000 (16:54 -0800)
commit472796defebbc5381d6c462adcd0a9a6fc9494e4
treefa724a8735d5321f0f9f97cc65ad98eecc63104d
parentc45ae598fc16aca8ca8778a9b85e41449e8e5182
clk: qcom: support for dynamic updating the PLL

Some of the Alpha PLLs support dynamic update in which the
frequency can be changed dynamically without turning off the PLL.

This dynamic update requires the following sequence:

 1. Write the desired values to L_VAL and ALPHA_VAL registers
 2. Toggle pll_latch_input from low to high
 3. Wait for pll_ack_latch to transition from low to high
    The new L and alpha values have been latched. It may
    take some time for the PLL to fully settle with these
    new values.
 4. Pull pll_latch_input low

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/qcom/clk-alpha-pll.c
drivers/clk/qcom/clk-alpha-pll.h