Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp835959rwl; Wed, 5 Apr 2023 08:19:00 -0700 (PDT) X-Google-Smtp-Source: AKy350bD4SJzL0uxh5MbzqARLkxnFiDBEuqmUHGqcR0pn3GLl6np5hzMO15BcVmaGq8nmW3H0KuP X-Received: by 2002:a17:90b:3a82:b0:23f:d662:2c20 with SMTP id om2-20020a17090b3a8200b0023fd6622c20mr6998993pjb.26.1680707939989; Wed, 05 Apr 2023 08:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680707939; cv=none; d=google.com; s=arc-20160816; b=bQzpKrGxQJT+NZOL9Ej8m2njgKY0ZfhR1BZkX1byuZvwfyj2c9bhMkc7neDyq6L0dd 4BswUAs6R6kHhSAzGzJzHAXTMzQkWD3eaQhRSRFStEwixyQ8qye8XdwQdxCa6vfzLf0m nyfjafi005glrds1enl8Ak4g81O/6rb0GOnU8FRZkM4yLd+5qMZtEzWi27ik2WmM1kT2 mb+EJzNAxsOtZNp2Ez5SHycwXh8DkQSBeH0q6PCi9kAW6hvKEI2WYApXUdIgcaOsnc+1 X7/xuzFU96eylpJxEna+E5cSsSDuQKt7WokBMfVxSyM0Ml6jor0UrGhXdkC4jA2wkmpf hlOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=4g3Y3WtpEmHJBlHmaZSfRkusN6Gsi4T8SDJHzgHkAHw=; b=OALiCZD9kGCnC2h5DUmDRAAnq8UFOCSAVqEOAUSs1saql3DGtBI2P5K+EObMEkIwii S37RiR6dhi7iyk3w8f3iKLTI+MqhIKTIVwUghMiuPCHllRcf+nHUY7WzyYLyOCa+wk6X OKFjuyotOO5vmk/b1IUTAlPMHFzA4m1icorutQ4mnq4egQok6MrpSitcLFET78Q2ZPN4 nEwJKmV9YwXu1Posk3GX0bhwV1ubK2j8B9MvkMtuf/mzpd757ofZ8d6usmzMetzVd6dC ZJVd2TcdP5BXx5tjFFgOYgZQrikBlAaXFS0PE5W9clfSIf0/TOWiA0XGR+D77NBrOcmx svMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=L4vZO5QE; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=VEkZsmfr; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a17090aad8300b0023d3567b2a8si1496179pjq.42.2023.04.05.08.18.48; Wed, 05 Apr 2023 08:18:59 -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=L4vZO5QE; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=VEkZsmfr; 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 S238691AbjDEPSb (ORCPT + 99 others); Wed, 5 Apr 2023 11:18:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238683AbjDEPSN (ORCPT ); Wed, 5 Apr 2023 11:18:13 -0400 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DD555B95; Wed, 5 Apr 2023 08:17:35 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id CFB322B06725; Wed, 5 Apr 2023 11:17:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 05 Apr 2023 11:17:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type: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=1680707845; x=1680715045; bh=4g 3Y3WtpEmHJBlHmaZSfRkusN6Gsi4T8SDJHzgHkAHw=; b=L4vZO5QE1gCVJJlu2o r6vojScB4+ZzvhrGxAnCgZw8q3iEvd5m35SZkx+KC1V9nR1oJrFdkv+ey7bHZjCL h7ZEBk9Gmy/3C1A/1qdft9MpePUYhTf2LMdsCjgEXC/wq8oDjffPfKya8bL0vOhv zM4glmn3aahZ0fd/tWPeXFJVlzfG49xJGig3f3S4nIf2yKej0KUqRbtf9U4HO7U4 Fca3KFRY0boUta2nyK/ZvwIoPXjc0uR7jRie7ubda+6o8LFTmR3EQPKCjDxKPY69 q+rnuCjeiU34JIwElnik7ZIFhfh2uCaJ5k3L+G6Ma8lMgJQI3qmYO86jMfQxx5Ci VdNw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type: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=fm2; t=1680707845; x=1680715045; bh=4g3Y3WtpEmHJB lHmaZSfRkusN6Gsi4T8SDJHzgHkAHw=; b=VEkZsmfrmM6qqrbSYR67T7b6tnqGF AvhJD3Y4WLLq1tU2AX/t6uAgHsNHwJpXvwtS4GnhhmEJ7XPVKNwRq+9WMhmmzML+ RG6DEdWr2hNUhcl8o0yOuq3CX2GqoiuaH9MsBOokOxVfwovgwExj8beYgt4/HxuA a96LoWlzOcRy23htu+pg7NjQwIET42Hppt8MLtacCrxmqqy1yW4bPHimBOxOQWfJ wAwezgR/QID/T8H8Ty1cHIhdRLrfE64Z96wSdoJclrB780/8YTOOdsPEANPT/KF4 SSABADpffcDQPX+mkREx6UEIjxMxopVCUSw91MvdZ2vn4nW1L5oPr6aSQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtsfertddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeeuveduheeutdekvefgudevjeeufedvvdevhfejgfelgfdtkeevueegteek gfelfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Apr 2023 11:17:22 -0400 (EDT) Date: Wed, 5 Apr 2023 17:17:21 +0200 From: Maxime Ripard To: Mark Brown Cc: Michael Turquette , Stephen Boyd , Andreas =?utf-8?Q?F=C3=A4rber?= , Manivannan Sadhasivam , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Max Filippov , Charles Keepax , Richard Fitzgerald , Maxime Coquelin , Alexandre Torgue , Luca Ceresoli , David Lechner , Sekhar Nori , Abel Vesa , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Matthias Brugger , Geert Uytterhoeven , Dinh Nguyen , Peter De Schrijver , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Ulf Hansson , Linus Walleij , David Airlie , Daniel Vetter , Vinod Koul , Kishon Vijay Abraham I , Alessandro Zummo , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Paul Cercueil , Orson Zhai , Baolin Wang , Chunyan Zhang , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno , linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, patches@opensource.cirrus.com, linux-stm32@st-md-mailman.stormreply.com, linux-mediatek@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-phy@lists.infradead.org, linux-rtc@vger.kernel.org, linux-sunxi@lists.linux.dev, alsa-devel@alsa-project.org, linux-mips@vger.kernel.org Subject: Re: [PATCH v3 43/65] ASoC: tlv320aic32x4: Add a determine_rate hook Message-ID: References: <20221018-clk-range-checks-fixes-v3-0-9a1358472d52@cerno.tech> <20221018-clk-range-checks-fixes-v3-43-9a1358472d52@cerno.tech> <01f32440-8dd2-4030-9006-a3123be55845@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="l2rp74o6ajwb6i7x" Content-Disposition: inline In-Reply-To: <01f32440-8dd2-4030-9006-a3123be55845@sirena.org.uk> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 --l2rp74o6ajwb6i7x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Mark, On Tue, Apr 04, 2023 at 04:26:18PM +0100, Mark Brown wrote: > On Tue, Apr 04, 2023 at 12:11:33PM +0200, Maxime Ripard wrote: > > The tlv320aic32x4 clkin clock implements a mux with a set_parent hook, > > but doesn't provide a determine_rate implementation. >=20 > > This is a bit odd, since set_parent() is there to, as its name implies, > > change the parent of a clock. However, the most likely candidate to > > trigger that parent change is a call to clk_set_rate(), with > > determine_rate() figuring out which parent is the best suited for a > > given rate. >=20 > > The other trigger would be a call to clk_set_parent(), but it's far less > > used, and it doesn't look like there's any obvious user for that clock. >=20 > It could be configured from device tree as well couldn't it? Yep, indeed. > > So, the set_parent hook is effectively unused, possibly because of an > > oversight. However, it could also be an explicit decision by the > > original author to avoid any reparenting but through an explicit call to > > clk_set_parent(). >=20 > Historically clk_set_rate() wouldn't reparent IIRC. >=20 > > The latter case would be equivalent to setting the flag > > CLK_SET_RATE_NO_REPARENT, together with setting our determine_rate hook > > to __clk_mux_determine_rate(). Indeed, if no determine_rate > > implementation is provided, clk_round_rate() (through > > clk_core_round_rate_nolock()) will call itself on the parent if > > CLK_SET_RATE_PARENT is set, and will not change the clock rate > > otherwise. __clk_mux_determine_rate() has the exact same behavior when > > CLK_SET_RATE_NO_REPARENT is set. >=20 > > And if it was an oversight, then we are at least explicit about our > > behavior now and it can be further refined down the line. >=20 > To be honest it's surprising that we'd have to manually specify this, I > would expect to be able to reparent. I suspect it'd be better to go the > other way here and allow reparenting. Yeah, I think I'd prefer to allow reparenting too, but as can be seen =66rom the other reviewers in that thread, it seems like we have a very split community here, so that doesn't sound very realistic without some major pushback :) Maxime --l2rp74o6ajwb6i7x Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZC2RAQAKCRDj7w1vZxhR xRegAPwLq9rAf2gXBh+S5NNzglDB7jF/equjD6dhO2iJfkonFgD+OuUuIkBhvEAH dy14syHvUOJJRm7L8hscnDwFHJrXQA0= =mQrD -----END PGP SIGNATURE----- --l2rp74o6ajwb6i7x--