From patchwork Mon Sep 19 11:12:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Astrid Rost X-Patchwork-Id: 12980300 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5301FECAAD3 for ; Mon, 19 Sep 2022 11:14:54 +0000 (UTC) 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 37EE215C1; Mon, 19 Sep 2022 13:14:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 37EE215C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663586092; bh=g8BvxP5XY+ERiIwo6cS/Tvlfw/qayFPLZvltSy+tULU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MnIRamjBlAYxQAmeF0juXj7KY2yy6qXfjER4uqZ/qjn7BVakPiYA6yfwBOtrdxevP kewNgO1Ew2uE8BqlWwIQ5btxaZNdQZZ7hmjssnlTCbqtO0h7d7HllMFLxHcJCC2VWp v8iz5F0vPxNNsscm9wGNoYHSLbt1AqLim5ukkybI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9BE78F8032B; Mon, 19 Sep 2022 13:13:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 752E0F8023A; Mon, 19 Sep 2022 13:13:14 +0200 (CEST) Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A7053F8023A for ; Mon, 19 Sep 2022 13:13:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A7053F8023A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=axis.com header.i=@axis.com header.b="XItKhKmo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1663585985; x=1695121985; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=w8KzUewuszzBRNR3DKM4RdYTDxQmFGm6YO23DI5b+0I=; b=XItKhKmokJcXdGzrwINVVHDjsbMjh3CMYtj7bpwxbVkTgowWWmyw7oI6 ukaodpf5x28Mop27r9dEs71sq0/wPizVKCXnD9wZsGTqtYeE18MLzLCM3 xSGkOrtk9sQTxBgl+FsSZPSyE+wP0YR+O87jwSndCqen0KB0+2LKH7Cx4 eoT1ZDzNpI3oLvtuXtjL1xsvWxBW3LLNppSz4vduZXELyQB5l+Ao2jFRD tLqLH7GYqlfZmD+FDhjyPbjIlc9cXYEKhzSwxxHhMH0aFN85lcM9sUmna 8hW/Bp7OUZn4sUZEo9B2RILnf8Jm3EeICmyC1Z/gaoBKei2C9bqFKR5Nx g==; From: Astrid Rost To: Mark Brown , Liam Girdwood , Krzysztof Kozlowski , Rob Herring , Dylan Reid Subject: [PATCH v3 1/3] dt-bindings: sound: ti,ts3a227e: convert to yaml Date: Mon, 19 Sep 2022 13:12:56 +0200 Message-ID: <20220919111258.3774-2-astrid.rost@axis.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220919111258.3774-1-astrid.rost@axis.com> References: <20220919111258.3774-1-astrid.rost@axis.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Astrid Rost , linux-kernel@vger.kernel.org, kernel@axis.com, Astrid Rost 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" Convert from ts3a227e.txt to yaml. Signed-off-by: Astrid Rost Reviewed-by: Krzysztof Kozlowski --- .../bindings/sound/ti,ts3a227e.yaml | 65 +++++++++++++++++++ .../devicetree/bindings/sound/ts3a227e.txt | 30 --------- 2 files changed, 65 insertions(+), 30 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/ti,ts3a227e.yaml delete mode 100644 Documentation/devicetree/bindings/sound/ts3a227e.txt diff --git a/Documentation/devicetree/bindings/sound/ti,ts3a227e.yaml b/Documentation/devicetree/bindings/sound/ti,ts3a227e.yaml new file mode 100644 index 000000000000..327d204cf957 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ti,ts3a227e.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/ti,ts3a227e.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments TS3A227E + Autonomous Audio Accessory Detection and Configuration Switch + +maintainers: + - Dylan Reid + +description: | + The TS3A227E detect headsets of 3-ring and 4-ring standards and + switches automatically to route the microphone correctly. It also + handles key press detection in accordance with the Android audio + headset specification v1.0. + +properties: + compatible: + enum: + - ti,ts3a227e + + reg: + const: 0x3b + + interrupts: + maxItems: 1 + + ti,micbias: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Intended MICBIAS voltage (datasheet section 9.6.7). + enum: + - 0 # 2.1 V + - 1 # 2.2 V + - 2 # 2.3 V + - 3 # 2.4 V + - 4 # 2.5 V + - 5 # 2.6 V + - 6 # 2.7 V + - 7 # 2.8 V + default: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + codec: audio-controller@3b { + compatible = "ti,ts3a227e"; + reg = <0x3b>; + interrupt-parent = <&gpio1>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/sound/ts3a227e.txt b/Documentation/devicetree/bindings/sound/ts3a227e.txt deleted file mode 100644 index 21ab45bc7e8f..000000000000 --- a/Documentation/devicetree/bindings/sound/ts3a227e.txt +++ /dev/null @@ -1,30 +0,0 @@ -Texas Instruments TS3A227E -Autonomous Audio Accessory Detection and Configuration Switch - -The TS3A227E detect headsets of 3-ring and 4-ring standards and -switches automatically to route the microphone correctly. It also -handles key press detection in accordance with the Android audio -headset specification v1.0. - -Required properties: - - - compatible: Should contain "ti,ts3a227e". - - reg: The i2c address. Should contain <0x3b>. - - interrupts: Interrupt number for /INT pin from the 227e - -Optional properies: - - ti,micbias: Intended MICBIAS voltage (datasheet section 9.6.7). - Select 0/1/2/3/4/5/6/7 to specify MICBIAS voltage - 2.1V/2.2V/2.3V/2.4V/2.5V/2.6V/2.7V/2.8V - Default value is "1" (2.2V). - -Examples: - - i2c { - ts3a227e@3b { - compatible = "ti,ts3a227e"; - reg = <0x3b>; - interrupt-parent = <&gpio>; - interrupts = <3 IRQ_TYPE_LEVEL_LOW>; - }; - };