Skip to content

Commit 7311bbf

Browse files
Luo Jieandersson
authored andcommitted
clk: qcom: branch: Add clk_branch2_prepare_ops
Add the clk_branch2_prepare_ops for supporting clock controller where the hardware register is accessed by MDIO bus, and the spin lock can't be used because of sleep during the MDIO operation. The clock is enabled by the .prepare instead of .enable when the clk_branch2_prepare_ops is used. Acked-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Luo Jie <quic_luoj@quicinc.com> Link: https://lore.kernel.org/r/20240605124541.2711467-2-quic_luoj@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 7e828d7 commit 7311bbf

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/clk/qcom/clk-branch.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,10 @@ const struct clk_ops clk_branch_simple_ops = {
191191
.is_enabled = clk_is_enabled_regmap,
192192
};
193193
EXPORT_SYMBOL_GPL(clk_branch_simple_ops);
194+
195+
const struct clk_ops clk_branch2_prepare_ops = {
196+
.prepare = clk_branch2_enable,
197+
.unprepare = clk_branch2_disable,
198+
.is_prepared = clk_is_enabled_regmap,
199+
};
200+
EXPORT_SYMBOL_GPL(clk_branch2_prepare_ops);

drivers/clk/qcom/clk-branch.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ extern const struct clk_ops clk_branch2_ops;
109109
extern const struct clk_ops clk_branch_simple_ops;
110110
extern const struct clk_ops clk_branch2_aon_ops;
111111
extern const struct clk_ops clk_branch2_mem_ops;
112+
extern const struct clk_ops clk_branch2_prepare_ops;
112113

113114
#define to_clk_branch(_hw) \
114115
container_of(to_clk_regmap(_hw), struct clk_branch, clkr)

0 commit comments

Comments
 (0)