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

Commit 456857a0 authored by Taniya Das's avatar Taniya Das
Browse files

clk: qcom: clk-regmap: Add support for devm_clk_regmap_list_node



There can be cases where the clock providers have multiple regmaps and
directly registers to the clock framework. The clk regmap ops like list
registers/clk rate max would be registered only if the provider is added
to the regmap list node.
Thus expose this API for those providers to add to the list.

Change-Id: I1463c12eeed431d30e96404f2162dd75d202d4b9
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent 28255001
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -286,6 +286,19 @@ int devm_clk_register_regmap(struct device *dev, struct clk_regmap *rclk)
}
EXPORT_SYMBOL_GPL(devm_clk_register_regmap);

/**
 * devm_clk_regmap_list_node - Add a clk-regmap clock list for providers
 *
 * @rclk: clk to operate on
 *
 * Maintain clk-regmap clks list for providers use.
 */
void devm_clk_regmap_list_node(struct device *dev, struct clk_regmap *rclk)
{
	list_add(&rclk->list_node, &clk_regmap_list);
}
EXPORT_SYMBOL(devm_clk_regmap_list_node);

int clk_runtime_get_regmap(struct clk_regmap *rclk)
{
	int ret;
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ int clk_pre_change_regmap(struct clk_hw *hw, unsigned long cur_rate,
int clk_post_change_regmap(struct clk_hw *hw, unsigned long old_rate,
			unsigned long cur_rate);
int devm_clk_register_regmap(struct device *dev, struct clk_regmap *rclk);
void devm_clk_regmap_list_node(struct device *dev, struct clk_regmap *rclk);

bool clk_is_regmap_clk(struct clk_hw *hw);