Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp537035pxb; Thu, 31 Mar 2022 11:01:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS0vJHwJa5A4kYtsUMO+A/S56cvpBb4Et3rzGSHjkGNZpasQelGPdbZmPtXcH/7N+FtXmR X-Received: by 2002:a05:6808:2023:b0:2da:5b6a:a526 with SMTP id q35-20020a056808202300b002da5b6aa526mr3197314oiw.264.1648749706610; Thu, 31 Mar 2022 11:01:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648749706; cv=none; d=google.com; s=arc-20160816; b=lZTIwjoQDyLBgfRrJFTcoAdZVwS4ASyWjdmfUsRoaWZGoBgbX2P9vloHoays6bdusD z730H1Ubn32dg9oaKlCtx3fEe5zixxmKgfh+MylnC9R7jfm2kdl6vUNurJIL4KbXk7FK N08LqGIuGjAQ45dQN/PILKITFjoXBk6LUft1kIhsUizLmgRv9+b3tcI0xQySrKw29brL NPyVKaFSq1Bz0zHUL3v+9PnrUzL7Y/vj79PBSxRi6rmLwOO/3eccqcFei683EvlZvTwM sb0QQREkK4MUURvJZGogLSZyJedXqEoeJFYSPsiUiHdxI5LDNwJrART8tCDqXVdBYFAX V35A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=w0KfXsbzeIrNHrKKkv2V0cx1OieJGFoPF6Fv17J0LVQ=; b=qwAFXCPepfQtIqwrcRiFrF/ibdNJahpjLIIQQ60NfrL2jZ/esYp3yTcfHssdLEiHlX xsfQ9t+kSUE5RqE+OjyCDYEMIybk5EnHrtlSqSWWV3eB3bliq28XlVzDPY2oCX91YjrL K39zKxwwO27j11RerbAsXGgUYSI52WRUr6CfcIGA+IjkduGF50e/+BlqDl4L5zlgILs0 gs4V+pm71r5wpyW3zfuIfgP7mysBdohOFCTAr17elNLJVGu/fIDh+hP+C9m9pD77Hugh IBmobavYxnW+ZaU9tU4k9sZybljPbOljZsWJnd/6les2ooZcC/OUIF6O0w8az3/zxPGF M96w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WtIod8sS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h15-20020a9d798f000000b005cb2fc137b7si79944otm.51.2022.03.31.11.01.32; Thu, 31 Mar 2022 11:01:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WtIod8sS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232618AbiCaITh (ORCPT + 99 others); Thu, 31 Mar 2022 04:19:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232246AbiCaITf (ORCPT ); Thu, 31 Mar 2022 04:19:35 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCAA2198967 for ; Thu, 31 Mar 2022 01:17:48 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id pv16so46493205ejb.0 for ; Thu, 31 Mar 2022 01:17:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=w0KfXsbzeIrNHrKKkv2V0cx1OieJGFoPF6Fv17J0LVQ=; b=WtIod8sS7uO4FK2nN4pFY1fKiCl8AVS4P46EYgiJBWtzjXB89obVkYTAoutQP5Ldr3 MopnPh7Dsn6b8IhE+ayXXRhiHCK0+efS0bzuQsIQbVm73RoHh+LAxAk6gWJlgOwUX0vT 3HwaVfyQjnKJWSpGN506V+BrSlcaCcdenoEsbNOW/ZP95jcW30ehgy58Q1G/Q4/ZRji8 9D0ExzEwECrI4mHzcV7DVMDq9NHVsVOR8aHaPgZKA45dQvHOS6GnXH65FWpNTlCtEzM7 zhI7noAytn7J1de7BEqwAYzi0Zv+lOrIRQPgn9H5sR2ibbNfm8K5UXc2w82GGxRCLabD WZlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=w0KfXsbzeIrNHrKKkv2V0cx1OieJGFoPF6Fv17J0LVQ=; b=pwUGFb9N8t0X3rTkEK+AGVYKlgskbAsaNup7dwBXUZMn0g/LGroA2ORtXU5yM3+Kle zmH6hNQro/RAUKV9VGc2zesgF8MpKgJstbwZ03n6aB7OmRfq+2LOjAQ5Ed0ZiYjFIKi7 Fs1v7m8hggDgg1SqQK7aXEkZdjsfr1Jc8n5iFz0YJ5D3amk4oZhToTVdjurJ6+zauuzh p5Rqhy+WW/AVsa2dhSJ2KcbUbKPzvpTDnQ24/jvGaA6ebCciKr4scxO/vkp3dAk21P5V qNvlxU1qzKXKYaphyebdsMp23TsDDBY984fskAo+hk2QuyMU00ZzyuH8utaA0wBfMFw4 cFZw== X-Gm-Message-State: AOAM53188G7NCMT2jBz3ocwvQf3g0Uc3jV1t6hRBWFD8vv93sMJcqrmH zTc0HVTdq6kzItfeLOKI8GzRec9uG+nqQzA2 X-Received: by 2002:a17:906:3ec7:b0:6d6:e52b:b with SMTP id d7-20020a1709063ec700b006d6e52b000bmr4040298ejj.521.1648714667248; Thu, 31 Mar 2022 01:17:47 -0700 (PDT) Received: from [192.168.0.165] (xdsl-188-155-201-27.adslplus.ch. [188.155.201.27]) by smtp.gmail.com with ESMTPSA id m20-20020a056402431400b00419315cc3e2sm11037633edc.61.2022.03.31.01.17.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Mar 2022 01:17:46 -0700 (PDT) Message-ID: <0f7677ba-bffa-7ec6-7c74-3fad84a1d2c5@linaro.org> Date: Thu, 31 Mar 2022 10:17:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [RFC PATCH 1/5] dt-bindings: sound: Add Apple Macs sound system Content-Language: en-US To: =?UTF-8?Q?Martin_Povi=c5=a1er?= Cc: =?UTF-8?Q?Martin_Povi=c5=a1er?= , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Kettenis , Hector Martin , Sven Peter References: <20220331000449.41062-1-povik+lin@cutebit.org> <20220331000449.41062-2-povik+lin@cutebit.org> <9e3ba11c-d179-c229-fb7c-bf5611a15b1b@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 31/03/2022 08:57, Martin Povišer wrote: > >> On 31. 3. 2022, at 8:43, Krzysztof Kozlowski wrote: >> >> On 31/03/2022 02:04, Martin Povišer wrote: >>> Add binding for Apple Silicon Macs' machine-level sound system. >>> >>> Signed-off-by: Martin Povišer >>> --- >>> .../bindings/sound/apple,macaudio.yaml | 103 ++++++++++++++++++ >>> 1 file changed, 103 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/sound/apple,macaudio.yaml >>> >> >> Commit title does not match subsystem. > > Tell more please. I don’t see it. git log --oneline -- Documentation/devicetree/bindings/sound/ Mark expects "ASoC: dt-bindings:" > >> >>> diff --git a/Documentation/devicetree/bindings/sound/apple,macaudio.yaml b/Documentation/devicetree/bindings/sound/apple,macaudio.yaml >>> new file mode 100644 >>> index 000000000000..a6380e4bdd1a >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/sound/apple,macaudio.yaml >>> @@ -0,0 +1,103 @@ >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/sound/apple,macaudio.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: Apple Silicon Macs integrated sound system >>> + >>> +maintainers: >>> + - Martin Povišer >>> + >> >> Add description. >> >>> +definitions: >> >> This does not make code more readable. > > Are you sure? It prevents duplication later on for ‘codec' and ‘cpu’. That's true, but duplication is small, unless you think this will be extended. I guess it is a trade-off, but so far for few lines and just two users of such definition, I would prefer to duplicate. I don't have strong opinion, though. > >> >>> + dai: >>> + type: object >>> + properties: >>> + sound-dai: true >>> + required: >>> + - sound-dai >>> + >>> +properties: >>> + compatible: >>> + items: >>> + - enum: >>> + - apple,j274-macaudio >>> + - apple,j293-macaudio >>> + - apple,j314-macaudio >>> + - const: apple,macaudio >> >> Open example-schema.yaml and look at formatting plus general coding >> style. You miss line breaks making it unreadable. >> >>> + "#address-cells": >>> + const: 1 >>> + "#size-cells": >>> + const: 0 >>> + model: >>> + description: | >>> + Model name to use when the sound system is presented to users as a sound card. >>> + $ref: /schemas/types.yaml#/definitions/string >>> + >>> +patternProperties: >>> + "^dai-link(@[0-9a-f]+)?$": >>> + description: | >>> + A DAI link comprising of CPU and CODEC DAI specifiers and supplemental properties. >>> + type: object >>> + properties: >>> + reg: >>> + maxItems: 1 >>> + mclk-fs: >>> + description: | >>> + Forced MCLK/samplerate factor (optional). >> >> Optional is obvious from !required. >> >> Description is different than existing field in simple card. Is this the >> same field or not? > > It is the same. I didn’t want to copy the simple card text because this is optionally BSD, > simple card wasn’t. OK > >> >>> + $ref: /schemas/types.yaml#/definitions/uint32 >>> + link-name: >>> + description: Name for the DAI link to present to users. >>> + $ref: /schemas/types.yaml#/definitions/string >>> + cpu: >>> + $ref: "#/definitions/dai" >>> + codec: >>> + $ref: "#/definitions/dai" >> >> missing maxItems for DAI phandles. > > Well there’s not a maximum. There should be some maximum of supported codecs. Hardware might have such constraints. If really unsure, choose some reasonable (small) amount. It could be later raised, if needed. Best regards, Krzysztof