Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The purpose of this function is to be used along with the notifier mechanism. When a parent clock can see its rate externally changed at any moment, and a driver needs a specific clock rate to function, it can register a notifier on the parent clock, and call clk_set_rate() on the base clock to adjust its frequency according to the new parent clock. This works fine, until the base clock has the CLK_SET_RATE_PARENT flag set. In that case, calling clk_set_rate() on the base clock will call clk_set_rate() on the parent clock, which will trigger the notifier again, and we're in a loop. For that reason, we need to register the notifier on the parent clock of the first ancestor of the base clock that will effectively modify its rate when clk_set_rate() is called, which we can now obtain with clk_get_first_to_set_rate(). Signed-off-by: Paul Cercueil <paul@crapouillou.net>
- Loading branch information