From patchwork Wed Jul 21 14:03:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 484103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28DC8C636CE for ; Wed, 21 Jul 2021 14:04:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 108816127C for ; Wed, 21 Jul 2021 14:04:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238931AbhGUNYB (ORCPT ); Wed, 21 Jul 2021 09:24:01 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:42533 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238948AbhGUNX5 (ORCPT ); Wed, 21 Jul 2021 09:23:57 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 292DD580490; Wed, 21 Jul 2021 10:04:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 21 Jul 2021 10:04:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=Zgr8SkjVXTrjP dHj3+VD3ABb0EW3DnHyVxtkzD126Ms=; b=HvM5/QR/XLaRiqW/Oa44U3Lcg0ZOo ks4S0jmu3Js4prSqj6992NNjB8FFMbXnqwXe7qg3a7V4goTfT07YplQ1SqNXXkBN +kmPU+gqWrv/pJZ456dss2K1lNCBvedxSvOEl/l93ATxjpmkpm+IX/pgAq4ABZsR WLsbbeXKyglZEeHt7rsdIbJMsen2cQBZ2NGF5EEGRPNrptZ8T1JrXOuh06hIHgw8 KBsTG3xKHkFfEQq1dj7fEyIH5ie3NNOhfkv5Sn7leiOIxrqN/IddugggwU9Fj9uh Afc8xZ2GoyZhcQsi50mImlsr46B5SyK9Piust61/XKwpPRKe/U679LjIg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=Zgr8SkjVXTrjPdHj3+VD3ABb0EW3DnHyVxtkzD126Ms=; b=drgG6S4w t6w62hRF0ucNLlJHZbOxv6Q5007oCdB7qWAGH+dOmrSn+x7M18br8JakaNaD833l TATlebDmR6D7ODvfe90ECfcAw021Gsme6hkgJwcPtfAI044KPNgKxmHBgQ+jSjcS GOF1Ru4EG4xChV97dWWWS+mH1FogjsF8Ap1euEu0JcGvHRXTDsZA/YeS061QxNIH n1mccHruzcxh+QIsRWhmz56+NLVWeNXYixlvJ77WT572rOeqZ3NPSX1iWc2PINAB LDwhhK7GXFvDrRc3tMyhC70IElFN1UoTYF5W0YmdAt1kOMBOktXlK11fHZ1d0NqC r6QKU1TfsjMokw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfeeggdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog evohgrshhtrghlqdfhgeduvddqtddvucdludehtddmnecujfgurhephffvufffkffojghf ggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhmvgcutfhiphgrrhguuceomhgrgi himhgvsegtvghrnhhordhtvggthheqnecuggftrfgrthhtvghrnhepveejieejtdevgfff gfejuefggfeutdelteekgeetueeftddutddtgfffhffgueffnecuffhomhgrihhnpeguvg hvihgtvghtrhgvvgdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Jul 2021 10:04:33 -0400 (EDT) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , Jernej Skrabec , devicetree@vger.kernel.org, Rob Herring , Frank Rowand Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, alsa-devel@alsa-project.org, Liam Girdwood , Mark Brown , Samuel Holland Subject: [PATCH 02/54] ASoC: dt-bindings: Convert Bluetooth SCO Link binding to a schema Date: Wed, 21 Jul 2021 16:03:32 +0200 Message-Id: <20210721140424.725744-3-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210721140424.725744-1-maxime@cerno.tech> References: <20210721140424.725744-1-maxime@cerno.tech> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Bluetooth SCO Link are supported by Linux with a matching device tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema. The value expected for #sound-dai-cells wasn't documented though, and the users were inconsistent. The example didn't list it, and across the 4 users we have in tree: - 1 had a cells value of 1, but using only 0 as argument - 1 had a cells value of 0, - 2 didn't have this property at all, behaving as if it was 0, It seems like the consensus seems to be that it should be 0, so let's enforce it. Cc: alsa-devel@alsa-project.org Cc: devicetree@vger.kernel.org Cc: Liam Girdwood Cc: Mark Brown Cc: Samuel Holland Signed-off-by: Maxime Ripard --- .../devicetree/bindings/sound/bt-sco.txt | 13 ------- .../bindings/sound/linux,bt-sco.yaml | 34 +++++++++++++++++++ 2 files changed, 34 insertions(+), 13 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/bt-sco.txt create mode 100644 Documentation/devicetree/bindings/sound/linux,bt-sco.yaml diff --git a/Documentation/devicetree/bindings/sound/bt-sco.txt b/Documentation/devicetree/bindings/sound/bt-sco.txt deleted file mode 100644 index 641edf75e184..000000000000 --- a/Documentation/devicetree/bindings/sound/bt-sco.txt +++ /dev/null @@ -1,13 +0,0 @@ -Bluetooth-SCO audio CODEC - -This device support generic Bluetooth SCO link. - -Required properties: - - - compatible : "delta,dfbmcs320" or "linux,bt-sco" - -Example: - -codec: bt_sco { - compatible = "delta,dfbmcs320"; -}; diff --git a/Documentation/devicetree/bindings/sound/linux,bt-sco.yaml b/Documentation/devicetree/bindings/sound/linux,bt-sco.yaml new file mode 100644 index 000000000000..334b508205cd --- /dev/null +++ b/Documentation/devicetree/bindings/sound/linux,bt-sco.yaml @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/linux,bt-sco.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bluetooth SCO Audio Codec Device Tree Bindings + +maintainers: + - Mark Brown + +properties: + '#sound-dai-cells': + const: 0 + + compatible: + enum: + - delta,dfbmcs320 + - linux,bt-sco + +required: + - '#sound-dai-cells' + - compatible + +additionalProperties: false + +examples: + - | + codec { + #sound-dai-cells = <0>; + compatible = "linux,bt-sco"; + }; + +...