Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp240499lqo; Thu, 16 May 2024 05:13:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJPiqf3H/XozXT7bNmu/We8stZQnbJ7VKOkqfGsQV/3qW4l/F0aG5iNJuXozSRfWloWMWjIGQl3VkOvL/rDyy/yotmbFJBVu84qlB8Hw== X-Google-Smtp-Source: AGHT+IFmHW6zLeNNwm79EaKcft3EwpP63yLISbFLTqSFio/0/iXgOFyK8uSrxqgNkFXXQV3TBLZ1 X-Received: by 2002:a05:6a21:150b:b0:1af:e3f1:9af7 with SMTP id adf61e73a8af0-1afe3f1ba98mr21978175637.36.1715861613972; Thu, 16 May 2024 05:13:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715861613; cv=pass; d=google.com; s=arc-20160816; b=vxlyS9jajQC/b+im/aByQcr/lZneAr3/RQOIvAK/iKiVwadEJglU6Agty0skxKaCYl rm8grG0PvY7Djb8ilBP8xBW9yFXBWlqTkjjAQCJtVRUPcuxZIpHLWZZo6GE8kv3YQdsQ hQp57+CSiPFWFAoffXctb3qIJMuaoYi7iXE3wX+7UczqQEIXtxyMXfvAebIKA+p+F8pa 5/SZOP0tDyXys4A1yQMLit85ZmIaw5gLKJp0J81jFEJb2iCeZamiGfyFRbZKzVi3nzIu 7f4eBINYsFpobbtCS6jjEBNEsZq59KuXA69rs+/QKzwfvkRjQY7WzHu7NBdzrj1odRHL 6npA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ENvIXyp9+7g9t7ncaQc664waa0zb2mC5y2jJq3qSz3k=; fh=QDNsHTRXOFypVDnC9WA8QbCG0HWAPcYjxMV/kgMaetU=; b=Mpl4i+lhVUUwT4jMkxRUwD36+JxVOmfhzrDfN79a1Q14VCBtZXLxww6G9yoCpeC+dr kPOhHWAa9vrad6u7TR8XzOjLdVwaUuegfO6ZCASsGEGp6k6seyeUlkZ5pwot3F3Fg9Pv 01+uS0iFuz8WkhNUW2CB3HxClSyi+J6M+FJV0eqznH4Ku4N+ETWP7lhtmf6Kj9pU9ocU teSOlhBKz079GipWDlAto34U6rx+da71E8qM7dfW5crXfFO27dcjjdTuhhlIkR3rsJUc aFGUVJX3NCK6uID5QtyZTS41OXTpCR0BZpqiAWsc9rVDoXyL17GYPL51GSNtORnNNvmZ Tdcw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="tQmjf34/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180981-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180981-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-63e13e6e3besi9872910a12.713.2024.05.16.05.13.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 05:13:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180981-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="tQmjf34/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180981-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180981-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C11E0283279 for ; Thu, 16 May 2024 12:13:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC1E3145B3F; Thu, 16 May 2024 12:13:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tQmjf34/" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E04C04EB30; Thu, 16 May 2024 12:13:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715861606; cv=none; b=Vn0ozosppSnSzUS64XLNstVh+Dlv00FupCnFNfvHJLEU0mNvJPypLz8udONLRjSmF1DIU1TCPBypNrF934dLqcdJQsM0euFw1kmXGHLlqoxMz3bLwj7YX7/udmp3r2vml8/o9/63oPRBlYBA/xZ4TtFiPe4ODwlfoX4acu+pq80= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715861606; c=relaxed/simple; bh=PgBb5IuMLJI8Ia1873iobO8fM2Zu/m/kbxqQ5D7vmUY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=u8S4B1y6ADxcta0NREPR6CJAdra+jQ5DMt4zIhaE2NPYk55IuQssSvWbjugJfr69/XVBbKKTen/QbhgsWaU34odm6Dj8avOkot/14de0g52i8HVPiZhl5TtEsMelnMXKneGNh+e9QdmKCpOeM6LhtvbpsdI4H1GY4Cn6zDTrikk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tQmjf34/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 473CFC113CC; Thu, 16 May 2024 12:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715861605; bh=PgBb5IuMLJI8Ia1873iobO8fM2Zu/m/kbxqQ5D7vmUY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tQmjf34/DI3xuTTNyYHqNO9Y/SzC1Ul8Bh5Hu+0vGFB8gLlzi8DfFjCbxwFVAkksY 7pbHIbnuztMGwl4OwgLI/36pKCrOIFMgMHKkd2CAbCjoDZq4R9w9r1uvbWavioECN0 7IDtEej3Hn1PQZd5zakbze5ot2Mt8tcpCPVlfHUufn+mMeNc4bCOdOEg+cilymEIAu IXq/FaXZVwMirysn/WaRj5qqNYqcmP8kQZQ30eGDhnsSTL2uWwQSILi6K2rXm49Bpt tlIxPQImgZFBFIaGoNowYSElmiroyRw6bNrdeMgUGWgVmAbIAyOTC5xnftJaB0IRwd GtyYNhZE87yrA== Date: Thu, 16 May 2024 13:13:19 +0100 From: Mark Brown To: Elinor Montmasson Cc: Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCHv4 7/9] ASoC: fsl-asoc-card: add DT clock "cpu_sysclk" with generic codec Message-ID: References: <20240515135411.343333-1-elinor.montmasson@savoirfairelinux.com> <20240515135411.343333-8-elinor.montmasson@savoirfairelinux.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LqD9gI/K1pmwN8AU" Content-Disposition: inline In-Reply-To: <20240515135411.343333-8-elinor.montmasson@savoirfairelinux.com> X-Cookie: I'm having a MID-WEEK CRISIS! --LqD9gI/K1pmwN8AU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? --LqD9gI/K1pmwN8AU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZF+F4ACgkQJNaLcl1U h9AXTAf/eg99B2kknpaDwJ9DZYFFkcxJ6324qRL4RTcRJNsgycwZKlovGPFG7PVB 29K3gLq85wh/oTwmaxu0ytCzdOUaYcKNAec6vzs2Ro15xt1N728lxhxfM1JnH4F3 0WTtEvxm1RB//7l8dl3SNGm+tZEPMZZf5vjpDhYF0KctVTrlgekUNwQvSXbEpi9T Xpxz8LYxSROWirKxovgWZefVgP9CDqERbTny2dUnaFZJUwV1CZg33QsIL6S6Szg1 +6XGOwJ1XLprfuqZlcejaGFjAcaaYyscdyypTVEFxfZrm9O1sy40NL+z/QEksF7r /BTWFjcskN42Qd4lgOeScS/BzpHJ8A== =filG -----END PGP SIGNATURE----- --LqD9gI/K1pmwN8AU--