From patchwork Thu Mar 2 11:55:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Leitner X-Patchwork-Id: 63380 Return-Path: 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 + 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 ); 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 ; 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 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 , Mark Brown , Rob Herring , Krzysztof Kozlowski , Ladislav Michl , Jaroslav Kysela , Takashi Iwai , Benjamin Bara Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Leitner 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: 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?= From: Richard Leitner Convert from max9867.txt to maxim,max9867.yaml and add missing '#sound-dai-cells' property. Signed-off-by: Richard Leitner --- .../devicetree/bindings/sound/max9867.txt | 17 -------- .../devicetree/bindings/sound/maxim,max9867.yaml | 51 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 17 deletions(-) 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 + +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>; + }; + }; +... From patchwork Thu Mar 2 11:55:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Leitner X-Patchwork-Id: 63385 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4193094wrd; Thu, 2 Mar 2023 04:00:37 -0800 (PST) X-Google-Smtp-Source: AK7set+7G1tsi5Yw0rIUPv8LqZNvG4jtwrrWoXxlNOAaVJTbXPCP7VS7rx70FjEN8SiA3Zf2T6l6 X-Received: by 2002:a62:3304:0:b0:5a9:cb6b:7843 with SMTP id z4-20020a623304000000b005a9cb6b7843mr9029041pfz.27.1677758437136; Thu, 02 Mar 2023 04:00:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677758437; cv=none; d=google.com; s=arc-20160816; b=ijgHiGqK6U9YIR0PeWh3P+7YlwVcMW/N2LCR97PUWwXXqrSZ8ylXYp7SsoC1Qi343o Wpni9X1fpdTcNhrbbECcFR+dYFrNBmpR5pGvPfMvdCytXgOUu0o3o/T7TaP0m/kbSfhr 7p6AGjvOa7EQDp+Jsx151fDZGJ0cEF2pyYmP/Hf8vrWHvudN+R3sjao/ulJP3hbyL0Qg HGu3ncpLO8+94FivEVzdqQCar1yG8+c8jeT6563gbkVX7kcrTk0z5yY4iOZ5wwTvsFXg WTarwYFmoK4JdFQYMqDZmd5yYmG5RchND/U/hKWKqLhNn+85QRhEFhavASPFETvNrBmF tMIA== 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=AR5vfcbTzXg9GS9xts3Lxqv5/GJy7ozqxusymEf3afo=; b=NkUqooWjNchxUNiz5OmSea0ifas/l7um36p0cLppPKoKykZAz4xF/uc2f5VkxVmEJe 2r0RnTB+UAsEAQvgYjdhw0bf069QgieJslE89t0KEDflGxbAv8OWNURslwLIyCX8U/5y c0s/l2G0fU6j/q4rBYJ2+de4gMwFolUPoxPwxiuGRSuW2lYMy1RnCanotssRP9VxZw2O PhltEzohpjQohTeLHUa8uEMJ2Jz0h7MBWEq4qsSS9HOuG8T1d5q7ZXfve8gdPEDr6s/8 01+wOJz/dNrsCvfjlgWRKR13ZlrJVUWE9qNzLfCf7CINN6s8ei9h8wHX4Xms+LAr+T1K K1FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=xEL5Mwbq; 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 k15-20020aa788cf000000b0058e01069f69si16873362pff.115.2023.03.02.04.00.24; Thu, 02 Mar 2023 04:00:37 -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=xEL5Mwbq; 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 S229889AbjCBL5g (ORCPT + 99 others); Thu, 2 Mar 2023 06:57:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229851AbjCBL50 (ORCPT ); Thu, 2 Mar 2023 06:57:26 -0500 Received: from out-23.mta1.migadu.com (out-23.mta1.migadu.com [IPv6:2001:41d0:203:375::17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCC1834007 for ; 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=1677758241; 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=AR5vfcbTzXg9GS9xts3Lxqv5/GJy7ozqxusymEf3afo=; b=xEL5MwbqhEW/vkHHggpCjUihFiwwscme7Ym7cn7njoh9i5up9Qq5IN3roJUWuLzSrwAafy 6nuRb4mUGB2rYjivL9tVTqWqY5tLYIXPLoUSW9Vz2vB7CDL6bQzXpkO3bkIBiZEbAM1xoJ yA+F9n/NbDz/Uhp8IWXq03+Y4rYqF+M= From: richard.leitner@linux.dev Date: Thu, 02 Mar 2023 12:55:02 +0100 Subject: [PATCH 2/3] ASoC: dt-bindings: maxim,max9867: add "mclk" property MIME-Version: 1.0 Message-Id: <20230302-max9867-v1-2-aa9f7f25db5e@skidata.com> References: <20230302-max9867-v1-0-aa9f7f25db5e@skidata.com> In-Reply-To: <20230302-max9867-v1-0-aa9f7f25db5e@skidata.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Ladislav Michl , Jaroslav Kysela , Takashi Iwai , Benjamin Bara Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Leitner X-Developer-Signature: v=1; a=openpgp-sha256; l=1153; i=richard.leitner@skidata.com; h=from:subject:message-id; bh=bMNg7GqHmP3qmoCg4huIjZzqkxCE2jKo6J6fNpJ+8ks=; b=owGbwMvMwCX2R2KahkXN7wuMp9WSGFIY+uUZl4XzaBlcvvyYkbF0S63p1x1bTl9f5Xlnb0Dkcb27 GZ9+dJSyMIhxMciKKbLYG3O1u+eWva9U1MmFmcPKBDKEgYtTACYiu47hv/fyK+tYfm98tmiN8OOAnI qsGz/bv/7fPXeyr52E2+cH6rqMDGt92Cs2bOXVTyg35Ih2NQlPrZJ1vR6+MKpgV/9tVg45DgA= 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=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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759257230883362696?= X-GMAIL-MSGID: =?utf-8?q?1759257230883362696?= From: Richard Leitner Add clocks and clock-names properties to require a "mclk" definition for the maxim,max9867 codec. Signed-off-by: Richard Leitner --- Documentation/devicetree/bindings/sound/maxim,max9867.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/maxim,max9867.yaml b/Documentation/devicetree/bindings/sound/maxim,max9867.yaml index cefa43c3d34e..152340fe9cc7 100644 --- a/Documentation/devicetree/bindings/sound/maxim,max9867.yaml +++ b/Documentation/devicetree/bindings/sound/maxim,max9867.yaml @@ -35,9 +35,17 @@ properties: reg: maxItems: 1 + clocks: + maxItems: 1 + + clock-names: + const: "mclk" + required: - compatible - reg + - clocks + - clock-names examples: - | @@ -46,6 +54,8 @@ examples: compatible = "maxim,max9867"; #sound-dai-cells = <0>; reg = <0x18>; + clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI3_MCLK1>; + clock-names = "mclk"; }; }; ... From patchwork Thu Mar 2 11:55:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Leitner X-Patchwork-Id: 63381 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4192510wrd; Thu, 2 Mar 2023 03:59:14 -0800 (PST) X-Google-Smtp-Source: AK7set/dJ1HKBVFcAIp1axHND/ybWBgd2c/ScNXXoZcQKnZESr1EbgqLCcgJCTFO27tWIdQqsRk+ X-Received: by 2002:a17:90b:1645:b0:230:a195:b8ac with SMTP id il5-20020a17090b164500b00230a195b8acmr11037011pjb.7.1677758354697; Thu, 02 Mar 2023 03:59:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677758354; cv=none; d=google.com; s=arc-20160816; b=P7edS9P+gv4ohJV5FqIu+5vBaOVn0iI1M0spZeXHGMaIDQhbC/n0OC5daD9hnee5oG Z2yA+jY0hSbe+0P9Lk8jTpQCmL0SRMOVER01DOjyu96kUxWnnVNIEe88V8DSyBuPWsg6 ZCuClqdgQIL0C8vDtbMAkMoop7M62qlXptNON+9qhMNJB8R21stLK6FXqW16Xl9dP35Z 2X3/SGoM95ev5R2ZBDhXeWFtryA9nlP+eVuG8wNqNLCmg78Y8DKkUvU3rSmUEWjKutMl szl9Y+987RMrKpV+KAUrn/jVguW0L6M2x8s1gCIPVdeSw1TqufrIgSG9tFgfQw7dO7E7 v5yQ== 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=sredrf5PjZ7jQFXwhsTWfhRpimvvGAc4wV/iwzTmZq0=; b=yqjPa8loPiQIlTsNByqcJ2G2zWCrfjlSKm+Isq9ZWkYnbPrcij5s5FLdgy9vnIC6Ki wJqKleJn2GfOBg2UTq8lJPvc8zLE95C8PNzbUH8gs80e0VMjyiflkoxlWzKMVUncc+FN qPU24VE4z4I0GuExn+7aiyfXi9VGrDjNxMTAKjvdXWOLAPj1cW9E2Mvu+TqUwMfK9xH7 9BBGe84Dkq/VEAgburWWzEcN6pVsslr0lPIjcN8kAwiVehBW7V5FpwgEQ5r907X8XLHv K4Y7+0DhRGwtreIlVzqVDX8J/j9cUkfIgtQqxhSWQ24AjOzuG17cOh7JjBoc8kMGdn8I 38bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=p3i2oWfX; 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 kl12-20020a170903074c00b0019c9a5e0172si13750625plb.556.2023.03.02.03.59.02; Thu, 02 Mar 2023 03:59:14 -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=p3i2oWfX; 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 S229970AbjCBL5m (ORCPT + 99 others); Thu, 2 Mar 2023 06:57:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbjCBL5b (ORCPT ); Thu, 2 Mar 2023 06:57:31 -0500 Received: from out-39.mta1.migadu.com (out-39.mta1.migadu.com [IPv6:2001:41d0:203:375::27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 596AD37569 for ; Thu, 2 Mar 2023 03:57:23 -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=1677758241; 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=sredrf5PjZ7jQFXwhsTWfhRpimvvGAc4wV/iwzTmZq0=; b=p3i2oWfXX64J/GM40FQzzz9ICV3FS6E6pH4lDCCyy7YOp2GeNRWM0L6LgWvaaDUFYG8nrS JsC4lt9h3nfU1JJGScOJBu6/x+XrQKJnq360TuI5WChEuOL3dC/CGCuPgG3RaxCBz9v/4o SuxS+lrnpNYeCA30kp61Se0VWYaGU0A= From: richard.leitner@linux.dev Date: Thu, 02 Mar 2023 12:55:03 +0100 Subject: [PATCH 3/3] ASoC: maxim,max9867: add "mclk" support MIME-Version: 1.0 Message-Id: <20230302-max9867-v1-3-aa9f7f25db5e@skidata.com> References: <20230302-max9867-v1-0-aa9f7f25db5e@skidata.com> In-Reply-To: <20230302-max9867-v1-0-aa9f7f25db5e@skidata.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Ladislav Michl , Jaroslav Kysela , Takashi Iwai , Benjamin Bara Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Leitner X-Developer-Signature: v=1; a=openpgp-sha256; l=1453; i=richard.leitner@skidata.com; h=from:subject:message-id; bh=t7JeLv5Avx9AQ87GdXmgLhpXQCWm8ePC8Uj/0k4VhNI=; b=owGbwMvMwCX2R2KahkXN7wuMp9WSGFIY+uU7ly5v9/95II6d2/TEmpl/JRpjl/9oubQ0q6J9w9Pg BJ1PHaUsDGJcDLJiiiz2xlzt7rll7ysVdXJh5rAygQxh4OIUgImcimX4p+Rb7Xtxr/wJwSKfq3Jq+z 3TBM53av9zm7Gv/Nbi8hlPpjH8lanmVk9hWxPJdoeZ6dvrUyq+6x84Fxjm/T4//3H/R2tLZgA= 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759257144524123865?= X-GMAIL-MSGID: =?utf-8?q?1759257144524123865?= From: Benjamin Bara Add basic support for the codecs mclk by enabling it during probing. Signed-off-by: Benjamin Bara --- sound/soc/codecs/max9867.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index e161ab037bf7..b92dd61bb2b2 100644 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -6,6 +6,7 @@ // Copyright 2018 Ladislav Michl // +#include #include #include #include @@ -16,6 +17,7 @@ #include "max9867.h" struct max9867_priv { + struct clk *mclk; struct regmap *regmap; const struct snd_pcm_hw_constraint_list *constraints; unsigned int sysclk, pclk; @@ -663,8 +665,18 @@ static int max9867_i2c_probe(struct i2c_client *i2c) dev_info(&i2c->dev, "device revision: %x\n", reg); ret = devm_snd_soc_register_component(&i2c->dev, &max9867_component, max9867_dai, ARRAY_SIZE(max9867_dai)); - if (ret < 0) + if (ret < 0) { dev_err(&i2c->dev, "Failed to register component: %d\n", ret); + return ret; + } + + max9867->mclk = devm_clk_get(&i2c->dev, "mclk"); + if (IS_ERR(max9867->mclk)) + return PTR_ERR(max9867->mclk); + ret = clk_prepare_enable(max9867->mclk); + if (ret < 0) + dev_err(&i2c->dev, "Failed to enable MCLK: %d\n", ret); + return ret; }