Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp869042lqo; Fri, 17 May 2024 04:17:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUk1B0fWAy/hIGCe/jXvD/XJErcfCFAaI8KH+EjE/hGtHD4JUAXK47oExW/EV5x7L+7fGfijnASEQt9TZ3LdA5Djj+0QOf6ZoDrFGW1dw== X-Google-Smtp-Source: AGHT+IHzWc5Zzc1BD81ueJ3YuuYlpIBq6VI+1IEyJrucJigKrdEqsq7JHFxLhEO5yqK4dHNKjoAf X-Received: by 2002:a17:903:32cc:b0:1f0:9395:7525 with SMTP id d9443c01a7336-1f0939576e5mr72057125ad.1.1715944662238; Fri, 17 May 2024 04:17:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715944662; cv=pass; d=google.com; s=arc-20160816; b=MzaSNT3esc4HtHa9Puo31EW+7Rav0AZvAt3TyoixPaC3MnDS9IT8xbK/H8OVuTN5Ob VnAMZBUoR7Pg3ajy8jRW6Mnz7yVZJSUmAQnq5ftlZFqiJT/kJQa3PzRzxU0d46uF82II l/VkS0BkAZYccq2LdTQ+dHV2UK1Qg02doRidYCEYupch03BJONJetyZhL9TuVLB/n7v/ JeGZQ5HWJatDA3fb5dqm8UvcGrvF7TibhSnEX5OJHqTcsf1qIB7ETVpuLYNM6cp7OQ6Z lyOefaWuMr0m+AfyTrOju1sQF3md39MytyPsrl/uqqMJYS6iU4kEHc47s8vPnTWaJuJp 0gUA== 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=qpUhDxFnzOMerlPq8N1K/RTMOiZFavFY2lksnkALd7w=; fh=LAl9jzQaRG6KnCQKOUrFjbA9OnwLnFHHVP2WNTDCQD4=; b=Gh48hOkyMXJZ0Hji9F8nq5pGI9BVdUcThwJESx+vHrt0YrHEUHP4GI9U8lo95OnN9N LKFQuDwZOPqSq8+mbxG758OSd1j2jjaFeH/yYRl0O9KFDoIPddjG+KomiqXEib6miYg6 gP9qeDHrwB+Yi0ynRUfPs9mOSsglm0oqgXIg0A6YkIKwedb0H8yl4sF/rc5Mfku15RYJ KZ0ncIGv1IG6l9+UHwGQWwMhCPDg5+v617ZMsrqrEDZzbgPnOwhA7Jvic32VvxngCB2a AyiUP0VUZKJTpoqL23XemJFtqBtVeT//iO16CyQ11Fnx3axkx3lgY0lyq3COeN9d1CAv HgFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hQy4PIpg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-182038-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182038-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0bf32bf4si140451045ad.253.2024.05.17.04.17.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 04:17:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182038-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hQy4PIpg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-182038-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182038-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3CF56B22629 for ; Fri, 17 May 2024 11:17:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AD253D546; Fri, 17 May 2024 11:17:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hQy4PIpg" 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 28DC93D0A3; Fri, 17 May 2024 11:17:27 +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=1715944648; cv=none; b=T872AUpFmtthbi2lBXrCaH6jJwScVRULaWQ37XpCgx5fuEDhmpyqAiejzDYepCWVTa0x1wSrFmIXdL5p6+HxzLyYFD867jmxy/PAUy8JNO8Tsp/MEuG3lWVVtWonLLmVJGKXZdmG5MJnWjq7L5aATk9HwAA3n7Wx0zIRF0KKel0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715944648; c=relaxed/simple; bh=tz2kY6qZxYu8TUGihVyLmMBdD0mSnRDdr1XJJV0fdqw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X5cN2G9FqsjZHA8ge7Xh+3z+TW/k9CosVT9J4T1+OrzWdxuazbCon+qI+epvueiVFB5t7gDqou+enVMyRIWO/e8FWOVgj2QC1h8yL+GgZnrkA8oJaZm0csJx1qPmXhE5SOVj/wrFERdwzwcZoT1SJxOMMyKsLc38yV/GBw5oFz4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hQy4PIpg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29952C2BD10; Fri, 17 May 2024 11:17:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715944647; bh=tz2kY6qZxYu8TUGihVyLmMBdD0mSnRDdr1XJJV0fdqw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hQy4PIpgYaKxXAHLGvLX+gUDvsDu0a15TR2Y2mPX//3bbTmVe/LF42kVNmBCWnrIF fXggLSUVDlRgG8/nB5tFhPY4GpcIiGYQBQRpMMPvtbclDKqH3Qnab61xQFVGHq2E2B ao1JK8A6/I+vrUgOJv3Dqfry4TbETyrS/EwqZs6+lMa8i3a3TvJF66NVcnL3FOE/d7 EKMK8Lf7bk4KqjpHqxIZJonIMDYbfuZMldEu32/tyybWRpV/5PTq4PLsakYSgjOjj/ szCeeggBtdpenLeZv1HQ0li+bHqGpiJhMedlDwAJ0RCCwi8ibZnRe2zj8+qUn3xZUy hTr7GqHUkMODg== Date: Fri, 17 May 2024 12:17:20 +0100 From: Mark Brown To: Elinor Montmasson Cc: Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , shengjiu wang , Xiubo Lee , Fabio Estevam , Nicolin Chen , Jaroslav Kysela , Takashi Iwai , linux-sound , devicetree , linux-kernel , alsa-devel , linuxppc-dev 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> <822567441.349330.1715936735603.JavaMail.zimbra@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="ZuqvFG62+4JL9ncV" Content-Disposition: inline In-Reply-To: <822567441.349330.1715936735603.JavaMail.zimbra@savoirfairelinux.com> X-Cookie: Function reject. --ZuqvFG62+4JL9ncV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, May 17, 2024 at 05:05:35AM -0400, Elinor Montmasson wrote: > From: "Mark Brown" > > On Wed, May 15, 2024 at 03:54:09PM +0200, Elinor Montmasson wrote: > >> + 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? > The driver allow to set the sysclk frequency > of the CPU DAI through `priv->cpu_priv.sysclk_freq` when calling > `fsl_asoc_card_hw_params()`. > Currently it is hard-coded per use-case in the driver. > My reasoning was that with a generic codec/compatible, there might > be use-cases needing to use this parameter, so I exposed it here via DT. > Is it a bad idea to expose this parameter ? This is not a requirement for the > driver to work, most of the current compatibles do not use this parameter. > It is currently used only for `fsl,imx-audio-cs42888`. > In that case I can remove this commit. I'm having a hard time connecting your reply here with my comment. This isn't as far as I can see allowing the frequency to be explicitly configured, it's just using whatever value happens to be programmed in the clock when the driver starts. --ZuqvFG62+4JL9ncV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZHPMAACgkQJNaLcl1U h9A/Mwf/e8Oa99TU5bBwUqPPv4RdS3EWv4/897XflQzPXjxfkxnMFOUUf0EBVm61 5WnYoirwxy+DfhNF5ubdVm7WNINPuCs1X7mMZcN6aBE4Vo9yw1deDjFV8/s+QSCd 6JpsmssN8sIOQh+w5Axkp+Qk9JuVRbVI8nFDMhD/tPRUMkUG9mjCLjP3xQoV59+d p9ElIEC+zSBWu9HCQW4i19eO+O53iT/9s7jkpXhFBbai02OOzw5q5LcwyL/qh0Zg fhOWA9PFrwg7iS7Rknp3Np5Msb09gh86McZtp2htgkkbggFl7ak0nRG+qlfyN0P/ AKOYQ4agvMxC3FKsb/HmPv9Q+Brc5w== =Zf2Q -----END PGP SIGNATURE----- --ZuqvFG62+4JL9ncV--