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

Skip to content
Commit 1c1e5cfc authored by Saravana Kannan's avatar Saravana Kannan Committed by Stephen Boyd
Browse files

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: default avatarSaravana Kannan <skannan@codeaurora.org>
parent c61b5def
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment