From patchwork Wed Sep 1 09:18:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12468791 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,URIBL_BLOCKED,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 B5472C432BE for ; Wed, 1 Sep 2021 09:21:24 +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 D5C1660238 for ; Wed, 1 Sep 2021 09:21:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D5C1660238 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-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 53DCB175A; Wed, 1 Sep 2021 11:20:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 53DCB175A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1630488082; bh=M5BtFuH8jccDsee25CQGs/U/Q3Luy+V/iW7g5FKGScY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FFHf6eVegH4Q5YGOBuWEqiNi/S36LGG4ZQRLjENageOcUI0D6BUmNuSrRAY3n+8A9 PWwtMX35Hqw+cCAtj3mXpZyJgrQ3ZpPs9pUaT/PsIicSGBg9LUEM+ToHXnwYtrFBJQ aT+XIEVu0SuA9RbJbAjPiS2NeTClbAUw5csSxgqI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 53BD3F804F1; Wed, 1 Sep 2021 11:19:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3533CF804F2; Wed, 1 Sep 2021 11:19:31 +0200 (CEST) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 31DA8F80256 for ; Wed, 1 Sep 2021 11:19:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 31DA8F80256 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="baojiu4A"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="RB4TrP19" Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id BD6AF580B22; Wed, 1 Sep 2021 05:19:03 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 01 Sep 2021 05:19:03 -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=2Xz3Y6D/gyY7C tqe9aITkYRRiC0YF/N0mmFuOUDcmxA=; b=baojiu4AXHb1/BOJ3XlZGTejFS3Rc xs14ADrURj+MxS57S2SkW4OR6iHUE8ohOiq3HRldTwxc+KAuG7IPHCxs5EZWJ7YJ hDfZSvl4XenH1mi42NRPi2PMME6u+1xcbqR3V3nZB3c/ZWYdJn3XmQhdjcZT/U/x Ukt4YwdJVa4QiOSVwHYS7GfJvSafks+DRoBLOcYVifWZlB38tamRhi0sJ6LZGIl9 Df6v9WE6L7uK/wQ+1GhyuvYCoDYSiFKZs6KOWZoDvYZf4eMvxDwJv12fa4SGccQz plw/TBWVBv6J4lX+PNAt+u78gLsM5YMKMLrdQPavgFL3pNe0xSYjvnx7A== 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=2Xz3Y6D/gyY7Ctqe9aITkYRRiC0YF/N0mmFuOUDcmxA=; b=RB4TrP19 X5CzSK6LVt2FcwuDJ4ulKIk/ToFgqI2iMk8ir97ALJG6VbF9+Jk+BUK6Jr9n+s5Z NUZfHQk39EAoX7VD+lW8u7Th0Xg8G/WBdAuHImD34YGdjZG/abvHiJidIQji6LsB eOXWb8PITc5SmftKdtte9eajoCLzjQbOl4W5K9+gqHabM+LVbikixO7bHgpo1BOP F85Qkc4qi13n05zhy7WroFknoORv5M68Incxz5lKrKX8XcY/Gv50SfXh7DIvZglx e9LSfAdk6eEII1vtEp5satg371ucgQZhoGGDo2/8mRuDSRlGt6lJtiyHlTjBt5PA NGPWrMzulRv0Zw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvfedgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne govehorghsthgrlhdqhfeguddvqddtvdculdduhedtmdenucfjughrpefhvffufffkofgj fhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgvucftihhprghrugcuoehmrg igihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtthgvrhhnpeevjeeijedtvefg fffgjeeugffguedtleetkeegteeufedtuddttdfgfffhgfeuffenucffohhmrghinhepug gvvhhitggvthhrvggvrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Sep 2021 05:19:02 -0400 (EDT) From: Maxime Ripard To: devicetree@vger.kernel.org, Rob Herring , Frank Rowand , Chen-Yu Tsai , Maxime Ripard , =?utf-8?q?Jernej_=C5=A0krabec?= Subject: [PATCH v2 04/52] ASoC: dt-bindings: Convert Simple Amplifier binding to a schema Date: Wed, 1 Sep 2021 11:18:04 +0200 Message-Id: <20210901091852.479202-5-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210901091852.479202-1-maxime@cerno.tech> References: <20210901091852.479202-1-maxime@cerno.tech> MIME-Version: 1.0 Cc: Rob Herring , 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 Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- .../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>; + }; + +...