From mboxrd@z Thu Jan 1 00:00:00 1970 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 6589FC6FA86 for ; Sun, 18 Sep 2022 09:51:50 +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 9248C1F0; Sun, 18 Sep 2022 11:50:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9248C1F0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663494708; bh=iXINPMAkjcf8E5x4KSjqZbIUNxb+Pyo6zpWlEXi04Yk=; h=Date:Subject:To:References:From:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=B7vAksQWR6nlQFxKpptbc6o+vqtGOFLXPWdYKNtETkgRtj1nhj5hMFFF4Ohu5i66e MyU8tsLzOZ21KetWIrK/JQ+7uQSM3pqcqfNNp0gfHpefD9FYlYJ10rgRzmq7tG/HAJ okp18/CYXWumrVgj0kcfJPxlzhr9wFbTyMPq1JgE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 23038F80310; Sun, 18 Sep 2022 11:50:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AAEC6F80134; Sun, 18 Sep 2022 11:50:56 +0200 (CEST) Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A1E68F80134 for ; Sun, 18 Sep 2022 11:50:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A1E68F80134 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Wp0ZjomX" Received: by mail-lf1-x131.google.com with SMTP id s6so31072018lfo.7 for ; Sun, 18 Sep 2022 02:50:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=PKBg5ng7PnWT5G7IkXOVZef3/wyXg4tjFKeAtGbo5Lk=; b=Wp0ZjomX491U2rtytMCDb+CR94gy+1DIlxKK12p7ND8SR/hx3X3hdiRuZ1MbpphJTq txKv40nzT3myoEkSuZB1SCD7vGdILwv6DZ4hzYb4gxbV4wsNef/3Lx435X7KZ3k1YIvH y1EQPXAGFXLS1Q2xdTZJLGMegi4lSAkwQ+UHP9fasg0ftekSOBRryTwXZYncYwsfLJru Nm+ipzZAl93L75RmHQ006JdD2JgzIkpfYFjLjLJQ01dkevVf59iASAz0N5YS9fFD+4uG uUQ7oznjf8vQ+duVO8RWaXxjbVZGU93lGdI8uvCgaJyiwqfxZ1GmxfMwH2DI65MlGw1S 9++g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=PKBg5ng7PnWT5G7IkXOVZef3/wyXg4tjFKeAtGbo5Lk=; b=0zxKsMQS+G4h0z3HCmSulP6ydmjjlT2lIPPlG3XUerJLu3vs5zkOS9U5HgiIg3w+DW G5DlZE7m8xOJO6SYKraQ5l58YfXc6+eshTTOM8tnrDWA6ht+t7+/Lo613FnbxDF5Q+NX oRzIox8XCUEoTs7uQvNsFUKAt9QHOLQnaQMVoUvphi22g2YPtVnHyU+tgOHGVOz9mPWs kuwIq1p9GI/fVD0Boii51BxXuLNTVdRCZ+5pE57Aa+rJoeAd34Hlog1k6Td87nFFYKFb TAROXjYgKqiTQU7r+Obbb/A3fC5boEoIeL2cQIKmVrppYYi87+fGLIMTBL4H14Mj4viE StWA== X-Gm-Message-State: ACrzQf029Lz1UHNtnb/Ca1NQKQXJuo1tBVK7KSL2lW6Jx14Y6rp/OzmA oPHcQNoqWYAxZrIKI5aOjpSl9Q== X-Google-Smtp-Source: AMsMyM5fLqyeOXxhQHdX+OOxELBYD3ckReSg83MxwbqlwSMZaQyVVpAnIOHc9SP/XraIp0pF3FQnyQ== X-Received: by 2002:a19:6b05:0:b0:49f:53b9:abb0 with SMTP id d5-20020a196b05000000b0049f53b9abb0mr3821048lfa.166.1663494648565; Sun, 18 Sep 2022 02:50:48 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id z15-20020a056512308f00b004977e865220sm4574286lfd.55.2022.09.18.02.50.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Sep 2022 02:50:47 -0700 (PDT) Message-ID: Date: Sun, 18 Sep 2022 10:50:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v2 1/3] dt-bindings: sound: ts3a227e: convert to yaml Content-Language: en-US To: Astrid Rost , Mark Brown , Liam Girdwood , Krzysztof Kozlowski , Dylan Reid , Rob Herring References: <20220915113955.22521-1-astrid.rost@axis.com> <20220915113955.22521-2-astrid.rost@axis.com> From: Krzysztof Kozlowski In-Reply-To: <20220915113955.22521-2-astrid.rost@axis.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Astrid Rost , kernel@axis.c, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org 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" On 15/09/2022 12:39, Astrid Rost wrote: > Convert from ts3a227e.txt to yaml. > > Signed-off-by: Astrid Rost Thank you for your patch. There is something to discuss/improve. > --- > .../devicetree/bindings/sound/ts3a227e.txt | 30 -------- > .../devicetree/bindings/sound/ts3a227e.yaml | 69 +++++++++++++++++++ > 2 files changed, 69 insertions(+), 30 deletions(-) > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/ts3a227e.yaml > @@ -0,0 +1,69 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/sound/ts3a227e.yaml#" Filename based on compatible, so ti,ts3a227e.yaml > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" Drop quotes from both lines above. > + > +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: > + description: I2C address of the device. Skip description, it's obvious. > + const: 0x3b > + > + interrupts: > + maxItems: 1 > + description: | > + Interrupt number for /INT pin from the ts3a227e. Skip description > + > + 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: 2 Old bindings said default is 1. It this was intended, please mention in commit msg deviations from pure conversion. > + > +required: > + - compatible > + - reg > + - interrupts > + > +additionalProperties: false > + > +examples: > + - | > + #include This header is not used. > + #include > + i2c0 { Node name just "i2c" > + #address-cells = <1>; > + #size-cells = <0>; > + codec: ts3a227e@3b { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation audio-controller? audio-switch? > + compatible = "ti,ts3a227e"; > + reg = <0x3b>; > + interrupt-parent = <&gpio1>; > + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > + }; > + }; > + > +... Best regards, Krzysztof From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B988C32771 for ; Sun, 18 Sep 2022 09:55:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229929AbiIRJzk (ORCPT ); Sun, 18 Sep 2022 05:55:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbiIRJyd (ORCPT ); Sun, 18 Sep 2022 05:54:33 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDF342983A for ; Sun, 18 Sep 2022 02:51:13 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id a3so30283184lfk.9 for ; Sun, 18 Sep 2022 02:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=PKBg5ng7PnWT5G7IkXOVZef3/wyXg4tjFKeAtGbo5Lk=; b=Wp0ZjomX491U2rtytMCDb+CR94gy+1DIlxKK12p7ND8SR/hx3X3hdiRuZ1MbpphJTq txKv40nzT3myoEkSuZB1SCD7vGdILwv6DZ4hzYb4gxbV4wsNef/3Lx435X7KZ3k1YIvH y1EQPXAGFXLS1Q2xdTZJLGMegi4lSAkwQ+UHP9fasg0ftekSOBRryTwXZYncYwsfLJru Nm+ipzZAl93L75RmHQ006JdD2JgzIkpfYFjLjLJQ01dkevVf59iASAz0N5YS9fFD+4uG uUQ7oznjf8vQ+duVO8RWaXxjbVZGU93lGdI8uvCgaJyiwqfxZ1GmxfMwH2DI65MlGw1S 9++g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=PKBg5ng7PnWT5G7IkXOVZef3/wyXg4tjFKeAtGbo5Lk=; b=zNetLYsv114oFZNrU8B/6yS5KVw7vDR/kmSomQxBfw8897qMoiOxoIBzrFNlFcuhrG I4RjSJUrxNnm6UOtlFyF4JqQ2OCbKYhq1MkT9GIT2RAroHIKK0i6n+fDwCCsWp68dvyT 3H+6byScn7WD+LHWV6K+8EirUkkInXhPXxvEojzOak36L0+LnXfWgbTRJORGnvEqennG Z8eY/HGyYZBXVHhLjVc8AwOf8UnUlTGQv/VKKZoJor2H4apEHKa13viCAtY9pt142ZxF BR7Yd52toygO+xocwaJbYJfE3d4KM4uQJvMgMGwTv7xNgia/i5tmFenE/w3ce1iF4iQu Za2A== X-Gm-Message-State: ACrzQf1s64f/SAUPKN1/ZSIYVKmBIQonuMFDcZPeCOqNfwDXjfvxeKly 7xuBrwsdbpf4Rvnqtryi7Bff4w== X-Google-Smtp-Source: AMsMyM5fLqyeOXxhQHdX+OOxELBYD3ckReSg83MxwbqlwSMZaQyVVpAnIOHc9SP/XraIp0pF3FQnyQ== X-Received: by 2002:a19:6b05:0:b0:49f:53b9:abb0 with SMTP id d5-20020a196b05000000b0049f53b9abb0mr3821048lfa.166.1663494648565; Sun, 18 Sep 2022 02:50:48 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id z15-20020a056512308f00b004977e865220sm4574286lfd.55.2022.09.18.02.50.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Sep 2022 02:50:47 -0700 (PDT) Message-ID: Date: Sun, 18 Sep 2022 10:50:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v2 1/3] dt-bindings: sound: ts3a227e: convert to yaml Content-Language: en-US To: Astrid Rost , Mark Brown , Liam Girdwood , Krzysztof Kozlowski , Dylan Reid , Rob Herring Cc: kernel@axis.c, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Astrid Rost , devicetree@vger.kernel.org References: <20220915113955.22521-1-astrid.rost@axis.com> <20220915113955.22521-2-astrid.rost@axis.com> From: Krzysztof Kozlowski In-Reply-To: <20220915113955.22521-2-astrid.rost@axis.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/09/2022 12:39, Astrid Rost wrote: > Convert from ts3a227e.txt to yaml. > > Signed-off-by: Astrid Rost Thank you for your patch. There is something to discuss/improve. > --- > .../devicetree/bindings/sound/ts3a227e.txt | 30 -------- > .../devicetree/bindings/sound/ts3a227e.yaml | 69 +++++++++++++++++++ > 2 files changed, 69 insertions(+), 30 deletions(-) > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/ts3a227e.yaml > @@ -0,0 +1,69 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/sound/ts3a227e.yaml#" Filename based on compatible, so ti,ts3a227e.yaml > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" Drop quotes from both lines above. > + > +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: > + description: I2C address of the device. Skip description, it's obvious. > + const: 0x3b > + > + interrupts: > + maxItems: 1 > + description: | > + Interrupt number for /INT pin from the ts3a227e. Skip description > + > + 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: 2 Old bindings said default is 1. It this was intended, please mention in commit msg deviations from pure conversion. > + > +required: > + - compatible > + - reg > + - interrupts > + > +additionalProperties: false > + > +examples: > + - | > + #include This header is not used. > + #include > + i2c0 { Node name just "i2c" > + #address-cells = <1>; > + #size-cells = <0>; > + codec: ts3a227e@3b { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation audio-controller? audio-switch? > + compatible = "ti,ts3a227e"; > + reg = <0x3b>; > + interrupt-parent = <&gpio1>; > + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > + }; > + }; > + > +... Best regards, Krzysztof