From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D502C43217 for ; Mon, 14 Nov 2022 09:07:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236818AbiKNJH1 (ORCPT ); Mon, 14 Nov 2022 04:07:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237070AbiKNJHQ (ORCPT ); Mon, 14 Nov 2022 04:07:16 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96EA7273C; Mon, 14 Nov 2022 01:05:51 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0AC6260F51; Mon, 14 Nov 2022 09:05:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AA65C433C1; Mon, 14 Nov 2022 09:05:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668416750; bh=D7WS1/Iq9HsSGiJfZeeNpWeUbfN2wCTKHRwR1waF5b8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gu23KWX+hkd2VrW8L8cgRL+RvzQoNmHr4ZHYqyx7b9ggw62j+4gl+srj7mMWbYEWO eMq9AeoWeTXuHN/JCWdPJOC4s9/SfymP7ivydCT3Rc5lzvj0XxUfCGvOXg+FUovve3 mBjFDbEU8fbv5pZjeBcZG4yoTG+UTWC2w0hMhrdGaf5jiuivlIjmg6M0icdu4BayDd QORZ6I5Y6XZL3p7KDrZaQgns3WiyBQD5S5uJ7AJ3isJBuf/JmKGDVf410NdJ4z5Krb lm/rhmS+2/v3szQ2Sg6geE8bZDNcFgYVQt+IzZj3PeuYYzaH8viYNnTeheDKRc95zq VsYSZrpR3L72Q== Date: Mon, 14 Nov 2022 09:05:34 +0000 From: Lee Jones To: Linus Walleij Cc: Ulf Hansson , Maxime Ripard , Stephen Boyd , Maxime Coquelin , Chen-Yu Tsai , Daniel Vetter , Nicolas Ferre , Thierry Reding , Jaroslav Kysela , Shawn Guo , Fabio Estevam , Claudiu Beznea , Michael Turquette , Dinh Nguyen , Paul Cercueil , Chunyan Zhang , Manivannan Sadhasivam , Andreas =?iso-8859-1?Q?F=E4rber?= , Jonathan Hunter , Abel Vesa , Charles Keepax , 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 , Takashi Iwai , David Airlie , Luca Ceresoli , Jernej Skrabec , Pengutronix Kernel Team , Baolin Wang , David Lechner , Sascha Hauer , Mark Brown , Max Filippov , Geert Uytterhoeven , linux-stm32@st-md-mailman.stormreply.com, alsa-devel@alsa-project.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, linux-mips@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-actions@lists.infradead.org, linux-clk@vger.kernel.org, AngeloGioacchino Del Regno , patches@opensource.cirrus.com, linux-tegra@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH v2 35/65] clk: ux500: sysctrl: Add a determine_rate hook Message-ID: References: <20221018-clk-range-checks-fixes-v2-0-f6736dec138e@cerno.tech> <20221018-clk-range-checks-fixes-v2-35-f6736dec138e@cerno.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Fri, 11 Nov 2022, Linus Walleij wrote: > On Thu, Nov 10, 2022 at 2:05 PM Ulf Hansson wrote: > > On Thu, 10 Nov 2022 at 12:39, Linus Walleij wrote: > > > > > > On Thu, Nov 10, 2022 at 12:29 PM Ulf Hansson wrote: > > > > On Fri, 4 Nov 2022 at 14:32, Maxime Ripard wrote: > > > > > > > > > > The UX500 sysctrl "set_parent" clocks implement a mux with a set_parent > > > > > hook, but doesn't provide a determine_rate implementation. > > > > > > > > > > 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. > > > > > > > > > > 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. > > > > > > > > If I recall correctly, that is the use case we did target for these > > > > types of clocks. See sound/soc/ux500/ux500_ab85xx.c, for example. > > > > > > Hm I am trying to get that driver to work ... from time to time. > > > It's just that ALSA SoC DT has changed to much that it turns out > > > into a complete rewrite :/ > > > > > > So in sound/soc/ux500/mop500_ab8500.c > > > I see this: > > > > > > status = clk_set_parent(drvdata->clk_ptr_intclk, clk_ptr); > > > if (status) > > > (...) > > > > > > and there is elaborate code to switch between "SYSCLK" and > > > "ULPCLK" (ulta-low power clock). Just like you say... however > > > a clock named SYSCLK or ULPCLK does not appear in the > > > code in drivers/clk/ux500 or any DT bindings so... it seems to > > > be non-working for the time being. > > > > It's definitely not working, but the corresponding clocks ("ulpclk", > > "intclk", "audioclk", etc) are being registered in ab8500_reg_clks(). > > > > What seems to be missing is a DT conversion for these clocks, so they > > can be consumed properly. Right? > > Yeps that and a few more things, I have a scratch rewrite here: > https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git/log/?h=ux500-audio-rewrite > > I remember Lee said he had audio working with the mainline kernel > on Snowball at one point, unfortunately I think that was before we > started with the DT conversions and then we probably broke it. That was also 100 years ago. :) But yes, it used to work at one point. -- Lee Jones [李琼斯]