From patchwork Wed Jul 21 14:03:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 483951 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 72EBDC636C9 for ; Wed, 21 Jul 2021 14:06:36 +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 EE84D61249 for ; Wed, 21 Jul 2021 14:06:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE84D61249 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 3376416EC; Wed, 21 Jul 2021 16:05:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3376416EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1626876394; bh=G4xkuJJ0plOPX9nytIMNMLUZYAonWK1isYZ3lJChha0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DgZw/giZFvDI/5swv3sNJ1dwISd40FqGbIsAZMAf+MBfqKvEDYKRJg8Hw8WpQafBY 9zqqRm+UD6nTh7q6/Y9gs8QyO/1WnWG2ysEI8gVZu3Yd5lTqipPKwMtDEOgYI4QONq MUtBd1ofSQpwRDxDNm/6ktqyD7b1tM5X8Lzzolfo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F2FBFF804E2; Wed, 21 Jul 2021 16:04:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B0D60F804DF; Wed, 21 Jul 2021 16:04:41 +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 E6AEBF804BD for ; Wed, 21 Jul 2021 16:04:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E6AEBF804BD Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="H+VsCVyp"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Z3YkWzlc" Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 33761580482; Wed, 21 Jul 2021 10:04:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 21 Jul 2021 10:04:38 -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=yaFAahpcJkLP9 c9IO8blHHGww65bHSmpbQ9yOfpm/+s=; b=H+VsCVypLV7c5oEbJ+xaM67kgTtg4 cDZkj+SmEO/WPYK+VNnZcCSfmeKCPz/DOVN2HQ/Nn/i/biTFKsFMShlEhHMPPIM1 Vz4IUj9QjDdLzkBrpThwiqlGBmCMVLK0QY0sUxtdItq7ZOKRYFtBksXC0LrAsNkk tmHkVV6XQ+KStUyeH4Puag0ETaZ0Unwm9hS1Y7aych7rT6JfrHLOpfPCJHMvfan0 Im+DTtJ0rUehJo47v6KnUKta5J/ZwCZREwg1QV3RB5HvhQ0dUsD5YWm8jVHMVi/y 9CTYRPuYZA8Mvfp5gDxSdkniwvE9wwsEO6FuWrfTIa36S4A3kW6swgZiw== 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=yaFAahpcJkLP9c9IO8blHHGww65bHSmpbQ9yOfpm/+s=; b=Z3YkWzlc m71HQf3Q5pXokZVSEWhjF2pvlodE4DVNjWUuUOChtMPu42u4XUG8zvWD4jb7dsmX fery/8HwIRvfaFAqFyhG4e29wj4q2auLbGxzQyraGgGvaxmw2B0IwZD2cO1qd/c7 OjqCy688GBFN10Ti4OW4ZNNT41hO88bh8/Fcfh2+6+qWCrJzwtBLiicvbY8rcg7D dHo4eKKlFz56aOSwwQ/3QpKlPWu5RCIigLVeazqA0axANMC5xQmeaHmJQMJAZcn3 Ge/XpCNTYjAJKYJOH/8rGiZ3jAvxOEwlXKOZOAi2NtLmu6XY0HNJIuhRsGmpLpUN 9CBAKjSseHIABA== 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:37 -0400 (EDT) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , Jernej Skrabec , devicetree@vger.kernel.org, Rob Herring , Frank Rowand Subject: [PATCH 04/54] ASoC: dt-bindings: Convert Simple Amplifier binding to a schema Date: Wed, 21 Jul 2021 16:03:34 +0200 Message-Id: <20210721140424.725744-5-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, Liam Girdwood , linux-sunxi@googlegroups.com, Mark Brown , linux-arm-kernel@lists.infradead.org, Jerome Brunet 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" Simple audio amplifiers 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. Cc: alsa-devel@alsa-project.org Cc: Jerome Brunet Cc: Liam Girdwood Cc: Mark Brown Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring --- .../bindings/sound/simple-amplifier.txt | 17 ------- .../sound/simple-audio-amplifier.yaml | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 17 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/simple-amplifier.txt create mode 100644 Documentation/devicetree/bindings/sound/simple-audio-amplifier.yaml diff --git a/Documentation/devicetree/bindings/sound/simple-amplifier.txt b/Documentation/devicetree/bindings/sound/simple-amplifier.txt deleted file mode 100644 index b1b097cc9b68..000000000000 --- a/Documentation/devicetree/bindings/sound/simple-amplifier.txt +++ /dev/null @@ -1,17 +0,0 @@ -Simple Amplifier Audio Driver - -Required properties: -- compatible : "dioo,dio2125" or "simple-audio-amplifier" - -Optional properties: -- enable-gpios : the gpio connected to the enable pin of the simple amplifier -- VCC-supply : power supply for the device, as covered - in Documentation/devicetree/bindings/regulator/regulator.txt - -Example: - -amp: analog-amplifier { - compatible = "simple-audio-amplifier"; - VCC-supply = <®ulator>; - enable-gpios = <&gpio GPIOH_3 0>; -}; diff --git a/Documentation/devicetree/bindings/sound/simple-audio-amplifier.yaml b/Documentation/devicetree/bindings/sound/simple-audio-amplifier.yaml new file mode 100644 index 000000000000..26379377a7ac --- /dev/null +++ b/Documentation/devicetree/bindings/sound/simple-audio-amplifier.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/simple-audio-amplifier.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Simple Audio Amplifier Device Tree Bindings + +maintainers: + - Jerome Brunet + +properties: + compatible: + enum: + - dioo,dio2125 + - simple-audio-amplifier + + enable-gpios: + maxItems: 1 + + VCC-supply: + description: > + power supply for the device + + sound-name-prefix: + $ref: /schemas/types.yaml#/definitions/string + description: > + See ./name-prefix.txt + +required: + - compatible + +additionalProperties: false + +examples: + - | + #include + + analog-amplifier { + compatible = "simple-audio-amplifier"; + VCC-supply = <®ulator>; + enable-gpios = <&gpio GPIOH_3 0>; + }; + +...