[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ffb3624f-2170-4642-aaa5-fb6736a75d59@sirena.org.uk>
Date: Thu, 16 May 2024 13:13:19 +0100
From: Mark Brown <broonie@...nel.org>
To: Elinor Montmasson <elinor.montmasson@...oirfairelinux.com>
Cc: Liam Girdwood <lgirdwood@...il.com>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Shengjiu Wang <shengjiu.wang@...il.com>,
Xiubo Li <Xiubo.Lee@...il.com>, Fabio Estevam <festevam@...il.com>,
Nicolin Chen <nicoleotsuka@...il.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
linux-sound@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, alsa-devel@...a-project.org,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCHv4 7/9] ASoC: fsl-asoc-card: add DT clock "cpu_sysclk"
with generic codec
On Wed, May 15, 2024 at 03:54:09PM +0200, Elinor Montmasson wrote:
> Add an optional DT clock "cpu_sysclk" to get the CPU DAI system-clock
> frequency when using the generic codec.
> It is set for both Tx and Rx.
> The way the frequency value is used is up to the CPU DAI driver
> implementation.
> + struct clk *cpu_sysclk = clk_get(&pdev->dev, "cpu_sysclk");
> + if (!IS_ERR(cpu_sysclk)) {
> + priv->cpu_priv.sysclk_freq[TX] = clk_get_rate(cpu_sysclk);
> + priv->cpu_priv.sysclk_freq[RX] = priv->cpu_priv.sysclk_freq[TX];
> + clk_put(cpu_sysclk);
> + }
I don't really understand the goal here - this is just reading whatever
frequency happens to be set in the hardware when the driver starts up
which if nothing else seems rather fragile?
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists