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: 1154407 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="oWwZEFNH"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46JQch1GkWz9sBF for ; Wed, 28 Aug 2019 22:52:20 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726341AbfH1MwT (ORCPT ); Wed, 28 Aug 2019 08:52:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:54094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726270AbfH1MwT (ORCPT ); Wed, 28 Aug 2019 08:52:19 -0400 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 Cc: alsa-devel@alsa-project.org, Chen-Yu Tsai , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 4/5] ASoC: dt-bindings: Convert Allwinner A23 analog codec to a schema 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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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"; - }; -};