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: 13162033 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 934C3C64EC4 for ; Mon, 6 Mar 2023 17:40:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 190201139; Mon, 6 Mar 2023 18:39:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 190201139 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678124399; bh=NqqfRUX1WdUBgmU4CP14pjltPXWkZUXa0mllkkDuIsA=; h=From:Date:Subject:References:In-Reply-To:To:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mAAez59WhrFbPNhwmNP0GfjjaA9L8BsQcqq+43uES1+FIYH7FZ0Vli/Isd7dOJQPg hqsrDYIJh10DE+lg+xzNB8uvM5dKIPfHcXBKUWH99OjrLjD0Z4BnTLcgDZ7wAy1PV8 8sffsLrIFL25w7pnKxEbEVOwHX3BIsAEOSOaimSE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B6F20F8042F; Mon, 6 Mar 2023 18:38:46 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D0DC5F8051B; Thu, 2 Mar 2023 12:57:28 +0100 (CET) Received: from out-37.mta1.migadu.com (out-37.mta1.migadu.com [95.215.58.37]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2217EF80310 for ; Thu, 2 Mar 2023 12:57:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2217EF80310 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=UPiAwD8A 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 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-MailFrom: richard.leitner@linux.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: SNQUYOCERRYLVY6QKEDF5IZMTTZW4TYX X-Message-ID-Hash: SNQUYOCERRYLVY6QKEDF5IZMTTZW4TYX X-Mailman-Approved-At: Mon, 06 Mar 2023 17:38:42 +0000 CC: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Leitner X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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: 13162034 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 E2558C61DA4 for ; Mon, 6 Mar 2023 17:40:29 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C4A431140; Mon, 6 Mar 2023 18:39:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C4A431140 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678124427; bh=PBHQ2YaiO+Kb0G+Zsb50BNzMNdU9/0QHXu2V4sDcIzM=; h=From:Date:Subject:References:In-Reply-To:To:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=AtuwPwAuK/88qqltwzRnhdt5dLC4BhRdjwxo18rQsO9BTzPLDCWFWsH/XqSkvEEz+ SiJvSRM5E29/1XpOBvgIjG8EKIV2EB+SjU7Flwf1JfS6nlLSE1RQeStVLfqJzae7hC cEzvAZ0TnsCkPhBa/nbUU7CUlASfpWQVK9IFPMJI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2A2DFF804FE; Mon, 6 Mar 2023 18:38:48 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4C792F80310; Thu, 2 Mar 2023 12:57:30 +0100 (CET) Received: from out-18.mta1.migadu.com (out-18.mta1.migadu.com [IPv6:2001:41d0:203:375::12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 85CDCF8049C for ; Thu, 2 Mar 2023 12:57:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 85CDCF8049C Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=xEL5Mwbq 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 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-MailFrom: richard.leitner@linux.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: SURX7CTGPJGS6HR4HQOATYRXNTSXIA6J X-Message-ID-Hash: SURX7CTGPJGS6HR4HQOATYRXNTSXIA6J X-Mailman-Approved-At: Mon, 06 Mar 2023 17:38:43 +0000 CC: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Leitner X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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: 13162036 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 AC550C61DA4 for ; Mon, 6 Mar 2023 17:40:54 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B83BC114C; Mon, 6 Mar 2023 18:40:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B83BC114C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678124451; bh=luqWqC5oSH8yC4fXm8WRZe7hyqd7VZiS3FzmSlAoZgk=; h=From:Date:Subject:References:In-Reply-To:To:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=VasiKVrtwDdVjTyLaR3i2CtEG2uIYu051IXwJuuc3mdUidBykVEEz7mXTw8GZcgwq 888hLSuTCi+GgSFxBtM77ggchU2jgaPOD/FvlWKrW7gcM7gI3QnZoIX9xoTpxRNtqa nUGJBLuUCzJWDcXJ9NDoJr4EowFQHukikgnuthJE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C8DFAF80534; Mon, 6 Mar 2023 18:38:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D6080F8049C; Thu, 2 Mar 2023 12:57:33 +0100 (CET) Received: from out-32.mta1.migadu.com (out-32.mta1.migadu.com [IPv6:2001:41d0:203:375::20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9B0CCF804B1 for ; Thu, 2 Mar 2023 12:57:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9B0CCF804B1 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=p3i2oWfX 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 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-MailFrom: richard.leitner@linux.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 4V4O7GLVTJZGWKL7UF4Y6TZRXJRC6P2K X-Message-ID-Hash: 4V4O7GLVTJZGWKL7UF4Y6TZRXJRC6P2K X-Mailman-Approved-At: Mon, 06 Mar 2023 17:38:44 +0000 CC: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Leitner X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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; }