Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6644142ybe; Wed, 18 Sep 2019 06:54:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFa1fwHMINI/obKlwUdzHagoo2dwG8tZCs19NH0bnBfiKH2wCUnNyN/L21gi5Pz2HJ4IQv X-Received: by 2002:aa7:c759:: with SMTP id c25mr10379477eds.15.1568814876165; Wed, 18 Sep 2019 06:54:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568814876; cv=none; d=google.com; s=arc-20160816; b=StDjgxl+cAOP9vUi+L21aqZFX9bwkQuMx+lOdRR5anKsNRaVue3gzBhvuUAPnLt0tC huymqPJrXNFlxf04+5OKXLBsg8YSkbN2CsPf+weW4v3Ui4d6Vq4xQCwLJ29KOshRt+KT 8vfDsKBsDiGoR4SdQPNQZqAqOuLTRvfvlzIzQP1IOu7t8crFy2rwkJX77dhW32BQBb8z 5PFrMHCsOYgrWl6E+bOonqrwUgoax87xhN/L9oZ0rR90F7FKIWw1+ccEDB0OKWY9Tr1h xrn05ANvuuAYsvpkZ+/uOXn9i290d6AXB2QV+exyld6a9ncwky7Y4AnRHcA6JNqQF6xM 69mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=33ybabbtg+WNxIsnCR3CY6rrzFLfxwl0lLxBRV1J/Wg=; b=KR/msniTECQGPpU3YfsEkFdy6KFZGPNBtU/8KPzCM2DXZjAPKGHZsmqSEsGXg1JMxA h3Ej2mr1ghdWcaIEIhGcl6LGKFQb3dOScgYqzVN6XwP99ZDSBoW6CDqKzDBzVy2XSKHs /OGePMCIhcc3aSeVGPtAMAxeHHEWfD+qUv8hOuUg7yX84No2qw/Jb9MQZM5UdnZ/ngV/ CzR4LzcgDiKbkXS7BhLYWcbu45OANql9eyQ5lVqD2xy4OcpxiZYfkbmatnfc8a3/VYBW nuFEZP9cKVP/fZg36n8i+wLsPqCbl0Ruo9YBcz23O6NyZS1VCGc0cfY51UvOAvYKYrdk Show== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MN6zvA84; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f35si3452204eda.415.2019.09.18.06.54.11; Wed, 18 Sep 2019 06:54:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MN6zvA84; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728546AbfIRNtr (ORCPT + 99 others); Wed, 18 Sep 2019 09:49:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:52340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726659AbfIRNtr (ORCPT ); Wed, 18 Sep 2019 09:49:47 -0400 Received: from mail-yw1-f47.google.com (mail-yw1-f47.google.com [209.85.161.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF0C321920; Wed, 18 Sep 2019 13:49:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568814585; bh=Vsir7F3Rw0yN2oG3BxCXE+fvnqJZovYT8xzQgG4Purk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MN6zvA84e1GAQzDF8Oc7KorTjwkfX8QhfTlV/yE89YGnvwWTCGc+sZiyx/Cd1wOXW 88i5Lif6ocTrKz0x4e/qziBndrZ8KfvrmDcYiFeunXLidgzYYY9Y4XgAJgMbrfpLnd RywIv4FoZQGnLOZZNn62evPeLTXYCZsAF/6EsZP8= Received: by mail-yw1-f47.google.com with SMTP id s6so2490039ywe.5; Wed, 18 Sep 2019 06:49:45 -0700 (PDT) X-Gm-Message-State: APjAAAXdAeFYJAy1K/CCI8GZjLjEwtZugQD2I2bo0vymfyDUPEoQNUNE ZojVbJtR2VFDJgzXsQPYDOSwd9aG97LZbD0IGA== X-Received: by 2002:a0d:ddc9:: with SMTP id g192mr3041978ywe.281.1568814584947; Wed, 18 Sep 2019 06:49:44 -0700 (PDT) MIME-Version: 1.0 References: <20190917111413.22711-1-m.falkowski@samsung.com> <20190917120452.28135-1-m.falkowski@samsung.com> <40f56f61-a1db-a1a2-262e-1f4c771481e1@samsung.com> In-Reply-To: <40f56f61-a1db-a1a2-262e-1f4c771481e1@samsung.com> From: Rob Herring Date: Wed, 18 Sep 2019 08:49:33 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/2] dt-bindings: sound: Convert Samsung I2S controller to dt-schema To: Maciej Falkowski Cc: Linux-ALSA , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , linux-samsung-soc , Krzysztof Kozlowski , Sangbeom Kim , Sylwester Nawrocki , Liam Girdwood , Mark Brown , Mark Rutland , Andrzej Hajda , Marek Szyprowski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 18, 2019 at 5:08 AM Maciej Falkowski wrote: > > > On 9/17/19 3:05 PM, Rob Herring wrote: > > > On Tue, Sep 17, 2019 at 7:05 AM Maciej Falkowski > > wrote: > >> Convert Samsung I2S controller to newer dt-schema format. > >> > >> Signed-off-by: Maciej Falkowski > >> Signed-off-by: Marek Szyprowski > >> --- > >> v2: > >> - Added missing Signed-off-by certificate > >> --- > >> .../devicetree/bindings/sound/samsung-i2s.txt | 84 ------------- > >> .../bindings/sound/samsung-i2s.yaml | 119 ++++++++++++++++++ > >> 2 files changed, 119 insertions(+), 84 deletions(-) > >> delete mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt > >> create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.yaml > >> diff --git a/Documentation/devicetree/bindings/sound/samsung-i2s.yaml b/Documentation/devicetree/bindings/sound/samsung-i2s.yaml > >> new file mode 100644 > >> index 000000000000..59dc76035cb4 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/sound/samsung-i2s.yaml > >> @@ -0,0 +1,119 @@ > >> +# SPDX-License-Identifier: GPL-2.0 > >> +%YAML 1.2 > >> +--- > >> +$id: http://devicetree.org/schemas/sound/samsung-i2s.yaml# > >> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >> + > >> +title: Samsung SoC I2S controller > >> + > >> +maintainers: > >> + - Krzysztof Kozlowski > >> + - Sangbeom Kim > >> + - Sylwester Nawrocki > >> + > >> +properties: > >> + compatible: > >> + description: | > >> + samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. > >> + > >> + samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with > >> + secondary fifo, s/w reset control and internal mux for root clk src. > >> + > >> + samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for > >> + playback, stereo channel capture, secondary fifo using internal > >> + or external dma, s/w reset control, internal mux for root clk src > >> + and 7.1 channel TDM support for playback. TDM (Time division multiplexing) > >> + is to allow transfer of multiple channel audio data on single data line. > >> + > >> + samsung,exynos7-i2s: with all the available features of exynos5 i2s. > >> + > >> + exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo > >> + with only external dma and more no.of root clk sampling frequencies. > >> + > >> + samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports > >> + stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with > >> + slightly modified bit offsets. > >> + enum: > >> + - "samsung,s3c6410-i2s" > >> + - "samsung,s5pv210-i2s" > >> + - "samsung,exynos5420-i2s" > >> + - "samsung,exynos7-i2s" > >> + - "samsung,exynos7-i2s1" > > No need for quotes here. > > > >> + > >> + reg: > >> + maxItems: 1 > >> + > >> + dmas: > >> + description: list of DMA controller phandle and DMA request line ordered pairs. > > How many? > > Hi Rob, > > I have one problem with determining size of dmas. > > It seems that there are only two options for dmas: tx, rx or tx, rx, tx-sec. > > It looks like minItems should be two and maxItems should be three. > > However, some of bindings have different definition of dmas. > > When there is: > > dmas = <&pdma0 10 > &pdma0 9 > &pdma0 8>; > > the number of Items for dmas is one, > > when there is: > > dmas = <&pdma0 10>, > <&pdma0 9>, > <&pdma0 8>; > > the number of Items is three. > > Both of these are equal from perspective of dtc, > > however from schema point of view, they have different size. > > > What is a proper solution to this kind of problem? The solution is writing things in the latter form. I have a script to convert a bunch of these. I need to coordinate doing that at the end of a merge window. Rob