Message ID | 20250408-clk-cdce6214-v1-1-bd4e7092a91f@pengutronix.de (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | clk: add support for TI CDCE6214 | expand |
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 0565c87656cf5..07ae3652df6c1 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -3937,7 +3937,8 @@ static int __clk_core_init(struct clk_core *core) goto out; } - if (core->ops->set_parent && !core->ops->determine_rate) { + if (!(core->flags & CLK_SET_RATE_NO_REPARENT) && + core->ops->set_parent && !core->ops->determine_rate) { pr_err("%s: %s must implement .set_parent & .determine_rate\n", __func__, core->name); ret = -EINVAL;
With 326cc42f9fdc ("clk: Forbid to register a mux without determine_rate") it became mandatory to provide a determine_rate hook once a set_parent hook is provided. The determine_rate hook is only needed though when the clock reparents to set its rate. Clocks which do not reparent during set_rate do not need a determine_rate hook, so make the hook optional for clocks with the CLK_SET_RATE_NO_REPARENT flag. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- drivers/clk/clk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)