Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1207946rwb; Sun, 18 Sep 2022 02:58:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6OmFnT9un5kTl9ee0o1ugRuFdAbd+9VAQPn9mLEcM6kxtwAt+CFxnJnHRE0RPvCwyyPSjP X-Received: by 2002:a17:902:7481:b0:178:2889:95da with SMTP id h1-20020a170902748100b00178288995damr8089008pll.105.1663495134381; Sun, 18 Sep 2022 02:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663495134; cv=none; d=google.com; s=arc-20160816; b=jz06P1AD71X2c/OU07uHN3VuAlFw/bRZRsNyhXbmD2b+x8INgXMZl6Rdu4M5eG9aJn T1tSylupiaHq4O1Ap4eCm0cGiVr7+kcVDrQwJbCsh81lDWm4Ir9NToPhWD4u1ShABm6Q TU6i9xxQFad5sBZQBC6DpRDb5Po4G+TcdeGeWHVhpIQ4UTNwzAUXFkGHI4+jl8HE47RH R1u9iUQ2UTaksSRM+j+qckqwiSkRcEsf46G62Ybhtrb9Qbg3VgPcPsk67UfN8WboW8UB 4vK9LDgEAnSuzyfKofjir4k7nfWfaWrl8sNoDcqDGa4/jdeBFkKlBFmuk12oCqDZZ5eM rebA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=PKBg5ng7PnWT5G7IkXOVZef3/wyXg4tjFKeAtGbo5Lk=; b=x6zw4khv+gEFfjp3MCt1t5RTIg0U0vBbDY5amnvXYPzVaJbLxACJtU+peLecaxJu8d F5/AQwhErjwDJjV1T0HoWJNxN2/0+z6OtUpBnXzZBWRjf0tbkx8wyJ8YttUBPCbBe4ps vKFACqYtSjqGSXhuBttm1pDW8ocDmZla7VFtiomMMp0nhqmXp+L5nVK77HlgNm4/m6pt prqyEelaA8GGON7z9XeA7iCOSvbo7l6AzhZ/6hrmlg6blgvHq6GPjs3Q357Z4+1BzCbi 8kb3kYqRE1DRxqFgk1iV3WpVN6ZX0HG2I14BYRB+XKkeind/epafTD1kGKWG3EpaVei0 nbJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wp0ZjomX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c1-20020aa79521000000b00535c451053esi25108391pfp.296.2022.09.18.02.58.43; Sun, 18 Sep 2022 02:58:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wp0ZjomX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229801AbiIRJzi (ORCPT + 99 others); Sun, 18 Sep 2022 05:55:38 -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-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 X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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