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: 483361 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 37821C636CA for ; Wed, 21 Jul 2021 14:06:01 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B0B9A6124B for ; Wed, 21 Jul 2021 14:06:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0B9A6124B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BC1E316F7; Wed, 21 Jul 2021 16:05:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BC1E316F7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1626876358; bh=Furpxcw/8zEOx332vF6MNwqpN8YKUoMWvNQznMGnC5g=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PERF9Qw6F39CdOVe0WYG3N9pv2JfJ+a+GepPjfP+fesJGtEU8/Yi5OYLlKLOAAtu8 ibNOd64dYrsYttk09N3jpBS/RwBy/VrUzp3VXpp28rV6YOz8T0tumowBL1NCHX9TBT bt5arfoW6K/9rPwcP631ke7HF3pv8ltNufEWs7MU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5F7EDF804DA; Wed, 21 Jul 2021 16:04:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C05EDF804DF; Wed, 21 Jul 2021 16:04:40 +0200 (CEST) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E6886F804AF for ; Wed, 21 Jul 2021 16:04:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E6886F804AF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="HvM5/QR/"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="drgG6S4w" 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 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 Cc: alsa-devel@alsa-project.org, Samuel Holland , Liam Girdwood , linux-sunxi@googlegroups.com, Mark Brown , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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"; + }; + +...