Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2373340ioo; Sat, 28 May 2022 11:38:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhp5YGQkrWIJq9lAgVmzyG1FBTY81Oh6si++Q1+pjQnVmAdn1sHltNRAmCB3geME7G9lVa X-Received: by 2002:a17:902:f548:b0:163:90d0:ada8 with SMTP id h8-20020a170902f54800b0016390d0ada8mr10274485plf.22.1653763089930; Sat, 28 May 2022 11:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653763089; cv=none; d=google.com; s=arc-20160816; b=fUz7B9Fwgsbgu+UR1enjtFuTiP0h+bUVpgzxuKedDsQYn8K2KfZGkbPp+Yq8tVlgaX Y+a/hxSCnIAVuPaqePt1Ncivf7otCekct2Zz5DxYT5CwnYqLQlcx5btHIC36O8n3dihj vVbnzc2i0qHY8CqW4DGzGJ2URNVnGWL0AMeapzzG0z2x92afkD6MCeTTGx5l4/O0OtIl cftaAijIzmrwMkD3+2VsLVIQES4QOf6WQWCAn/ES768JC0xsOLGmDckfqWRYfzj+vOZQ T7LY797ol3gU+zq2sxcxmmql974HuGB6NbhRnFIlIFLdkWK8X7em2tahKds0xhiw8+et Z9mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Qm4icfTnNF2CmaFLK3I7vNuQbVMZGj0fQYNbC/IgqDk=; b=EDsQEdyauEAI1uxBWY9zs7zftYgSyUlxU3Du1I8BYk6ErQh3MMAFw0kujrLs7uQBZi x+FCb4u8DzagBLHBrEmfgC3bUkTdntPqZbrcaqMci76HZuB0xXxO/IiZVpPNyNzFYUb9 C8ucOdjAH2It5CuRJaP69UARUmNxFuzK70g6h6Wa+rfZ89TEXE5iG1YMAoa4dMeR+vLW bSqq/b4zngmGnzyakOatHg9EvXhb4NZTf2//mwacbxZDolURoZ+Exdd2BAjJFaKLD7EV 1TFF6ywm4AJuP+Ngx8k7qNHJUh1tdcHOsVwLBHKT5m925Ptfz4jBnjJ59klCjO/7BaqM 3RjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=mmjaRwBZ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d1-20020a170903230100b00162039486e4si11190865plh.319.2022.05.28.11.38.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 11:38:09 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=mmjaRwBZ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 99056252B6; Sat, 28 May 2022 11:32:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354559AbiE0TFw (ORCPT + 99 others); Fri, 27 May 2022 15:05:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240401AbiE0TFu (ORCPT ); Fri, 27 May 2022 15:05:50 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDACB5C76E; Fri, 27 May 2022 12:05:49 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nfraprado) with ESMTPSA id 6F81D1F464B2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1653678348; bh=xy2v0UW9OxkQlEpRbg1MC88ziJi3bs138+XfVpOrkC8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mmjaRwBZTXfnPJGc8bg4toaoo7Nyy0vzqi4EoQOeXyw9L35qvzztiaTKc8D+3NEUo kayJ4EY33oK3oAtrBrOS3xa++5ygl8StkJe0nOsqV/dlMCv6kE7PzCWHRFLNnJzgso 8GoqNYPkUfFT7ERTn3CO/vwimAsB3k6g/JBpKfALGev0HUY3dP3wUid8ss7xdZvham py+/vV1fyzp7V/dx21pD7ADBHmbgZdS05Ve6cgbkDn8SLaeo+rWBgX7DaMKlyNsj4q Vii7d9CB0XHlSckHEZBCSUBzrJfH82zot9PVCF+ZLll5iy2uzMFYbHnI0hxOQ4YXXX nsKgtruVhfFNg== Date: Fri, 27 May 2022 15:05:42 -0400 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: Krzysztof Kozlowski Cc: Mark Brown , kernel@collabora.com, AngeloGioacchino Del Regno , Jiaxin Yu , Krzysztof Kozlowski , Liam Girdwood , Matthias Brugger , Rob Herring , Shane Chien , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v2] ASoC: dt-bindings: mediatek: mt8192: Add i2s-share properties Message-ID: <20220527190542.4jckyflvtkq4n7ie@notapiano> References: <20220509205847.607076-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 26, 2022 at 08:49:39AM +0200, Krzysztof Kozlowski wrote: > On 09/05/2022 22:58, N?colas F. R. A. Prado wrote: > > The Mediatek AFE PCM controller for MT8192 allows two I2S interfaces to > > share the same clock and act as a single interface with both input and > > output. Add patterns for these properties in the dt-binding. The > > property is split into two patterns in order to allow all valid > > interface pairings. > > > > Signed-off-by: N?colas F. R. A. Prado > > > > --- > > The series from v1 of this patch was merged although some changes were > > still needed in this patch, so the v1 of this patch was reverted [1] and > > this standalone commit addresses the feedback from v1 and readds the > > property. > > > > [1] https://lore.kernel.org/all/20220509185625.580811-1-nfraprado@collabora.com > > > > v1: https://lore.kernel.org/all/20220429203039.2207848-2-nfraprado@collabora.com/ > > > > Changes in v2: > > - Added "mediatek," prefix to property > > - Rewrote and added more information to property description > > - Split into two patterns to validate that output-input pairings are > > done > > > > .../bindings/sound/mt8192-afe-pcm.yaml | 16 ++++++++++++++++ > > 1 file changed, 16 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml b/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml > > index 7a25bc9b8060..2abf43c6c2c3 100644 > > --- a/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml > > +++ b/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml > > @@ -54,6 +54,22 @@ properties: > > - const: aud_infra_clk > > - const: aud_infra_26m_clk > > > > +patternProperties: > > + "^mediatek,i2s[13579]-share$": > > + description: > > + Each I2S interface has a single data line, input if its index is even or > > + output if the index is odd. An input and an output I2S interface can be > > + used together as if they were a single I2S interface with both input and > > + output data lines by sharing the same clock. This property represents this > > + pairing. The value should be the name of the interface whose clock is > > + used, and the property name the other interface that depends on this > > + clock. > > + pattern: "^I2S[0268]$" > > + > > + "^mediatek,i2s[0268]-share$": > > + description: Same as above. > > + pattern: "^I2S[13579]$" > > Rob's question is still valid - why these are not phandles? So, instead of having i2s9-share = "I2S8"; on the DT, you want us to have something like this: afe_i2s8: mediatek,i2s8 { }; mediatek,i2s9 { mediatek,share-clock = <&afe_i2s8>; }; Or do you mean something else? It seems like a lot more syntax to express the same thing (and the empty node seems awkward), but if that's the DT way, I can change it no problem. > > In any case you miss $ref. Indeed, sorry, I'll add it in next version. Thanks, N?colas