Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp808822lqo; Fri, 17 May 2024 02:06:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUHayU1Odh/Qw314G9KZloUMkEsoGfAIeM5pXUiIO/pPaUV20BRIFHcyIlp6MsIrXZSFjf1Miu5/QZjUI5LTZPz8s3LbswcwpkgPIwHSw== X-Google-Smtp-Source: AGHT+IHrSOp7zVBPiuSGrXHAull1CcMIS2wdhXNuyvNLWPmiyr9PyLttPB/t6G4eRJKjfElyA7Km X-Received: by 2002:a17:907:9710:b0:a5a:2d30:b8c1 with SMTP id a640c23a62f3a-a5a2d54c038mr1704196966b.14.1715936765908; Fri, 17 May 2024 02:06:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715936765; cv=pass; d=google.com; s=arc-20160816; b=G2Jy4fJDh5a5WtTsFRttbNL3XUNoLRUBy7CcfziM64b4YN3+vezyodRsl/A8sRcYub wPexa7ncltuHh+hQoNULDiImywdwn7NS3CtrrbbZ4DJMdHTCTLySt8vhlPhubItJhybP dHW/V7APrXl4DG3FF+BvONDJ6jAj/EFa6+EZOhqWGJaBIm7c0pYsMerjGkmgHNY2l9kv 8uf5cw7wYwFllVlf+2GdFqVXWMunMQxeGqwUPQWAZ3Y6oFQbx8nxDfLRRq/QCYTb4Xsk LhOM88FiHF0IJl64/QD76DggJkaMHJ3q5gbxVsPOByizLbO6NcY/HZtqZ+dfNvIRi36x 0xkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=thread-index:thread-topic:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject :references:in-reply-to:message-id:cc:to:from:date:dkim-signature :dkim-filter; bh=8SLwMepymaYZWEVQR9qjp1ldhDA0f4QIis7dKy4nHYQ=; fh=VXt/LUKEEDJ8djAr3t5+Le8CaT+r2l2/AEkIeZg16NU=; b=LAQFP+Hkp+uWfG5ZM2Z92f5isj5pOBkyhAmbzqDB+bDWeBRwXrMrOplqraij0Bm4DF Tq0A9+RMxBq/16JpB1blB8aQCj/pllKgQclia16xx8wgk8jehcuvXxbuL2gfyCqGIH2q U3kMwo+qu3rmppd6dlgdQadkJSV8kBqBws6LBjWrXCKOwUYtVz1mNG2G9DKB1FzC8K2Z 2ZEvGb9F29/LnwKKjeGPtJbIzN27TDaTJyJRqRDNKj38EF7PgJwRyOQJFUz03uqju4kH EpaldWSdA2rK4SwQZDcFRrONqxD/SbZ4BOlRG5NOXWl2ogA6Ub0j5vBsqVkgpEbwUzGe m/nA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=QNEjG5K0; arc=pass (i=1 spf=pass spfdomain=savoirfairelinux.com dkim=pass dkdomain=savoirfairelinux.com); spf=pass (google.com: domain of linux-kernel+bounces-181894-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181894-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b21ea9si932707566b.411.2024.05.17.02.06.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 02:06:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181894-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=QNEjG5K0; arc=pass (i=1 spf=pass spfdomain=savoirfairelinux.com dkim=pass dkdomain=savoirfairelinux.com); spf=pass (google.com: domain of linux-kernel+bounces-181894-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181894-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id A3C531F216F1 for ; Fri, 17 May 2024 09:06:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 926542137E; Fri, 17 May 2024 09:05:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b="QNEjG5K0" Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (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 351C51B809; Fri, 17 May 2024 09:05:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=208.88.110.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715936748; cv=none; b=ls19j+FT3JSJZCgIrRIVPUOvJVT1JhJxhtP/rgayXPd0EFPHDqlcobWg59M9cHNIVAHMyxO03TBk+Jw3aH5l0FIt4Hk1oWG7GhAogd5qpIsF95NiSZCpX3ZF0zprIRYiilxZcpSDKMCGU8P1MXVmLNWUrOkzEAwzhtQelJd5Sdk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715936748; c=relaxed/simple; bh=qaI1HGeZwQBBafuZfT3T7gHh0pYBlXpnWAg7pywFKjM=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=S7l0nr1pqggnAsxF+hFGhTsX3nd9zZNxj87IL6yq+/qsQQOzPEdE5RHq6m0xwiyoJhbuVuD9URUBQSu0JJ+1IVyOIgvQ4LRRxzJPCD5rTYSSHXJ+ti6EBKOJInHi8ODofkpobPRsd6fZpuFEJk8zCjuo85w8O2mjSA/DG4fVeZ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com; spf=pass smtp.mailfrom=savoirfairelinux.com; dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b=QNEjG5K0; arc=none smtp.client-ip=208.88.110.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=savoirfairelinux.com Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 68ACA9C57A6; Fri, 17 May 2024 05:05:39 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id j0EVtTFCV_in; Fri, 17 May 2024 05:05:38 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id A809E9C5864; Fri, 17 May 2024 05:05:38 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com A809E9C5864 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1715936738; bh=8SLwMepymaYZWEVQR9qjp1ldhDA0f4QIis7dKy4nHYQ=; h=Date:From:To:Message-ID:MIME-Version; b=QNEjG5K0CVnFA9ZM/PRvc2Zh6zP52Jks46QB+HzouGEwR8al3i5mGFG0E5hvkLxtW jfJ0SmCrlxlkZjINYMKaDg0MzSgXZF+dWcIR+U5mF1YLwKUQqxSR/rNglVfpOYRRHe Q8j7N0STKjp3oer40wADQ2Z3ri5pzW/8IgB9iMEWVcZtBZvRiCaSlT5SxwyLb18z3l jb4pS4ZMdyOkK+SG2G5CSZn3dOpF0dtrQ4GGm5L2T2yGSMa1QovS+6jG5alPggxGy1 bRttWhmsfaminOQaDm/e93JkQ62jvrh3sCo/c3AU/rSd1IcYreNd6bkHhTYfERy/ds epm+dfcegME8w== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id ydHCeB7dNc_i; Fri, 17 May 2024 05:05:38 -0400 (EDT) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [192.168.48.237]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 7254F9C57A6; Fri, 17 May 2024 05:05:38 -0400 (EDT) Date: Fri, 17 May 2024 05:05:38 -0400 (EDT) From: Elinor Montmasson To: Mark Brown 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 Message-ID: <1607626951.349332.1715936738428.JavaMail.zimbra@savoirfairelinux.com> In-Reply-To: <20d8eb96-6346-4341-95ee-74729001c01a@sirena.org.uk> References: <20240515135411.343333-1-elinor.montmasson@savoirfairelinux.com> <20240515135411.343333-9-elinor.montmasson@savoirfairelinux.com> <20d8eb96-6346-4341-95ee-74729001c01a@sirena.org.uk> Subject: Re: [PATCHv4 8/9] ASoC: fsl-asoc-card: add DT property "cpu-system-clock-direction-out" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailer: Zimbra 8.8.15_GA_4581 (ZimbraWebClient - GC112 (Linux)/8.8.15_GA_4581) Thread-Topic: ASoC: fsl-asoc-card: add DT property "cpu-system-clock-direction-out" Thread-Index: GFI3lOelC49AXb+0LrXDbBRGlEMPdA== From: "Mark Brown" Sent: Thursday, 16 May, 2024 14:18:00 > On Wed, May 15, 2024 at 03:54:10PM +0200, Elinor Montmasson wrote: >> Add new optional DT property "cpu-system-clock-direction-out" to set >> sysclk direction as "out" for the CPU DAI when using the generic codec. >> It is set for both Tx and Rx. >> If not set, the direction is "in". >> The way the direction value is used is up to the CPU DAI driver >> implementation. > > This feels like we should be using the clock bindings to specify the > clock input of whatever is using the output from the SoC, though that's > a lot more work. Similarly to patch 7/9, I exposed this parameter because the driver has it, and because there might be CPU DAIs needing this parameter. Otherwise the cpu sysclk direction will always be IN as a default. This parameter could be needed for cases with CPU DAIs, such as an SAI, which can provide or consume Tx/Rx clocks. For these devices I know the sysclk direction should correspond to what was set in the dai format. This new compatible is intended to be used when there is no codec device/driver. There is technically no codec device/driver for which the clock input can be set. Is it a bad idea to allow setting the cpu sysclk direction only ? Should the compatible be limited to use-cases where the cpu sysclk direction cannot be set by the machine driver ? Best regards, Elinor Montmasson