Message ID | 20221018-clk-range-checks-fixes-v1-4-f3ef80518140@cerno.tech |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1975910wrs; Tue, 18 Oct 2022 07:03:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5+xUBffnHZSclWz8zWXBDCEoUwBGi82Tfd+RxBrcBtoHpkb83vcB1C0UzRM120AUpH1YMs X-Received: by 2002:aa7:96e6:0:b0:562:6f4e:151 with SMTP id i6-20020aa796e6000000b005626f4e0151mr3393932pfq.35.1666101798058; Tue, 18 Oct 2022 07:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666101798; cv=none; d=google.com; s=arc-20160816; b=BZJbKh8lOKtIVusvWW8WOIgT402lygKBnVZt684YqNDR4vZREBet5VsvG3/bgFiV9w KaDN7T7qJYN+iaroFCFzbrSCAqlODVlZRuEO/OD30Wr58wKBxbG2ykFGe2tN2Q14fZHm J+gdfykjBmjBDMVVMwyBtiMlFRaERr5TNobOy3QBr+EhoDXLUqDDhthB4FUnNJFQ31rI Hg/pEY6vTHlgHAGhk4IcSAZn7FpFCF9mcYffFYUilEY8iF66y3njQG8eHItDVf5+TNJF VPe2QOLpfwFso0PYHWg2U5iXhYLzrvHaYyzIDQjEfeEaXR6kWEX1M+SP2kZ2PqQN/erW HtzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :feedback-id:dkim-signature:dkim-signature; bh=ibUWEHKj/QGYphdrbN1NQxPjpBdpTfdPpbW8Zfp5n24=; b=FnvxJmlVI9PVggnoqwyFIFd4V/IcNM/UyCITIl0yiRSEjW989nK9//r7Kgeqymo7MT Zt86MwhITanTbOlnaG2kbwXLjaVE6d8yD8ESX36dA8rmGhipV/c5Id8ismQA1ZVpl5NT CFy88NAUT7kn1cdaZPS0cNlzL76uEV+7mEcoxAoO5UW9zNKyc+TqPrSL+S7LekHYsrLT OEqBouVAAc3t/w17Qfzo1+4hkGE2wKxoJdvxH+y0UM67IQGAZO4cnJgWVDV2xSAjK7Jh WMaL41Xl861cNjEaSHTkq3eAFdSx/MZHi157KR6CnDpocCZU9FSLOcrd1XXP35PfiQB7 wggQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=qfdt2iuJ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=g1B5U4uP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c6-20020a170902b68600b00174418919a6si14323951pls.513.2022.10.18.07.02.54; Tue, 18 Oct 2022 07:03:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=qfdt2iuJ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=g1B5U4uP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231296AbiJRNxi (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Tue, 18 Oct 2022 09:53:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231283AbiJRNxd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Oct 2022 09:53:33 -0400 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05375CF86D; Tue, 18 Oct 2022 06:53:11 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 78F173200923; Tue, 18 Oct 2022 09:53:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 18 Oct 2022 09:53:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1666101190; x= 1666187590; bh=ibUWEHKj/QGYphdrbN1NQxPjpBdpTfdPpbW8Zfp5n24=; b=q fdt2iuJGXRsapKcoIvKsndV90b43m3LdWkH/T7RkSR37uK3Nf75NrrJTWAPsIWRl QhKGn23g0Z5onkcIaAi2zzoIhQ2nWQuCd9PbfZM3pRM76w/TY+yC9SRtT1jBSpZn 8B1Sv4OUP5A58Rw7C50iU/TARLMoEUElP5n+KpAwSSQuhTdTmpbgKFWWSWsFD/vD EyNmXdZNVridtOg9lGdYTW8J2w6WyOGDY33ZhZeuT/1tziodY5KwmUKB7nTPV+y/ bMEP7Jw7J6IdgwsS/3NsOeKI4VOHQPl/IJ6/hyAvINzNUdd3f0V122q4IuFws5y1 4l6px5eFUT3L2KgJNzwNA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1666101190; x= 1666187590; bh=ibUWEHKj/QGYphdrbN1NQxPjpBdpTfdPpbW8Zfp5n24=; b=g 1B5U4uPMB2vzrOREFU+bd7TP+W4tMKIawGq74S8XCMEPT3rdOQlrxJgKApq3+10D qKJw8MjqMOlba/tCmAXE7pR67YYDkFrcgMV0n7ZlHR1jtQyIkXSafp1ThM3+BtAP pTcsHhwrGmHmjWrV8Bahoc1t8oXGSvg76bE3XwybOqBUg/UKO4c4ZCjWGP/UVU/E MMtZl0cuk3/PbyewIHO5EYA2q+VjV2iyqPLenhwPeCROk5Sj/q3r73FLbVnny39O KIAMozQyWo56b3GXammZP5O18PpqOkRNXwl9cVTzchror5rH6h5Wh5s9TSvMg5NN y0D7yY9RfuO4d6xhNzg6w== X-ME-Sender: <xms:xa9OY61zsfZn6yGktQvMg84rdFC1oyz67_PckVlnyLl2Eu0OgoMgNA> <xme:xa9OY9HK7Whx-zWhNxBhpkgRqWGT3E1jgpezNjrYWCMmGGLctqabIsLfySKknIgWP PVBqVZlmod-1mc0Sv4> X-ME-Received: <xmr:xa9OYy55g3_NdSTeVgb_5AhUMkgbJPz0clSuQqrwjxL9m9Pboy96UDOwVMW7> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeelvddggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtkeertdertdejnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepudduudfhveejteefgedvffdvvedvjedugedukeejhedtlefhffevtefh jeeltdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: <xmx:xq9OY71YJUkDks77RSXRsaKll73g92JsM34S7DlyAL4cPo4csdlvNA> <xmx:xq9OY9FaIKO8wTintDSwollAe9sSqmfgDxAQQAEZ1ARCuO1UvFRaeA> <xmx:xq9OY08N8f3mA_vAPPJixlv7LlB6iLBEzfKBMfOI22JWJDIV_nyTKQ> <xmx:xq9OYxgBsqRgqkJZ2B4HH8eLaimdsLnScQjh06h9Cb_zYN0jDM3aNg> Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Oct 2022 09:53:09 -0400 (EDT) From: Maxime Ripard <maxime@cerno.tech> Date: Tue, 18 Oct 2022 15:52:59 +0200 Subject: [PATCH 4/4] clk: Warn if we register a mux without determine_rate MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20221018-clk-range-checks-fixes-v1-4-f3ef80518140@cerno.tech> References: <20221018-clk-range-checks-fixes-v1-0-f3ef80518140@cerno.tech> In-Reply-To: <20221018-clk-range-checks-fixes-v1-0-f3ef80518140@cerno.tech> To: Stephen Boyd <sboyd@kernel.org>, Michael Turquette <mturquette@baylibre.com> Cc: linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Maxime Ripard <maxime@cerno.tech>, linux-clk@vger.kernel.org X-Mailer: b4 0.11.0-dev-7da52 X-Developer-Signature: v=1; a=openpgp-sha256; l=1775; i=maxime@cerno.tech; h=from:subject:message-id; bh=oxdhfLzGwvzQhDYbvHA+Mn0OUJuj34vZoXZ5WdkABms=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMl+63fu+nej4e7DpG87NtquvJnTrMMx62dzYNLNbXErnauY 2wrvdZSyMIhxMciKKbLECJsviTs163UnG988mDmsTCBDGLg4BWAi6coM/90MRYpaOizO27CvW3v6es tUDa/H0y/p5RuocE679bJngxAjw8lgu7haNeP4yMWLlsUXLdALn5O/vTs66PqqVbcPXPIM5wYA X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747034359111702616?= X-GMAIL-MSGID: =?utf-8?q?1747034359111702616?= |
Series |
clk: Rate range improvements
|
|
Commit Message
Maxime Ripard
Oct. 18, 2022, 1:52 p.m. UTC
The determine_rate hook allows to select the proper parent and its rate
for a given clock configuration. On another hand, set_parent is there to
change the parent of a mux.
Some clocks provide a set_parent hook but don't implement
determine_rate. In such a case, set_parent is pretty much useless since
the clock framework will always assume the current parent is to be used,
and we will thus never change it.
This situation can be solved in two ways:
- either we don't need to change the parent, and we thus shouldn't
implement set_parent;
- or we don't want to change the parent, in this case we should set
CLK_SET_RATE_NO_REPARENT;
- or we're missing a determine_rate implementation.
The latter is probably just an oversight from the driver's author, and
we should thus raise their awareness about the fact that the current
state of the driver is confusing.
It's not clear at this point how many drivers are affected though, so
let's make it a warning instead of an error for now.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
drivers/clk/clk.c | 5 +++++
1 file changed, 5 insertions(+)
Comments
Il 18/10/22 15:52, Maxime Ripard ha scritto: > The determine_rate hook allows to select the proper parent and its rate > for a given clock configuration. On another hand, set_parent is there to > change the parent of a mux. > > Some clocks provide a set_parent hook but don't implement > determine_rate. In such a case, set_parent is pretty much useless since > the clock framework will always assume the current parent is to be used, > and we will thus never change it. > > This situation can be solved in two ways: > - either we don't need to change the parent, and we thus shouldn't > implement set_parent; > - or we don't want to change the parent, in this case we should set > CLK_SET_RATE_NO_REPARENT; > - or we're missing a determine_rate implementation. > > The latter is probably just an oversight from the driver's author, and > we should thus raise their awareness about the fact that the current > state of the driver is confusing. > > It's not clear at this point how many drivers are affected though, so > let's make it a warning instead of an error for now. > > Signed-off-by: Maxime Ripard <maxime@cerno.tech> That solves my concerns :-) :-) Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Quoting Maxime Ripard (2022-10-18 06:52:59) > The determine_rate hook allows to select the proper parent and its rate > for a given clock configuration. On another hand, set_parent is there to > change the parent of a mux. > > Some clocks provide a set_parent hook but don't implement > determine_rate. In such a case, set_parent is pretty much useless since > the clock framework will always assume the current parent is to be used, > and we will thus never change it. > > This situation can be solved in two ways: > - either we don't need to change the parent, and we thus shouldn't > implement set_parent; > - or we don't want to change the parent, in this case we should set > CLK_SET_RATE_NO_REPARENT; > - or we're missing a determine_rate implementation. > > The latter is probably just an oversight from the driver's author, and > we should thus raise their awareness about the fact that the current > state of the driver is confusing. There is another case which is a leaf clk that is a mux where you only expect clk_set_parent() to be used, and not clk_set_rate(). This use case is odd though, so I'm not sure how much we care. > > It's not clear at this point how many drivers are affected though, so > let's make it a warning instead of an error for now. > > Signed-off-by: Maxime Ripard <maxime@cerno.tech> > --- > drivers/clk/clk.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > index 57b83665e5c3..11c41d987ff4 100644 > --- a/drivers/clk/clk.c > +++ b/drivers/clk/clk.c > @@ -3700,6 +3700,11 @@ static int __clk_core_init(struct clk_core *core) > goto out; > } > > + /* TODO: Promote to an error */ The documentation should be updated in this patch (see the table of hardware characteristics in Documentation/driver-api/clk.rst). > + if (core->ops->set_parent && !core->ops->determine_rate) > + pr_warn("%s: %s must implement .set_parent & .determine_rate\n", You can grep for it: $ git grep -W 'struct clk_ops .*=' but I'm fairly certain a coccinelle script can detect most of these because clk_ops are usually statically defined (although not always). Either way I already see that 'owl_comp_div_ops' will trigger this warning. And 'at91sam9x5_smd_ops' looks even more likely. Given that I'm not super keen on applying this patch.
Hi, On Tue, Oct 25, 2022 at 07:07:58PM -0700, Stephen Boyd wrote: > Quoting Maxime Ripard (2022-10-18 06:52:59) > > The determine_rate hook allows to select the proper parent and its rate > > for a given clock configuration. On another hand, set_parent is there to > > change the parent of a mux. > > > > Some clocks provide a set_parent hook but don't implement > > determine_rate. In such a case, set_parent is pretty much useless since > > the clock framework will always assume the current parent is to be used, > > and we will thus never change it. > > > > This situation can be solved in two ways: > > - either we don't need to change the parent, and we thus shouldn't > > implement set_parent; > > - or we don't want to change the parent, in this case we should set > > CLK_SET_RATE_NO_REPARENT; > > - or we're missing a determine_rate implementation. > > > > The latter is probably just an oversight from the driver's author, and > > we should thus raise their awareness about the fact that the current > > state of the driver is confusing. > > There is another case which is a leaf clk that is a mux where you only > expect clk_set_parent() to be used, and not clk_set_rate(). This use > case is odd though, so I'm not sure how much we care. > > > > > It's not clear at this point how many drivers are affected though, so > > let's make it a warning instead of an error for now. > > > > Signed-off-by: Maxime Ripard <maxime@cerno.tech> > > --- > > drivers/clk/clk.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > > index 57b83665e5c3..11c41d987ff4 100644 > > --- a/drivers/clk/clk.c > > +++ b/drivers/clk/clk.c > > @@ -3700,6 +3700,11 @@ static int __clk_core_init(struct clk_core *core) > > goto out; > > } > > > > + /* TODO: Promote to an error */ > > The documentation should be updated in this patch (see the table of > hardware characteristics in Documentation/driver-api/clk.rst). > > > + if (core->ops->set_parent && !core->ops->determine_rate) > > + pr_warn("%s: %s must implement .set_parent & .determine_rate\n", > > You can grep for it: > > $ git grep -W 'struct clk_ops .*=' TIL about -W. It's awesome, thanks > but I'm fairly certain a coccinelle script can detect most of these > because clk_ops are usually statically defined (although not always). > > Either way I already see that 'owl_comp_div_ops' will trigger this > warning. And 'at91sam9x5_smd_ops' looks even more likely. Given that I'm > not super keen on applying this patch. It's the reason why I didn't return an error at first, I wanted to report that it's invalid and let to drivers the chance to be fixed still. Should I take your above comment as you'd rather have the affected drivers fixed in this patch and we then return an error, or is it that you don't want that patch at all? Maxime
Quoting maxime@cerno.tech (2022-10-26 06:52:15) > On Tue, Oct 25, 2022 at 07:07:58PM -0700, Stephen Boyd wrote: > > > > You can grep for it: > > > > $ git grep -W 'struct clk_ops .*=' > > TIL about -W. It's awesome, thanks :) > > > but I'm fairly certain a coccinelle script can detect most of these > > because clk_ops are usually statically defined (although not always). > > > > Either way I already see that 'owl_comp_div_ops' will trigger this > > warning. And 'at91sam9x5_smd_ops' looks even more likely. Given that I'm > > not super keen on applying this patch. > > It's the reason why I didn't return an error at first, I wanted to > report that it's invalid and let to drivers the chance to be fixed > still. > > Should I take your above comment as you'd rather have the affected > drivers fixed in this patch and we then return an error, or is it that > you don't want that patch at all? You can try fixing all the drivers that are failing to meet this requirement (found with grep) and if they are fixed we can start printing the warning. That seems to be the practical approach to getting this patch accepted. The TODO irks me to be honest. I'd rather we fix everything and make it an error and be done with it.
Going back to this mail. On Tue, Oct 25, 2022 at 07:07:58PM -0700, Stephen Boyd wrote: > Quoting Maxime Ripard (2022-10-18 06:52:59) > > The determine_rate hook allows to select the proper parent and its rate > > for a given clock configuration. On another hand, set_parent is there to > > change the parent of a mux. > > > > Some clocks provide a set_parent hook but don't implement > > determine_rate. In such a case, set_parent is pretty much useless since > > the clock framework will always assume the current parent is to be used, > > and we will thus never change it. > > > > This situation can be solved in two ways: > > - either we don't need to change the parent, and we thus shouldn't > > implement set_parent; > > - or we don't want to change the parent, in this case we should set > > CLK_SET_RATE_NO_REPARENT; > > - or we're missing a determine_rate implementation. > > > > The latter is probably just an oversight from the driver's author, and > > we should thus raise their awareness about the fact that the current > > state of the driver is confusing. > > There is another case which is a leaf clk that is a mux where you only > expect clk_set_parent() to be used, and not clk_set_rate(). This use > case is odd though, so I'm not sure how much we care. It looks like there's a good number of clocks that do indeed only provide get_parent / set_parent. It's hard to tell if it's an oversight or a choice. I think we can make that decision explicit by providing a determine_rate helper that always returns the current parent and its rate. It shouldn't change anything from a CCF behavior point of view, and it makes it clear what the behavior is. And if someone wants something else, then they can change it to whatever they want. Maxime
On Thu, Oct 27, 2022 at 02:45:07PM -0700, Stephen Boyd wrote: > Quoting maxime@cerno.tech (2022-10-26 06:52:15) > > On Tue, Oct 25, 2022 at 07:07:58PM -0700, Stephen Boyd wrote: > > > but I'm fairly certain a coccinelle script can detect most of these > > > because clk_ops are usually statically defined (although not always). > > > > > > Either way I already see that 'owl_comp_div_ops' will trigger this > > > warning. And 'at91sam9x5_smd_ops' looks even more likely. Given that I'm > > > not super keen on applying this patch. > > > > It's the reason why I didn't return an error at first, I wanted to > > report that it's invalid and let to drivers the chance to be fixed > > still. > > > > Should I take your above comment as you'd rather have the affected > > drivers fixed in this patch and we then return an error, or is it that > > you don't want that patch at all? > > You can try fixing all the drivers that are failing to meet this > requirement (found with grep) and if they are fixed we can start > printing the warning. That seems to be the practical approach to > getting this patch accepted. The TODO irks me to be honest. I'd rather > we fix everything and make it an error and be done with it. ACK. I had a look this morning and there's indeed a good number of clocks in that case. I'll work on it. Maxime
Quoting Maxime Ripard (2022-11-03 05:33:28) > On Tue, Oct 25, 2022 at 07:07:58PM -0700, Stephen Boyd wrote: > > There is another case which is a leaf clk that is a mux where you only > > expect clk_set_parent() to be used, and not clk_set_rate(). This use > > case is odd though, so I'm not sure how much we care. > > It looks like there's a good number of clocks that do indeed only > provide get_parent / set_parent. It's hard to tell if it's an oversight > or a choice. > > I think we can make that decision explicit by providing a determine_rate > helper that always returns the current parent and its rate. It shouldn't > change anything from a CCF behavior point of view, and it makes it clear > what the behavior is. And if someone wants something else, then they can > change it to whatever they want. Ok sounds like a plan.
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 57b83665e5c3..11c41d987ff4 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -3700,6 +3700,11 @@ static int __clk_core_init(struct clk_core *core) goto out; } + /* TODO: Promote to an error */ + if (core->ops->set_parent && !core->ops->determine_rate) + pr_warn("%s: %s must implement .set_parent & .determine_rate\n", + __func__, core->name); + if (core->num_parents > 1 && !core->ops->get_parent) { pr_err("%s: %s must implement .get_parent as it has multi parents\n", __func__, core->name);