Message ID | 20230302-max9867-v1-1-aa9f7f25db5e@skidata.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4192446wrd; Thu, 2 Mar 2023 03:59:04 -0800 (PST) X-Google-Smtp-Source: AK7set8LpUWv401iQMSk3pnsZrYmPZcGMzZky9sOPu4jwlcmIZU3Xefk99ohLL7xGD9BVOm6WEZK X-Received: by 2002:a17:90b:3ecb:b0:234:35bb:6190 with SMTP id rm11-20020a17090b3ecb00b0023435bb6190mr10912796pjb.27.1677758344584; Thu, 02 Mar 2023 03:59:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677758344; cv=none; d=google.com; s=arc-20160816; b=dhCR+Jr9dW0cq97JwNzO9mvd1S4ylLABwwWmJ7MrKo0dpI/1sfb6DxZF177+xwO7Oh UVvwJwpwxsoRdvZ9Ty0aeFvdEM8sLxw5wtQXh80mKraQZjEZcrvYrzefxXxjLOl7Ap+O lbwBWoxal7t+kHhx4TNO5WpONwyzaNbYzYfEtUUJCkeSw5T3gz+JFFRVdGzT5YfsV5VY dARw0HSwkhtJU26y5wxMmxQLXWw6DAjAoVTMadu65ajShR+iIwE1MH3uP7JUd6sAU5jK yG+9KrJpb347yCjUCvpEV6aXtY3kfrJSsn9oNli8JvN9FfUHrJF7NrJ9KsO5n7JMzLiC bCVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=lacV+ZSJrTyZ6DynOqgF52q9M292vYw544hATtzWJ1U=; b=pTWjsBnVDUYpPFmFqcO0jXcT82xzGzv2S1TEv6mIlAEfoQ6p0Wso0ZWDvJ5uR78Afk rZ8qIEF1RXylGDIurBBk/7R8X3zhKi+ZAGB7Uq3ER4zLTsjgT+i42YcNYH9nYDhU2K1l KyoJ91gSWGE2KvHl2tCav/nr4b2rpbEtaFH76gjbayaD8mUyihkCFDSjwhkupx/NbBJl Zml0moXrPZl5921FgM5/mXmkQtCrOMd+TlXbcUHoj7gNGvzEqmNqNF77Zwc3ePkWSKIo 3whHt5tAT9PjKlQxwm87OqPlkTkCrYww4RYr0ef08rhXRB1ud8MAaUtdqVnF7qgPBK5y yKhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=UPiAwD8A; 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=linux.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cl9-20020a17090af68900b00237dd21c1b7si2221909pjb.143.2023.03.02.03.58.51; Thu, 02 Mar 2023 03:59:04 -0800 (PST) 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=@linux.dev header.s=key1 header.b=UPiAwD8A; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229950AbjCBL5j (ORCPT <rfc822;davidbtadokoro@gmail.com> + 99 others); Thu, 2 Mar 2023 06:57:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbjCBL50 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 2 Mar 2023 06:57:26 -0500 Received: from out-48.mta1.migadu.com (out-48.mta1.migadu.com [95.215.58.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4044E3644D for <linux-kernel@vger.kernel.org>; Thu, 2 Mar 2023 03:57:22 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1677758240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lacV+ZSJrTyZ6DynOqgF52q9M292vYw544hATtzWJ1U=; b=UPiAwD8Aezv+ZVDhgXZdkVwLDXFcVnot+rOvl2jJwf7c8Suxiy8q7GI6bPjtYSyIjA8tDk fC221+XDLRZj9FDCNDJGtu6w0yl1R9tNbsw2+aONPjEsLCJJE7cGcqJqHMar//GHUUkIfc 3/rI1S39VCkas1vViAtLhi+5YWO6GtA= From: richard.leitner@linux.dev Date: Thu, 02 Mar 2023 12:55:01 +0100 Subject: [PATCH 1/3] ASoC: dt-bindings: maxim,max9867: convert txt bindings to yaml MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230302-max9867-v1-1-aa9f7f25db5e@skidata.com> References: <20230302-max9867-v1-0-aa9f7f25db5e@skidata.com> In-Reply-To: <20230302-max9867-v1-0-aa9f7f25db5e@skidata.com> To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Ladislav Michl <ladis@linux-mips.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Benjamin Bara <benjamin.bara@skidata.com> Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Leitner <richard.leitner@skidata.com> X-Developer-Signature: v=1; a=openpgp-sha256; l=2215; i=richard.leitner@skidata.com; h=from:subject:message-id; bh=EaR0IGpFQVasEFVxFQvnkwT/6aa1vj6aIM7Wyp90Ang=; b=owGbwMvMwCX2R2KahkXN7wuMp9WSGFIY+uUqpuu8L567xvpO/qcH++aum3UuKHtpqDmzzjSrfcIp hi9ZO0pZGMS4GGTFFFnsjbna3XPL3lcq6uTCzGFlAhnCwMUpABOZYM3wh9Nz/dKzhxdN9tqkeExNj7 WC1bXg2LzqWQ5SrxRD8xg+6zEyrD716kr8idn3VK8Jh1j6Xt/AfyLhX/7yqCfTNmerz3nOwgsA X-Developer-Key: i=richard.leitner@skidata.com; a=openpgp; fpr=3F330A87476D76EF79212C6DFC189628387CFBD0 X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759257133822758920?= X-GMAIL-MSGID: =?utf-8?q?1759257133822758920?= |
Series |
Add "mclk" support for maxim,max9867
|
|
Commit Message
Richard Leitner
March 2, 2023, 11:55 a.m. UTC
From: Richard Leitner <richard.leitner@skidata.com> Convert from max9867.txt to maxim,max9867.yaml and add missing '#sound-dai-cells' property. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> --- .../devicetree/bindings/sound/max9867.txt | 17 -------- .../devicetree/bindings/sound/maxim,max9867.yaml | 51 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 17 deletions(-)
Comments
On Thu, 02 Mar 2023 12:55:01 +0100, richard.leitner@linux.dev wrote: > From: Richard Leitner <richard.leitner@skidata.com> > > Convert from max9867.txt to maxim,max9867.yaml and add missing > '#sound-dai-cells' property. > > Signed-off-by: Richard Leitner <richard.leitner@skidata.com> > --- > .../devicetree/bindings/sound/max9867.txt | 17 -------- > .../devicetree/bindings/sound/maxim,max9867.yaml | 51 ++++++++++++++++++++++ > 2 files changed, 51 insertions(+), 17 deletions(-) > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/maxim,max9867.yaml: 'oneOf' conditional failed, one must be fixed: 'unevaluatedProperties' is a required property 'additionalProperties' is a required property hint: Either unevaluatedProperties or additionalProperties must be present from schema $id: http://devicetree.org/meta-schemas/core.yaml# ./Documentation/devicetree/bindings/sound/maxim,max9867.yaml: $id: relative path/filename doesn't match actual path or filename expected: http://devicetree.org/schemas/sound/maxim,max9867.yaml# Error: Documentation/devicetree/bindings/sound/maxim,max9867.example.dts:18.9-13 syntax error FATAL ERROR: Unable to parse input tree make[1]: *** [scripts/Makefile.lib:434: Documentation/devicetree/bindings/sound/maxim,max9867.example.dtb] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1508: dt_binding_check] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230302-max9867-v1-1-aa9f7f25db5e@skidata.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 02/03/2023 12:55, richard.leitner@linux.dev wrote: > From: Richard Leitner <richard.leitner@skidata.com> > > Convert from max9867.txt to maxim,max9867.yaml and add missing > '#sound-dai-cells' property. Thank you for your patch. There is something to discuss/improve. Except wrong ID (and missing test): > + > +examples: > + - | > + &i2c { > + max9867: max9867@18 { Generic node names, so "codec" and drop the unused label. Use 4 spaces for example indentation. > + compatible = "maxim,max9867"; > + #sound-dai-cells = <0>; > + reg = <0x18>; Best regards, Krzysztof
On Thu, Mar 02, 2023 at 02:31:14PM +0100, Krzysztof Kozlowski wrote: > On 02/03/2023 12:55, richard.leitner@linux.dev wrote: > > From: Richard Leitner <richard.leitner@skidata.com> > > > > Convert from max9867.txt to maxim,max9867.yaml and add missing > > '#sound-dai-cells' property. > > Thank you for your patch. There is something to discuss/improve. > > Except wrong ID (and missing test): > > > + > > +examples: > > + - | > > + &i2c { > > + max9867: max9867@18 { > > Generic node names, so "codec" and drop the unused label. Thanks for the review and feedback. I'll fix that in v2. > > Use 4 spaces for example indentation. Ok. checkpatch.pl didn't complain about that so I thought this was fine. Are there any other scripts/tools to check for correct formatting of bindings? > > > + compatible = "maxim,max9867"; > > + #sound-dai-cells = <0>; > > + reg = <0x18>; > > Best regards, > Krzysztof > Thanks & regards;rl
On Thu, Mar 02, 2023 at 07:05:02AM -0600, Rob Herring wrote: > > On Thu, 02 Mar 2023 12:55:01 +0100, richard.leitner@linux.dev wrote: > > From: Richard Leitner <richard.leitner@skidata.com> > > > > Convert from max9867.txt to maxim,max9867.yaml and add missing > > '#sound-dai-cells' property. > > > > Signed-off-by: Richard Leitner <richard.leitner@skidata.com> > > --- > > .../devicetree/bindings/sound/max9867.txt | 17 -------- > > .../devicetree/bindings/sound/maxim,max9867.yaml | 51 ++++++++++++++++++++++ > > 2 files changed, 51 insertions(+), 17 deletions(-) > > > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): Thank you for the pointer, Rob! Will fix those in v2 and from now on run 'make DT_CHECKER_FLAGS=-m dt_binding_check' before sending any patches 😉 regards;rl > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/maxim,max9867.yaml: 'oneOf' conditional failed, one must be fixed: > 'unevaluatedProperties' is a required property > 'additionalProperties' is a required property > hint: Either unevaluatedProperties or additionalProperties must be present > from schema $id: http://devicetree.org/meta-schemas/core.yaml# > ./Documentation/devicetree/bindings/sound/maxim,max9867.yaml: $id: relative path/filename doesn't match actual path or filename > expected: http://devicetree.org/schemas/sound/maxim,max9867.yaml# > Error: Documentation/devicetree/bindings/sound/maxim,max9867.example.dts:18.9-13 syntax error > FATAL ERROR: Unable to parse input tree > make[1]: *** [scripts/Makefile.lib:434: Documentation/devicetree/bindings/sound/maxim,max9867.example.dtb] Error 1 > make[1]: *** Waiting for unfinished jobs.... > make: *** [Makefile:1508: dt_binding_check] Error 2 > > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230302-max9867-v1-1-aa9f7f25db5e@skidata.com > > The base for the series is generally the latest rc1. A different dependency > should be noted in *this* patch. > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure 'yamllint' is installed and dt-schema is up to > date: > > pip3 install dtschema --upgrade > > Please check and re-submit after running the above command yourself. Note > that DT_SCHEMA_FILES can be set to your schema file to speed up checking > your schema. However, it must be unset to test all examples with your schema. >
diff --git a/Documentation/devicetree/bindings/sound/max9867.txt b/Documentation/devicetree/bindings/sound/max9867.txt deleted file mode 100644 index b8bd914ee697..000000000000 --- a/Documentation/devicetree/bindings/sound/max9867.txt +++ /dev/null @@ -1,17 +0,0 @@ -max9867 codec - -This device supports I2C mode only. - -Required properties: - -- compatible : "maxim,max9867" -- reg : The chip select number on the I2C bus - -Example: - -&i2c { - max9867: max9867@18 { - compatible = "maxim,max9867"; - reg = <0x18>; - }; -}; diff --git a/Documentation/devicetree/bindings/sound/maxim,max9867.yaml b/Documentation/devicetree/bindings/sound/maxim,max9867.yaml new file mode 100644 index 000000000000..cefa43c3d34e --- /dev/null +++ b/Documentation/devicetree/bindings/sound/maxim,max9867.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/max9867.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim Integrated MAX9867 CODEC + +description: | + This device supports I2C only. + Pins on the device (for linking into audio routes): + * LOUT + * ROUT + * LINL + * LINR + * MICL + * MICR + * DMICL + * DMICR + +maintainers: + - Ladislav Michl <ladis@linux-mips.org> + +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + enum: + - maxim,max9867 + + '#sound-dai-cells': + const: 0 + + reg: + maxItems: 1 + +required: + - compatible + - reg + +examples: + - | + &i2c { + max9867: max9867@18 { + compatible = "maxim,max9867"; + #sound-dai-cells = <0>; + reg = <0x18>; + }; + }; +...