From patchwork Wed Aug 28 12:52:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 11121479 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3FEF214D5 for ; Thu, 29 Aug 2019 14:40: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 C923423438 for ; Thu, 29 Aug 2019 14:40:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="SWtwnBeL"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="oWwZEFNH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C923423438 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 F2D3516AF; Thu, 29 Aug 2019 16:39:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F2D3516AF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1567089599; bh=SawpWxO7ysqgGfqAD3/dsrb0TbLD29wQsQHxcx8s1U4=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=SWtwnBeL9tDYXIGkpnwr6xO4VYly8vtT4iTUX+MhvRmwq9qVEQ5YxAjgnoWtFEAsN Y3TwqcLDre4UTagBljG4dVkl3/ZSsXcebn/5OzLyi03eQpEjYKsgETEjWLsjesMfet f536t8DmreT+/hOzOnZvJEHJBxywK8wK+U0xJ7Q4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 652B9F8976C; Wed, 28 Aug 2019 14:52:30 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id CFA02F89769; Wed, 28 Aug 2019 14:52:24 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,PRX_BODY_26,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 01E22F89765 for ; Wed, 28 Aug 2019 14:52:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 01E22F89765 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="oWwZEFNH" Received: from localhost (lfbn-1-17395-211.w86-250.abo.wanadoo.fr [86.250.200.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F0C7B22CF5; Wed, 28 Aug 2019 12:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566996738; bh=3e7gHni99nwSUnp2CZ88bKew4+kna+vhgl/WHKgEs/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oWwZEFNHKzB7hvnP0fqdesJCgvh+YMMtWrxDECi9Yb3GRj8pR7+qvNqZ8xKYBRdkA p9lS/u+1cQXYQyMDEdyAjM9hcWpeQXoA3LEgWKsCEHlCm/ng+ppEbrJxgKxJfuoJxX qzC1HOGvD8kGZlEqhh7viTQiIAXGlIzG8PGtiTdQ= From: Maxime Ripard To: Mark Brown , Liam Girdwood , Mark Rutland , Rob Herring , Frank Rowand Date: Wed, 28 Aug 2019 14:52:08 +0200 Message-Id: <20190828125209.28173-4-mripard@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190828125209.28173-1-mripard@kernel.org> References: <20190828125209.28173-1-mripard@kernel.org> MIME-Version: 1.0 Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Chen-Yu Tsai , Maxime Ripard Subject: [alsa-devel] [PATCH v2 4/5] ASoC: dt-bindings: Convert Allwinner A23 analog codec to a schema 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" From: Maxime Ripard The Allwinner A23 SoC and later have an embedded audio codec that uses a separate controller to drive its analog part, which is supported in 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 controller over to a YAML schemas. Signed-off-by: Maxime Ripard --- Changes from v1: - Fix subject prefix --- .../allwinner,sun8i-a23-codec-analog.yaml | 38 +++++++++++++++++++ .../bindings/sound/sun8i-codec-analog.txt | 17 --------- 2 files changed, 38 insertions(+), 17 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/allwinner,sun8i-a23-codec-analog.yaml delete mode 100644 Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun8i-a23-codec-analog.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun8i-a23-codec-analog.yaml new file mode 100644 index 000000000000..832779389cbd --- /dev/null +++ b/Documentation/devicetree/bindings/sound/allwinner,sun8i-a23-codec-analog.yaml @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/allwinner,sun8i-a23-codec-analog.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner A23 Analog Codec Device Tree Bindings + +maintainers: + - Chen-Yu Tsai + - Maxime Ripard + +properties: + compatible: + oneOf: + # FIXME: This is documented in the PRCM binding, but needs to be + # migrated here at some point + # - const: allwinner,sun8i-a23-codec-analog + - const: allwinner,sun8i-h3-codec-analog + - const: allwinner,sun8i-v3s-codec-analog + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + codec_analog: codec-analog@1f015c0 { + compatible = "allwinner,sun8i-h3-codec-analog"; + reg = <0x01f015c0 0x4>; + }; + +... diff --git a/Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt b/Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt deleted file mode 100644 index 07356758bd91..000000000000 --- a/Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt +++ /dev/null @@ -1,17 +0,0 @@ -* Allwinner Codec Analog Controls - -Required properties: -- compatible: must be one of the following compatibles: - - "allwinner,sun8i-a23-codec-analog" - - "allwinner,sun8i-h3-codec-analog" - - "allwinner,sun8i-v3s-codec-analog" - -Required properties if not a sub-node of the PRCM node: -- reg: must contain the registers location and length - -Example: -prcm: prcm@1f01400 { - codec_analog: codec-analog { - compatible = "allwinner,sun8i-a23-codec-analog"; - }; -};