From patchwork Tue Jul 18 11:40:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13317032 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 89067EB64DC for ; Tue, 18 Jul 2023 11:40:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231481AbjGRLku (ORCPT ); Tue, 18 Jul 2023 07:40:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbjGRLkt (ORCPT ); Tue, 18 Jul 2023 07:40:49 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8961A10F1; Tue, 18 Jul 2023 04:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689680437; cv=none; d=strato.com; s=strato-dkim-0002; b=CxRkUiuk1qoWsNI605971zn6aOa83fSLJnlK9x04FMmEzxkOI6PDfjqZpC70o9MMPe 3qXuQ+zA+v1vOSFwUu8fU1MLTGZiwCB15Ng5R2rYeyeujxesxaBecGf8r8PXBM9uuYas DRrCC+VjB3qgbyRoUnoJlvB51rqk5GzlYNeZSXWUKF9/klWN2YJyVpZonAw2v16IScbd 6He6pLBWu9GOhw8XuSS2coqDCsU81I0jAFWex/QJZqeELvFuu3LkgNkrQgbuNhJAaurT wQ5neJSJSmze309rDJYLt41M5Ngkbl9lEg/2OPxwkBnNvASz6NcoMS4S5+iRypKlWXCm Ix3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1689680437; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=41FgpaaFBB/EYR10zVy+xYoyinNOFdObIZ1G8lDObro=; b=Ljj59MTlXUpSptntIk7qgpGtJ9/wJz8TXuiMlebtWYdC2GqRktkRoHloriUUcCcKTG RyP3ioano8sUHKMlSSYGYTOAdooBblntcogf31wAOmQPV4UjpEQA3IpiMqQnwr+qYKev QjkZC64H8uonCOQr6b7K9folS57sOreT8bi/mPv5kQ+KkPbc/BIH/5Vvn+ubMIC6J3Rn G1S9imK8bPQnlDnMIRoyLuQ/555amVuC3F4KJOMaXjs5oaNONEyJQAxxZ3plq93s4XiC MkhWWadfPq6GHsF76ym+yUqeGXJH/sYUrZiD/nAA/1/vR1Bfsq6s4+6rFw7Xd4rnBztf DrWg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1689680437; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=41FgpaaFBB/EYR10zVy+xYoyinNOFdObIZ1G8lDObro=; b=b/WA35M2/fd2FL4jEfTcUtLMFQmh9MtQhRnsBew/TPHMvktpS7yAqcL61kG1Ej/5O0 54avBcpxuamOYhqrWv0lmp2RNMeFrmR3IURN19qi/o8VXNHHfCa9hiuhzn6TykbAJz0o jQ0mg724wnDdNzWPiAiQgHPK3trOul7AZbjHo01oTJ1AYwtgycwdIA+ZLt4OMgDzj0dz 8UcChvECGj+FgBvHvYdoUfvN80rscMg1DHpUzx7QuCOs5wBGFc5LYpbLEo6VkQEDS5n2 qQFDcxDVUUsmBQWmwu5BV01DdjUpNj9HPS8w+bodT+bRP+hrLmMwD13CmVNz8CJiXfps bKsQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1689680437; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=41FgpaaFBB/EYR10zVy+xYoyinNOFdObIZ1G8lDObro=; b=DevACCK470s9gV9DOy2GyX8xBNUP/mcmqr+oh+6bVh2dcA2ylyS/kNdJHoFqJxia+u PviK5ps8vPvMzLWOKADg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u45/mw==" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.6.0 DYNA|AUTH) with ESMTPSA id D0d0a8z6IBebbpJ (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 18 Jul 2023 13:40:37 +0200 (CEST) From: Stephan Gerhold Date: Tue, 18 Jul 2023 13:40:13 +0200 Subject: [PATCH 1/6] ASoC: dt-bindings: pm8916-analog-codec: Fix misleading example MIME-Version: 1.0 Message-Id: <20230718-pm8916-mclk-v1-1-4b4a58b4240a@gerhold.net> References: <20230718-pm8916-mclk-v1-0-4b4a58b4240a@gerhold.net> In-Reply-To: <20230718-pm8916-mclk-v1-0-4b4a58b4240a@gerhold.net> To: Mark Brown Cc: Srinivas Kandagatla , Banajit Goswami , Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org SPMI devices typically have a single address cell and no size cell, i.e. reg = <0xf000> for the audio codec instead of reg = <0xf000 0x200>. The example is a bit misleading because it uses the latter. Copying this into the device tree would be incorrect and was fixed before for pm8916.dtsi in commit c2f0cbb57dba ("arm64: dts: qcom: pm8916: Remove invalid reg size from wcd_codec"). Make the example more clear by adding the outer "pmic" node which specifies the same #address/size-cells that would be used in the real deivce tree. Signed-off-by: Stephan Gerhold Reviewed-by: Rob Herring --- .../sound/qcom,pm8916-wcd-analog-codec.yaml | 92 ++++++++++++---------- 1 file changed, 50 insertions(+), 42 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml b/Documentation/devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml index c385028c4296..77e3cfba4746 100644 --- a/Documentation/devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml @@ -115,46 +115,54 @@ examples: - | #include #include - - audio-codec@f000{ - compatible = "qcom,pm8916-wcd-analog-codec"; - reg = <0xf000 0x200>; - reg-names = "pmic-codec-core"; - clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; - clock-names = "mclk"; - qcom,mbhc-vthreshold-low = <75 150 237 450 500>; - qcom,mbhc-vthreshold-high = <75 150 237 450 500>; - interrupt-parent = <&spmi_bus>; - interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>, - <0x1 0xf0 0x1 IRQ_TYPE_NONE>, - <0x1 0xf0 0x2 IRQ_TYPE_NONE>, - <0x1 0xf0 0x3 IRQ_TYPE_NONE>, - <0x1 0xf0 0x4 IRQ_TYPE_NONE>, - <0x1 0xf0 0x5 IRQ_TYPE_NONE>, - <0x1 0xf0 0x6 IRQ_TYPE_NONE>, - <0x1 0xf0 0x7 IRQ_TYPE_NONE>, - <0x1 0xf1 0x0 IRQ_TYPE_NONE>, - <0x1 0xf1 0x1 IRQ_TYPE_NONE>, - <0x1 0xf1 0x2 IRQ_TYPE_NONE>, - <0x1 0xf1 0x3 IRQ_TYPE_NONE>, - <0x1 0xf1 0x4 IRQ_TYPE_NONE>, - <0x1 0xf1 0x5 IRQ_TYPE_NONE>; - interrupt-names = "cdc_spk_cnp_int", - "cdc_spk_clip_int", - "cdc_spk_ocp_int", - "mbhc_ins_rem_det1", - "mbhc_but_rel_det", - "mbhc_but_press_det", - "mbhc_ins_rem_det", - "mbhc_switch_int", - "cdc_ear_ocp_int", - "cdc_hphr_ocp_int", - "cdc_hphl_ocp_det", - "cdc_ear_cnp_int", - "cdc_hphr_cnp_int", - "cdc_hphl_cnp_int"; - vdd-cdc-io-supply = <&pm8916_l5>; - vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>; - vdd-micbias-supply = <&pm8916_l13>; - #sound-dai-cells = <1>; + #include + + pmic@1 { + compatible = "qcom,pm8916", "qcom,spmi-pmic"; + reg = <0x1 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + audio-codec@f000 { + compatible = "qcom,pm8916-wcd-analog-codec"; + reg = <0xf000>; + reg-names = "pmic-codec-core"; + clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; + clock-names = "mclk"; + qcom,mbhc-vthreshold-low = <75 150 237 450 500>; + qcom,mbhc-vthreshold-high = <75 150 237 450 500>; + interrupt-parent = <&spmi_bus>; + interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>, + <0x1 0xf0 0x1 IRQ_TYPE_NONE>, + <0x1 0xf0 0x2 IRQ_TYPE_NONE>, + <0x1 0xf0 0x3 IRQ_TYPE_NONE>, + <0x1 0xf0 0x4 IRQ_TYPE_NONE>, + <0x1 0xf0 0x5 IRQ_TYPE_NONE>, + <0x1 0xf0 0x6 IRQ_TYPE_NONE>, + <0x1 0xf0 0x7 IRQ_TYPE_NONE>, + <0x1 0xf1 0x0 IRQ_TYPE_NONE>, + <0x1 0xf1 0x1 IRQ_TYPE_NONE>, + <0x1 0xf1 0x2 IRQ_TYPE_NONE>, + <0x1 0xf1 0x3 IRQ_TYPE_NONE>, + <0x1 0xf1 0x4 IRQ_TYPE_NONE>, + <0x1 0xf1 0x5 IRQ_TYPE_NONE>; + interrupt-names = "cdc_spk_cnp_int", + "cdc_spk_clip_int", + "cdc_spk_ocp_int", + "mbhc_ins_rem_det1", + "mbhc_but_rel_det", + "mbhc_but_press_det", + "mbhc_ins_rem_det", + "mbhc_switch_int", + "cdc_ear_ocp_int", + "cdc_hphr_ocp_int", + "cdc_hphl_ocp_det", + "cdc_ear_cnp_int", + "cdc_hphr_cnp_int", + "cdc_hphl_cnp_int"; + vdd-cdc-io-supply = <&pm8916_l5>; + vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>; + vdd-micbias-supply = <&pm8916_l13>; + #sound-dai-cells = <1>; + }; }; From patchwork Tue Jul 18 11:40:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13317037 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 AB92DEB64DA for ; Tue, 18 Jul 2023 11:42:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230352AbjGRLmE (ORCPT ); Tue, 18 Jul 2023 07:42:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbjGRLmB (ORCPT ); Tue, 18 Jul 2023 07:42:01 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F08BE19BD; Tue, 18 Jul 2023 04:41:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689680438; cv=none; d=strato.com; s=strato-dkim-0002; b=e+tKi+G+OUCduOiE36fr0hOf70/pDMOhg57WzMnIiGLjiqkrVyOXeBjr+cmMX+BRuP don5r8kXx7r40FG5AEHbFvPbo24XY0UPtOEHxF1iUdeq3Wg//+WOvWTSs2Yl6BTsQdv8 iM+fI1h4s7PQ0+bgZSAOu8+dYhxQktOWgnYU+wOirZesdMVoivWLxde8Ylg8jK818YoM FXma+1bGNTn0+STQwzhYS07pT4I3M11BBXwK73otTC5dcm1FtsOta+1qXrTpQnvAuqm+ WaEryXWFPOTSY9OFz7p5IBWzT9NxmBlSanG8ldlv+iJ14Wp6wnjidNlyrnAquEWtRI0m SuOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1689680438; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=leKm6XQrXU4OSZeVodhbqX/6PYvddpq/c+MRNpyVB+c=; b=jM7bOn7SHkCta1CeOG3K9XzGSE2v6Kgc4BinVVPKFpauGRWacRkkYzaBFxg10Xp8+N dhXc/Qm8Yh/0j/aGllvzvC6hJ06q7RI7Owt+kMHL0btX94p9qkvHb9YfisBB96gRWd4h fLbH0sewC862yfBAVMhlMFYxKOgB/6CqgVTACVHlHaf8+yS86ldC/zH86KDkJUwFI2tI emJoxFubUjvzt6RsNyyYKOJuEJIYnh/0Oc2JFFdaIda1OfgoOZ/MfHwjzh6HpBNUk8Bd 41WSV7qdgJi/mg8i1E1k3NHswa7sLvVheyaDu9ehnoRMx1yiicRlS0ZmIWQ2U7Li7vcd KMpQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1689680438; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=leKm6XQrXU4OSZeVodhbqX/6PYvddpq/c+MRNpyVB+c=; b=pgoGK3Md/dyUiwFPly13Eix0Yue9s6nmSwIhfGdvKF837oshp8dAZv35mtqa7YYSPh wKvilhLIKIFgDJlsmA39ks0dthN41tD2RjWnl/mVDthcyInqVmHAhN2XWz4ZT+/Yl4yC iIPCHdK+YGcdU754BoTiTVlR2pmtTFVpEP2L0KxSvxqxi82YopPdEktNOCDCxS8Z+jx5 IAR05KdH4fsKGGKwHJMH+hUI2bFafBZqusQOpfeU+OmDCwH1nbmZXKxW8jcTQk+FPGHP 9Nwms6MLR1GHHp5cW9O//9cIq5rZPpI8GPFeCvUaJHpsdLIJkHPjuVaihXjgWXgp8sHU S60A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1689680438; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=leKm6XQrXU4OSZeVodhbqX/6PYvddpq/c+MRNpyVB+c=; b=UfW6+4wbdcSNBAw4H5m5PIqRZHem5awRXYHQhZWacO6F2tMrCEYBeLKbcf7+KHkFyv 0W/Mhi+VzbSUZed75aAw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u45/mw==" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.6.0 DYNA|AUTH) with ESMTPSA id D0d0a8z6IBebbpL (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 18 Jul 2023 13:40:37 +0200 (CEST) From: Stephan Gerhold Date: Tue, 18 Jul 2023 13:40:14 +0200 Subject: [PATCH 2/6] ASoC: dt-bindings: pm8916-analog-codec: Drop pointless reg-names MIME-Version: 1.0 Message-Id: <20230718-pm8916-mclk-v1-2-4b4a58b4240a@gerhold.net> References: <20230718-pm8916-mclk-v1-0-4b4a58b4240a@gerhold.net> In-Reply-To: <20230718-pm8916-mclk-v1-0-4b4a58b4240a@gerhold.net> To: Mark Brown Cc: Srinivas Kandagatla , Banajit Goswami , Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org pm8916-wcd-analog-codec has just a single reg region, so having a name for it provides no additional value. Drop it completely from the schema and example. There is not really any point in keeping it (even as deprecated) because it was never used. In old DTBs it will just be ignored as before. Signed-off-by: Stephan Gerhold Reviewed-by: Rob Herring --- .../devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml b/Documentation/devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml index 77e3cfba4746..5053799c88b5 100644 --- a/Documentation/devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml @@ -19,10 +19,6 @@ properties: reg: maxItems: 1 - reg-names: - items: - - const: pmic-codec-core - clocks: maxItems: 1 @@ -126,7 +122,6 @@ examples: audio-codec@f000 { compatible = "qcom,pm8916-wcd-analog-codec"; reg = <0xf000>; - reg-names = "pmic-codec-core"; clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; clock-names = "mclk"; qcom,mbhc-vthreshold-low = <75 150 237 450 500>; From patchwork Tue Jul 18 11:40:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13317031 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 069B1EB64DD for ; Tue, 18 Jul 2023 11:40:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231389AbjGRLkt (ORCPT ); Tue, 18 Jul 2023 07:40:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbjGRLkt (ORCPT ); Tue, 18 Jul 2023 07:40:49 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 811611AC; Tue, 18 Jul 2023 04:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689680438; cv=none; d=strato.com; s=strato-dkim-0002; b=WAvl8colgcEn9XPus/OWN2RH5IR6MBoUqGQhvVaH2dkf3/jBZmvYpQ9rZDR6Ddj8PK aUBsMvnySD4nDTyN9y5z9idhhqVECskeF9RQtQ2hyZk2UjiArFxGVa7gMqkYhdBBq6GP 48yMeT1ppQMZSerBbL9yzbwzoo/H6NuF4GAujyQVMVzpXRct5bTmP1gRCitwX9yn0EN4 VkDh0HoAol59+q86lpp5UwAIWuQ1xMZ5Yax1azdOUqpm+QHkOnTEX/9vJrgZ5IincCwE ivvTawqSInriOf+dDPXnRfLzm0M8VK6Ga3aZY/hcZ1CKecpq2OPwLcWHM6UlZXfQ1t8Q WHDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1689680438; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=9nAs4PEgRZ836zl1pP7Ag3osiO18Y/hoNYTgzgYWHqA=; b=XsofbCqBXy8YpVX0e/H+cZISu4Ajlk/UI1BdTSbnPI+FT5l6dSGR+hjN+QNS7kFN16 XugzXtrLZYg/xzxMF7Xah6CXu7kYmkRHi7Y/byuMUvSageUzwPGNrxZjsY4/1foHpHqa s6H9zSOdQ010vh5OLhJ0gEpI/FYQaB6M492tiEEYJgDbjK0PGgKckcqm0t92qIsUBBR6 bW6GN1S3KdwV5RerRIQPCwzsZdWIYDWwmPpFr+acJ/fiKtFOJwfM8/KM2CwrTg+KOul0 c1OOaIVHdKuFmCC8G+L164aAtJ5SBaL50gr0ghYpTJ8SZEHWT+m9QQISjUTD4ApZ4OY0 5PtA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1689680438; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=9nAs4PEgRZ836zl1pP7Ag3osiO18Y/hoNYTgzgYWHqA=; b=LQjsNuC2/pCXild6nQBwXP6z1nuWeJV9Txv/v8QCqDHLUrrqB2OBTcwuiCNdqXdRZz 0l3snnIPiJO/XCFE5zge05Kle91Tk2w8Pnt2X/+7FkYOyRUKLcN3FeFOiAyODgCB2tNJ uN++fzANPiemayQLASS+Qz/oc8UEFiWjvf4tjE7Mvceb76kJEEQrh5/KKH1PBrtxyCKN TLq6FthrLa5+DD60UcsPy2ocBmU+YQ9Sv0ilKwuu/obJuOKZVkWVtfQJLJqwD8VdHDDU JVTP2MqEtCnaux8O5fYXv8qcA36/WzaBKF7HV1xeQNESwKUMNL3tMPChmaWqY5Q7pnlZ 1vYQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1689680438; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=9nAs4PEgRZ836zl1pP7Ag3osiO18Y/hoNYTgzgYWHqA=; b=4FwUFruobAz9C6hytkLEZnDkinKpiqm2PvMkbbrNh0xliDVVoghtIGAFwCp3suYhk7 lwFw6C13IZ5Uc/UUEJBA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u45/mw==" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.6.0 DYNA|AUTH) with ESMTPSA id D0d0a8z6IBecbpM (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 18 Jul 2023 13:40:38 +0200 (CEST) From: Stephan Gerhold Date: Tue, 18 Jul 2023 13:40:15 +0200 Subject: [PATCH 3/6] ASoC: dt-bindings: pm8916-analog-codec: Drop invalid mclk MIME-Version: 1.0 Message-Id: <20230718-pm8916-mclk-v1-3-4b4a58b4240a@gerhold.net> References: <20230718-pm8916-mclk-v1-0-4b4a58b4240a@gerhold.net> In-Reply-To: <20230718-pm8916-mclk-v1-0-4b4a58b4240a@gerhold.net> To: Mark Brown Cc: Srinivas Kandagatla , Banajit Goswami , Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The audio codec typically used for the MSM8916 SoC is split into two parts: the digital codec is part of the SoC, while the analog codec is part of the PM8916 PMIC. The analog codec in the PMIC has no direct connection to the mclk of the SoC (GCC_CODEC_DIGCODEC_CLK). As the name of the clock suggests this is supplied to the digital part of the codec. During playback it will use this clock to transmit the audio data via the "CDC PDM" pins to the PMIC. In this case the analog codec indirectly receives the clock signal through the digital codec. GCC_CODEC_DIGCODEC_CLK is already managed by the driver of the digital part of the codec in the SoC. Having this clock on the analog PMIC part additionally is redundant and incorrect because the analog codec cannot receive the clock signal without going through the digital codec. Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Reviewed-by: Rob Herring --- .../bindings/sound/qcom,pm8916-wcd-analog-codec.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml b/Documentation/devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml index 5053799c88b5..94e7a1860977 100644 --- a/Documentation/devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,pm8916-wcd-analog-codec.yaml @@ -19,13 +19,6 @@ properties: reg: maxItems: 1 - clocks: - maxItems: 1 - - clock-names: - items: - - const: mclk - interrupts: maxItems: 14 @@ -109,7 +102,6 @@ additionalProperties: false examples: - | - #include #include #include @@ -122,8 +114,6 @@ examples: audio-codec@f000 { compatible = "qcom,pm8916-wcd-analog-codec"; reg = <0xf000>; - clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; - clock-names = "mclk"; qcom,mbhc-vthreshold-low = <75 150 237 450 500>; qcom,mbhc-vthreshold-high = <75 150 237 450 500>; interrupt-parent = <&spmi_bus>; From patchwork Tue Jul 18 11:40:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13317035 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 0F6EBC04FDF for ; Tue, 18 Jul 2023 11:40:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229870AbjGRLkx (ORCPT ); Tue, 18 Jul 2023 07:40:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230362AbjGRLkt (ORCPT ); Tue, 18 Jul 2023 07:40:49 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17481E75; Tue, 18 Jul 2023 04:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689680439; cv=none; d=strato.com; s=strato-dkim-0002; b=he3zbxol7Eutot+rDN9ngVPc+60F9RyVv2fpwM4KtTgM2niQHZougLu68uQ6M1G+JF aCSExsLDEVBhPyNtGNGwyFyU+/Vz3CmmjZ6BrY3W0dx+6OCLo7y0OQpYNFoPDZbRVwhY XRyktMLLvpm64F6plmky/TlMVc/gH6MJSKsD+Hc4Fbtd+ue7xEigVEL6xtDf1h/FKmTx Uzc8/mHk4VdHPCWGhZYEofKBt90PTnD/TAqvV8JkhmTfGPVqG42zWF+zl8oLvMoCu+5a s/LKAamhSdHDx+XUc9TKY0bWb7DaXqy4To+9e3o3layT9Het4HwGgVFSpPZaAvV3mNBv G3Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1689680439; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=3Xs5nxIGQOE10yC+AGjCn4bCSkdyLg/EjjkDzz6aSHg=; b=N2H3TVv28KDEOx+YDoD90xLJ+5HsU2Lj0PVaHFgum2VM/zsmibHijupnKBsyf0St7Z Mlx0MeQ03PSb9jNszfYgTgdO1enFSbSO9QT5e8A++lpraaZDXrSZbohdMjmQOtYreweY sdUMkbIWl+ZFe0zuy+ZsH3xnjoGe37ukEYjGDRcTrqsD4fkIUPmV7Y9W/nq0SGKqDT+1 L6RvWy7be5XQ8xz432u0qNAZ5D2yxqAF8EbqmjrCuOTwLrwtTCwo7wOwroMlkrqAi/nt Sicxs0KnSei328cxqQR7gngMMzcin79hO02v33R931zQP7Q/DgWhYPWX0k02dYKWLc6u sBpw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1689680439; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=3Xs5nxIGQOE10yC+AGjCn4bCSkdyLg/EjjkDzz6aSHg=; b=KKterwiS7ksOzcDKEts2E36g51hpBDgO7r2DSXddS4dDrtSdeJx+/ZTI1+/vwu82Bx mBglRfoMxIT1kFhHCMY0+2+e1LcRY4+zF19ClhJ24WawHFolOP25kK/d+IYOuyTgqCKp NhXcPAZ9OPBb/E0/li5j5BRvULyxjiEOY6b+j4YUKltCfOD+T6d3COOLIYBfwxDm4bud KQNjoFjDB0ns3NF2N4dpO9aYr0CTPgxnOnl5vmKjk70h9GrF03hiNbog9hISNNLDCd92 kT88mZ+7sHy0q4SEQSWU73hEEyd08mLwevfnHLTMpfTQl32rKD1U/E2HtHgdtmXwWITg Sc5g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1689680439; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=3Xs5nxIGQOE10yC+AGjCn4bCSkdyLg/EjjkDzz6aSHg=; b=ojnsujMmxbjbZX6m3rDdzIBAhdpGSLNJWuQdXuM/ZJOPVSZy4jSiIIax89cZCvsrpG y9Uq533BvF9bKfEpZIDw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u45/mw==" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.6.0 DYNA|AUTH) with ESMTPSA id D0d0a8z6IBecbpO (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 18 Jul 2023 13:40:38 +0200 (CEST) From: Stephan Gerhold Date: Tue, 18 Jul 2023 13:40:16 +0200 Subject: [PATCH 4/6] ASoC: codecs: msm8916-wcd-analog: Drop invalid mclk MIME-Version: 1.0 Message-Id: <20230718-pm8916-mclk-v1-4-4b4a58b4240a@gerhold.net> References: <20230718-pm8916-mclk-v1-0-4b4a58b4240a@gerhold.net> In-Reply-To: <20230718-pm8916-mclk-v1-0-4b4a58b4240a@gerhold.net> To: Mark Brown Cc: Srinivas Kandagatla , Banajit Goswami , Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The audio codec typically used for the MSM8916 SoC is split into two parts: the digital codec is part of the SoC, while the analog codec is part of the PM8916 PMIC. The analog codec in the PMIC has no direct connection to the mclk of the SoC (GCC_CODEC_DIGCODEC_CLK). As the name of the clock suggests this is supplied to the digital part of the codec. During playback it will use this clock to transmit the audio data via the "CDC PDM" pins to the PMIC. In this case the analog codec indirectly receives the clock signal through the digital codec. GCC_CODEC_DIGCODEC_CLK is already managed by the driver of the digital part of the codec in the SoC. Having this clock on the analog PMIC part additionally is redundant and incorrect because the analog codec cannot receive the clock signal without going through the digital codec. Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold --- sound/soc/codecs/msm8916-wcd-analog.c | 43 +++++------------------------------ 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c index cec90cf920ff..d4456a714c97 100644 --- a/sound/soc/codecs/msm8916-wcd-analog.c +++ b/sound/soc/codecs/msm8916-wcd-analog.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -1198,12 +1197,6 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev) if (ret < 0) return ret; - priv->mclk = devm_clk_get(dev, "mclk"); - if (IS_ERR(priv->mclk)) { - dev_err(dev, "failed to get mclk\n"); - return PTR_ERR(priv->mclk); - } - for (i = 0; i < ARRAY_SIZE(supply_names); i++) priv->supplies[i].supply = supply_names[i]; @@ -1214,17 +1207,9 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev) return ret; } - ret = clk_prepare_enable(priv->mclk); - if (ret < 0) { - dev_err(dev, "failed to enable mclk %d\n", ret); - return ret; - } - irq = platform_get_irq_byname(pdev, "mbhc_switch_int"); - if (irq < 0) { - ret = irq; - goto err_disable_clk; - } + if (irq < 0) + return irq; ret = devm_request_threaded_irq(dev, irq, NULL, pm8916_mbhc_switch_irq_handler, @@ -1236,10 +1221,8 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev) if (priv->mbhc_btn_enabled) { irq = platform_get_irq_byname(pdev, "mbhc_but_press_det"); - if (irq < 0) { - ret = irq; - goto err_disable_clk; - } + if (irq < 0) + return irq; ret = devm_request_threaded_irq(dev, irq, NULL, mbhc_btn_press_irq_handler, @@ -1250,10 +1233,8 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev) dev_err(dev, "cannot request mbhc button press irq\n"); irq = platform_get_irq_byname(pdev, "mbhc_but_rel_det"); - if (irq < 0) { - ret = irq; - goto err_disable_clk; - } + if (irq < 0) + return irq; ret = devm_request_threaded_irq(dev, irq, NULL, mbhc_btn_release_irq_handler, @@ -1270,17 +1251,6 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev) return devm_snd_soc_register_component(dev, &pm8916_wcd_analog, pm8916_wcd_analog_dai, ARRAY_SIZE(pm8916_wcd_analog_dai)); - -err_disable_clk: - clk_disable_unprepare(priv->mclk); - return ret; -} - -static void pm8916_wcd_analog_spmi_remove(struct platform_device *pdev) -{ - struct pm8916_wcd_analog_priv *priv = dev_get_drvdata(&pdev->dev); - - clk_disable_unprepare(priv->mclk); } static const struct of_device_id pm8916_wcd_analog_spmi_match_table[] = { @@ -1296,7 +1266,6 @@ static struct platform_driver pm8916_wcd_analog_spmi_driver = { .of_match_table = pm8916_wcd_analog_spmi_match_table, }, .probe = pm8916_wcd_analog_spmi_probe, - .remove_new = pm8916_wcd_analog_spmi_remove, }; module_platform_driver(pm8916_wcd_analog_spmi_driver); From patchwork Tue Jul 18 11:40:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13317034 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 1137AEB64DD for ; Tue, 18 Jul 2023 11:40:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231703AbjGRLkw (ORCPT ); Tue, 18 Jul 2023 07:40:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231263AbjGRLkt (ORCPT ); Tue, 18 Jul 2023 07:40:49 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [81.169.146.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56E0D10FE; Tue, 18 Jul 2023 04:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689680439; cv=none; d=strato.com; s=strato-dkim-0002; b=oK4gxsT3eHZ94nHchtRlLJNuPv6daCdQG84QKMwDIQb1l/IRIz0Vc55cAsTGKrz5xl 3sf06S+0ZVO1RZGXBPKnExg3ouantqpBgiuLyx4gz4lKbO2v7n7apjPGBBKPceMCjUnW dA3S574x3mU2l7EwAC1eoxO/4ByhTd1/jDEGVLU03GmHv+R52zyI3yVrlML/mE5pU3J8 23HJImaBtet6YEA8OnETB5v10auCA4V6tE+mB/yHpiYHdPTvGagmF2Pf7kzuROtJQyLB UL5sICQlAoDt0IHlEBAuogyypZUgHn2Yaj/xliqkq3mPXMXueoNQt4itLVtEMwwlbzmp sllQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1689680439; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=DyT5d0eh0/jTHCEcjHCZZZfipa2RUFTxaspkR4U3YH0=; b=sZG3TBQhz2wrONxoYWTlmGjH0gMDFgvbeSTqaTDiin48eJIdA74PIIL9LQxWT35ZMK TfV9iu/q0AhiYlDUO5CH/LYQwacv+YKksii1X0iY2LZVrm5taBFcyIvpjg1U3VbD2wSj TiqDsgvRrzrCU2kCcLwlt4r3TDx+Psths8NqKrHsfrIXw7HiW8biVeIwWf8zEwBv1Fv/ mGn7mjFivsQFxJqXJxSFzOhoEoOu9flFI4Xi+g52sfoVQB0C+O5Y1FGYl3c7reG3uZa8 aXlSbkKjUL/WL8garnF/I/nQ/OKZclN4AONlqOMFf+s7Gidny7q9Zvdj0FH3bpjXa2uH iENA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1689680439; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=DyT5d0eh0/jTHCEcjHCZZZfipa2RUFTxaspkR4U3YH0=; b=aX6fe6Tg9hQ7s1FUnfzoCnS75dXqnivx/hO36KNV3L47C2B33qLLwycE/nDn/j4+zS 5LD53T3zwgaPeASpvfJJon1oWf1+/XkGwGEMT8DHxDD3B3H8PiW+c7b+2iS7bwAwRRNl YMVMcfgvTu2rWb+5ocwBibfVU8kguvZS5FTkNTEFyRmtvWHN3nUpJy485zAVE5DpTlSt HFQrgxEsy1Uui7YXK97e+DMjGH0Ueik5JlS9SypS+WD+mApS3CpfSQtFYVz89aepaZvR 4lj7iAMyWBOBcyDYAbPpKIfQKUR2OjVwiAsR1+Ah1/NCZD3vQjWGU7OM8dftSYW/h4TJ Xc5Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1689680439; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=DyT5d0eh0/jTHCEcjHCZZZfipa2RUFTxaspkR4U3YH0=; b=S7LPsRV5v19JJRqP3iHxccjg5XVH7nylcbO2qVkzF3oMoRIb4wGoCll2lbk5NwPzTL DQG21kRboafaY21Wo9DA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u45/mw==" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.6.0 DYNA|AUTH) with ESMTPSA id D0d0a8z6IBedbpQ (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 18 Jul 2023 13:40:39 +0200 (CEST) From: Stephan Gerhold Date: Tue, 18 Jul 2023 13:40:17 +0200 Subject: [PATCH 5/6] ASoC: codecs: msm8916-wcd-analog: Properly handle probe errors MIME-Version: 1.0 Message-Id: <20230718-pm8916-mclk-v1-5-4b4a58b4240a@gerhold.net> References: <20230718-pm8916-mclk-v1-0-4b4a58b4240a@gerhold.net> In-Reply-To: <20230718-pm8916-mclk-v1-0-4b4a58b4240a@gerhold.net> To: Mark Brown Cc: Srinivas Kandagatla , Banajit Goswami , Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The probe() function fails with an error for platform_get_irq_byname() but only logs when devm_request_threaded_irq() fails. Make this consistent and fail to probe in that case as well. In practice this should never happen unless something is really wrong. Signed-off-by: Stephan Gerhold --- sound/soc/codecs/msm8916-wcd-analog.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c index d4456a714c97..9ca381812975 100644 --- a/sound/soc/codecs/msm8916-wcd-analog.c +++ b/sound/soc/codecs/msm8916-wcd-analog.c @@ -1216,8 +1216,10 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev) IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, "mbhc switch irq", priv); - if (ret) + if (ret) { dev_err(dev, "cannot request mbhc switch irq\n"); + return ret; + } if (priv->mbhc_btn_enabled) { irq = platform_get_irq_byname(pdev, "mbhc_but_press_det"); @@ -1229,8 +1231,10 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev) IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, "mbhc btn press irq", priv); - if (ret) + if (ret) { dev_err(dev, "cannot request mbhc button press irq\n"); + return ret; + } irq = platform_get_irq_byname(pdev, "mbhc_but_rel_det"); if (irq < 0) @@ -1241,9 +1245,10 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev) IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, "mbhc btn release irq", priv); - if (ret) + if (ret) { dev_err(dev, "cannot request mbhc button release irq\n"); - + return ret; + } } dev_set_drvdata(dev, priv); From patchwork Tue Jul 18 11:40:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13317033 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 508ADC00528 for ; Tue, 18 Jul 2023 11:40:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231693AbjGRLkv (ORCPT ); Tue, 18 Jul 2023 07:40:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbjGRLkt (ORCPT ); Tue, 18 Jul 2023 07:40:49 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA87510F5; Tue, 18 Jul 2023 04:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689680440; cv=none; d=strato.com; s=strato-dkim-0002; b=bxJEewCmKTsxShVrLusqoZ4GKwdrG53rtIgidVQJUNWPQFmK/bzn+NIi1lGf/gZXtj LBD9s/SKJot+tW1wURR9WPpUb3yDi6vN1uAnZiH4sTL0QE/gs27TZ3lkD4J1upOrmhDR SgvWaEi3AH6xEf9HkCmIgOshiO+g22LYfo3J8kNqQejBPgBTtCxTZ8iZ8T/bK6JGARcf NAaQRRSlvji1cwES95CiBJlbd40yOhTl9VYQPAqMAc+KU2h+dWkO6bkjFJKbB37y8fXu YOaa1QyUzW7OjhvYQ0QoyOKp8WktYj+OubQ1n69BhpqXW1YqiEmFr7ps9TMVotOeOmh4 Rkbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1689680440; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=vteLTIoeDwJEb7tTBHVxn9SENfUDXfypYONPVknY2OI=; b=ACqCJGfZSsul7barksXv6Gt4lAMbV5raYbv6IdlixGtj/1VZZcRm3Q6dq7oh/qIKJp wjjRvQVUeubETDh63v7NZduRW9Rkf5d03CUlw1QbK9JSkpUWYtHKcbkXJ7zLKAdn0mwZ hWu/+MB4YTAEk4Y4RVc2sVsiKR3PQrm5eKT2OkmF3nLQhbTI2xCIp5bHXPvkjNrpBWeq bPaclM1qrbhwULP3X1QFr5UlCn4+EEZew9YZw3Q3n3WzJiW1T8WyMzV9k7cU81wAqB/r a9JWcrzSDZ9cEQpF0kAyQXjgUJS+voetSYNyccBDu3tXd9R90OSfytP4xF/EmsQOd0BJ AAEQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1689680440; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=vteLTIoeDwJEb7tTBHVxn9SENfUDXfypYONPVknY2OI=; b=GOtbLx0A/gDA7QjoijZd6RZ6Py0WPlH+b9ZUEXgqJN2KclTwsESB4RyUPywQiOmaX/ YtrNXaigGv9RIIBOR58k+ILvK5f3vw9dP/6uXTT1yO/q3LoYPcGhV/R2/9JLdO/K+btW ybu65Lk/n44ah4bN5kB/Ywo/Mcl205udLgX+flrjPucNSEIGRbD7cNgdEOJ2QSOGME9X of3qbuX2Zi7OZQReKRRNSamTRIL/Dkq3PzZEmykcfYArzthqrL/wzhSH1YCLZznF2IiN 38WYLmkij5QV1ayAv4mxxCQ5JbUC2U1ziNtvppzxOXfg7fz20Atr+sjIaWhmfvsPDDMD D1PA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1689680440; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=vteLTIoeDwJEb7tTBHVxn9SENfUDXfypYONPVknY2OI=; b=E/QakzoEEBxCqf7ER/+p72LxejX7PynRA+/2eh3n+nQMD3Er/NJ3uS5r40JYFw41li fN7c3DdTxiOTo7YrSwDA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u45/mw==" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.6.0 DYNA|AUTH) with ESMTPSA id D0d0a8z6IBedbpR (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 18 Jul 2023 13:40:39 +0200 (CEST) From: Stephan Gerhold Date: Tue, 18 Jul 2023 13:40:18 +0200 Subject: [PATCH 6/6] arm64: dts: qcom: pm8916: Drop codec reg-names and mclk MIME-Version: 1.0 Message-Id: <20230718-pm8916-mclk-v1-6-4b4a58b4240a@gerhold.net> References: <20230718-pm8916-mclk-v1-0-4b4a58b4240a@gerhold.net> In-Reply-To: <20230718-pm8916-mclk-v1-0-4b4a58b4240a@gerhold.net> To: Mark Brown Cc: Srinivas Kandagatla , Banajit Goswami , Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Drop the redundant reg-names and mclk from the PM8916 analog codec that were removed from the DT schema. Having the mclk on the analog codec is incorrect because only the digital codec consumes it directly. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 2 -- arch/arm64/boot/dts/qcom/pm8916.dtsi | 3 --- 2 files changed, 5 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index f3d65a606194..52bf876b8cc9 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -328,8 +328,6 @@ &mpss { &pm8916_codec { status = "okay"; - clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; - clock-names = "mclk"; qcom,mbhc-vthreshold-low = <75 150 237 450 500>; qcom,mbhc-vthreshold-high = <75 150 237 450 500>; }; diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi index 1ea8920ff369..78187c0c94ce 100644 --- a/arch/arm64/boot/dts/qcom/pm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi @@ -142,9 +142,6 @@ pm8916_vib: vibrator@c000 { pm8916_codec: audio-codec@f000 { compatible = "qcom,pm8916-wcd-analog-codec"; reg = <0xf000>; - reg-names = "pmic-codec-core"; - clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; - clock-names = "mclk"; interrupt-parent = <&spmi_bus>; interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>, <0x1 0xf0 0x1 IRQ_TYPE_NONE>,