Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1557894rwb; Mon, 7 Nov 2022 03:07:20 -0800 (PST) X-Google-Smtp-Source: AMsMyM7HKNB69Dy2zVtynU2771COUDUsgevLxJQqUqN4wCCi4xvlMIGPz32xBEYyISFW+GS1bqgM X-Received: by 2002:a17:903:244e:b0:186:c41e:ce9e with SMTP id l14-20020a170903244e00b00186c41ece9emr51326164pls.100.1667819240224; Mon, 07 Nov 2022 03:07:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667819240; cv=none; d=google.com; s=arc-20160816; b=qEb5naxxrRKfGK/menpAJk5B93IM1Zl5kI7Cd+we1G5QrbWLv4E2OOyHDLQ5t48MGW WON+2Y0ETK3eHcmvubUsp40dtDJbL9tXv45v5MoOyIu6GGLVGpYAOchmPxOD7syse0EB i/3nzSCeJ3fpsjyiqBPPeP9nVqTsA44yryczB35nSarKacGyJBKLlSgiRQl6twhyT0fi U84vlGy7ZvS7+ZzBQP0iXQmocmffKiHPn15orAlxrE6Nd4MvctPEG+FxU1R02SQ24bDY qaxSTS+T7kImyoxZ8Bhwn2XvdjFNtWtd64xAjQ8heba+Vy8smenTf9biDi4VoKf1h0Ae Aefw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=MTDWpx1hsSGPKEDqYGlpVHQIbEswPJLgPoSW4FILuto=; b=Pmvzn4QPK9i+2WVC9z8bk67eEoSGupjAmbLrrVWxEsSvBwZYSmW+SYH4JjG9CB700B rVLpUdg6SZF3l+qFZfZlNwqfv7Ol3zNG6G2eqYJ5pj4i+v1HWasuD/nxGh+UfUGKd48p NqgupYldnXVgZIlSW75n9v01ApAd2fWtGjJrc1Q/iW8+pIgL23g21mz78Yqv19MW2gKn kMnXXHH2kaRo79yXEaXliolnHRUtlaP1ogVytNkBC7jzvY3oTyXi+C7EVp0EnfGXd/7+ 9b2TqIDoHXATMWt2EHsz92LJYl7xUogym0QCmULM/Eq0DyaCC5DEYL+bsOwqdzSyzz1T yqaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=i917JrNj; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j9-20020a056a00174900b0056bcbc51d79si11133729pfc.169.2022.11.07.03.07.08; Mon, 07 Nov 2022 03:07:20 -0800 (PST) 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=@cirrus.com header.s=PODMain02222019 header.b=i917JrNj; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231297AbiKGK5g (ORCPT + 94 others); Mon, 7 Nov 2022 05:57:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231922AbiKGK5J (ORCPT ); Mon, 7 Nov 2022 05:57:09 -0500 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 089C0193D2; Mon, 7 Nov 2022 02:57:08 -0800 (PST) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2A75Ku16012177; Mon, 7 Nov 2022 04:56:54 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=MTDWpx1hsSGPKEDqYGlpVHQIbEswPJLgPoSW4FILuto=; b=i917JrNjkH3z3a2XXOdwc3doHM6OAxz7LbDVUIm7C+E3Cwrb58ZxQpsKKdqXGk5Z9z+/ hzIdNQ85JqsCyNGRwGzs83o+jomuHbPhAuHnJILygojPwEG6jpejkauG5tvHq+6Mjx1T 10Yn1n9hWdF7kaZM8JMcssci6VZmHmvumMtu+EtvU3lJyidhtFDMwmr56awM5w5p+0ch stqQ4q3mYnrkiSj6po7T4la5GvjwlpX4RBmjPsI7iQ7y3uUL/hIt6CTV9TTf6ttWh4IS JztSITFuL9+F5l7b8BFUGCyo8869zZsKrryWoIr9+DG4ZaxCTT2UTGw8JJDMLIjOfV8b vg== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3knm8pa27e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Nov 2022 04:56:54 -0600 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.15; Mon, 7 Nov 2022 04:56:53 -0600 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.15 via Frontend Transport; Mon, 7 Nov 2022 04:56:53 -0600 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 0BFD7468; Mon, 7 Nov 2022 10:56:53 +0000 (UTC) Date: Mon, 7 Nov 2022 10:56:53 +0000 From: Charles Keepax To: Maxime Ripard CC: Stephen Boyd , Maxime Coquelin , Chen-Yu Tsai , Daniel Vetter , Nicolas Ferre , Thierry Reding , Jaroslav Kysela , Shawn Guo , Fabio Estevam , Ulf Hansson , Claudiu Beznea , Michael Turquette , Dinh Nguyen , Paul Cercueil , Chunyan Zhang , Manivannan Sadhasivam , Andreas =?iso-8859-1?Q?F=E4rber?= , Jonathan Hunter , Abel Vesa , Alessandro Zummo , Peter De Schrijver , Orson Zhai , Alexandre Torgue , Prashant Gaikwad , Liam Girdwood , Alexandre Belloni , Samuel Holland , Matthias Brugger , Richard Fitzgerald , Vinod Koul , NXP Linux Team , Sekhar Nori , Kishon Vijay Abraham I , Linus Walleij , Takashi Iwai , David Airlie , Luca Ceresoli , Jernej Skrabec , Pengutronix Kernel Team , Baolin Wang , David Lechner , Sascha Hauer , Mark Brown , Max Filippov , Geert Uytterhoeven , , , , , , , , , AngeloGioacchino Del Regno , , , , , , , Subject: Re: [PATCH v2 65/65] clk: Warn if we register a mux without determine_rate Message-ID: <20221107105653.GE10437@ediswmail.ad.cirrus.com> References: <20221018-clk-range-checks-fixes-v2-0-f6736dec138e@cerno.tech> <20221018-clk-range-checks-fixes-v2-65-f6736dec138e@cerno.tech> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20221018-clk-range-checks-fixes-v2-65-f6736dec138e@cerno.tech> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-ORIG-GUID: UMPSZnVO7oPJzivHhsi11mqwMsALxb4N X-Proofpoint-GUID: UMPSZnVO7oPJzivHhsi11mqwMsALxb4N X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 04, 2022 at 02:18:22PM +0100, Maxime Ripard wrote: > 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. > Commit message could probably use updated to make the new state of the chain. Thanks, Charles