msm: clock: Add helper functions to use when changing clock parent
Any clock op (such as set_rate and set_parent) that changes the parent of a
clock needs to transfer the prepare and enable requirements of the clock
from the old parent to the new parent. Provide a generic pair of APIs,
__clk_pre_reparent() and __clk_post_reparent(), that take care of this.
The pair of APIs require the prepare lock to be held the entire duration
between and including the calls to the two APIs. Since __clk_pre_reparent
grabs a spin lock and __clk_post_reparent releases the spin lock, only
atomic operations can be performed between calls to the two APIs.
Change-Id: I1dc3905655652b2c58841f0b4e65ea6d2ab5020e
Signed-off-by:
Saravana Kannan <skannan@codeaurora.org>
Loading
Please register or sign in to comment