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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E5AAC4332F for ; Sat, 12 Nov 2022 14:13:11 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7CD59166F; Sat, 12 Nov 2022 15:12:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7CD59166F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1668262389; bh=7moKjC+dAO9fjfErovFL8kthQMJPAMzgAy4zs5eebs4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ibJdLFS+KXb0Z/xBtV/C+KIyjLdIaU1MSgEli9O6tHbE0IqKuqgCpJ9eUqxhgKzY4 SIobrgtLUz1Ll2hTobaZ/2x7GbJ5VZoZbNSja2IZKvAhianoZY6hDJ850QvxaC1AmR unkOeeGmrSCwLZEFodd0HvRfnIlkV88KsXy/BPno= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 04E22F8047B; Sat, 12 Nov 2022 15:11:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E89A7F8028D; Fri, 11 Nov 2022 10:20:54 +0100 (CET) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A63DDF800CC for ; Fri, 11 Nov 2022 10:20:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A63DDF800CC Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eRHEStFU" Received: by mail-ed1-x533.google.com with SMTP id x2so6838590edd.2 for ; Fri, 11 Nov 2022 01:20:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KQqlnqh61yDEivsgLuzXFgBFvWeIkle9538NvChEgG4=; b=eRHEStFUgdZI+TOEkzLgPNAUqr8je9PakORGJBpBvetm722q6+52mzO4PuK6UP2C9B y5QKHELjwoL/I5ZveEAoHNQYPUFH2gG9BiO6rNE0Zoi1U/NPdjDb6jXihqpiYnUK7uS7 SaEgVVAc1rCLsO+PywRf34jY4cKkxjJ5rpb0iLv7Lx6icnPxIKkBSReqSNOAi5AyQqJr wfParI72b+nyrA1C6NNwYpO2mYi/F3sK4RXxqU2kGu5IcDipfl9TyQkhA6GnH0/P0zga 4Pzu7HawlgloyguZmgsGbfP6pqVHW5N9NgfDTgsFvjn4zWaBEAPihtz4CQ3ui15zn27r jJSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KQqlnqh61yDEivsgLuzXFgBFvWeIkle9538NvChEgG4=; b=rMv7M6GVJZ69wkKehwii48ZxCNssjkC4shUpn20SaxJFfshywxR9hBnJdLx0iTknbJ I2NNLmemz2Xuca8bnmqIreQ8yQKd9afAPQHaPkBV5OM3w8FDZRrV4n7t5PuWrK2r/zNw eLKrchfiwn00VpY7/BKRR0eI9UCzmMx4w6tJEz85HSzlbcd6VnZnEMncuPSBwnW8P2zM Bi9XMA4vMX6e4U8MVMiaxprzGkLOSuwUYztTmT+iRx/jA9w1XmxaPZZCXGUvzzczB5kn 0pDn4BBcXQHpNhwR920IylXYs5Msm0hQVXEJ9PTiR/QSGTyuAbFoDaWNA2Vx15egGmvl aWHQ== X-Gm-Message-State: ANoB5pmTpScfCbYY5lP7qa6ekHpdYNmJ8oBxksTG1KjTyckx7XgCSIWe 6C4GdOWnU2j+VC2OaKFq+Y1/TzWdZXyMTDErXZH9qg== X-Google-Smtp-Source: AA0mqf53QBR47pUgYWT2xVhbs/Lj4/kZl7NAGXQCY837HnfVAtbLsG6fA3g+X2q4OOQ/b93b11NyQoioTLD4pHwNxXU= X-Received: by 2002:a50:ee13:0:b0:463:a83c:e0af with SMTP id g19-20020a50ee13000000b00463a83ce0afmr679526eds.158.1668158446767; Fri, 11 Nov 2022 01:20:46 -0800 (PST) MIME-Version: 1.0 References: <20221018-clk-range-checks-fixes-v2-0-f6736dec138e@cerno.tech> <20221018-clk-range-checks-fixes-v2-35-f6736dec138e@cerno.tech> In-Reply-To: From: Linus Walleij Date: Fri, 11 Nov 2022 10:20:34 +0100 Message-ID: Subject: Re: [PATCH v2 35/65] clk: ux500: sysctrl: Add a determine_rate hook To: Ulf Hansson Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Sat, 12 Nov 2022 15:11:54 +0100 Cc: Alexandre Belloni , Prashant Gaikwad , Geert Uytterhoeven , Liam Girdwood , Michael Turquette , Sekhar Nori , Alexandre Torgue , dri-devel@lists.freedesktop.org, Paul Cercueil , Max Filippov , Thierry Reding , Lee Jones , linux-phy@lists.infradead.org, David Airlie , Fabio Estevam , linux-stm32@st-md-mailman.stormreply.com, Abel Vesa , Kishon Vijay Abraham I , Samuel Holland , Chunyan Zhang , Takashi Iwai , linux-tegra@vger.kernel.org, Jernej Skrabec , Jonathan Hunter , Chen-Yu Tsai , NXP Linux Team , Orson Zhai , linux-mips@vger.kernel.org, Luca Ceresoli , linux-sunxi@lists.linux.dev, linux-rtc@vger.kernel.org, linux-clk@vger.kernel.org, Charles Keepax , Daniel Vetter , alsa-devel@alsa-project.org, Manivannan Sadhasivam , linux-kernel@vger.kernel.org, Sascha Hauer , linux-actions@lists.infradead.org, Richard Fitzgerald , Mark Brown , linux-mediatek@lists.infradead.org, Maxime Ripard , Baolin Wang , Matthias Brugger , Pengutronix Kernel Team , linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , Alessandro Zummo , Stephen Boyd , patches@opensource.cirrus.com, Peter De Schrijver , Nicolas Ferre , =?UTF-8?Q?Andreas_F=C3=A4rber?= , linux-renesas-soc@vger.kernel.org, Dinh Nguyen , Vinod Koul , Maxime Coquelin , David Lechner , Shawn Guo , Claudiu Beznea X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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. Yours, Linus Walleij