From patchwork Wed Jun 12 16:15:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804202 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 7610BC27C53 for ; Wed, 12 Jun 2024 16:16:40 +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 BBD3FEAB; Wed, 12 Jun 2024 18:16:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BBD3FEAB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718208998; bh=lGtoXBpE7BDm5Q/i2Wcu8KAtimyFq3GJwH5lkJgYlCk=; 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=kdmhIjkiK595+TyY0Du3Ja23HhnHhKXyVqAiFxxaik+n1kvDlDwShkpKjMEh1ZtnZ pvSqs6K0QVSBoO+kWaknUGmuHipPjbMvtrf/rOMLh81sJZdlPtwYa40ZAYBZwfs/rF L3OfwkgAoEdp/Rvrcp+YJQHNvNbHa+VKyRoJkOmY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id AB37AF805E4; Wed, 12 Jun 2024 18:15:57 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A66FAF805E0; Wed, 12 Jun 2024 18:15:56 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C90FDF80589; Wed, 12 Jun 2024 18:15:50 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 9E53CF80579 for ; Wed, 12 Jun 2024 18:15:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9E53CF80579 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Vt21Ejub Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a6265d48ec3so11667166b.0 for ; Wed, 12 Jun 2024 09:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208943; x=1718813743; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=L9YTFDAJLldVwDTE+9nejuBs9to0bqe8LPxJleVEXTI=; b=Vt21EjubynbmfE95CM215Nc0ld2VMIvUBJwHgcVF/kzCths7r/ttXjHEYfp2d/vqV9 K8M5pr/jyNzIS+ovSb6wHKrXZl3Thd90LfrvVhMsbP2uiQrMfuN3ezrDpmZsI0MiNes1 2N6bu2FixCN3ZV4k7TWWTkBZrojWIVMILjDCugbVBPyi/WtWGuO7dgEuai9frQkeQBql HasYBEXlddpRNhqY0jIdkbGPJBwSF/bXTXmqXyZHsgbUDDfu0dM7lI37cbLsZ1SL+tTc xb+SFixY4r1lO9ToorAkDL7ybioYSWwhcpq8jpejO+2iP4ZIe3qyPqfP/fko4rvwGiTz 6zBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208943; x=1718813743; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L9YTFDAJLldVwDTE+9nejuBs9to0bqe8LPxJleVEXTI=; b=VUznC/bNE5yW9dFmhnpAiDZgP0Y3utPDwIYN1ZdkoeH/xlw5fzA4+3HJe1M7/jRpKn MUr65xn6kNwSRJY5TctoarvaDDbgYGhp+GHRgvTGrEe8E7OV3/s/qy2ZR8d+0tp2r8Ek vceBA+NGJAKBxBERJDipZwWdW7sIA5fCLxdUKus17m9ziLZnQN1XJYK/9RO1xF8d248q bBhByLlHVeu9dVml9UVuAPDjIgTOOIzM95LrssCKDY73Gp4LYtk3KWfERdD3IuNMwwOK s86QP9bY9/dFMHLDICNqgAsje0dfm3CBruBfOAFTMu/kaJiNW4Doa+RGIR/nn2wbnM1n Xgxg== X-Gm-Message-State: AOJu0YwYTbdNsOATdBJIh/cGBx9WpHr8WNQCO/qVGAAPGfkkeUmbI0Yb HfsbTQ69aVemykkt29udsGJWrb846Q4mUf6JEE5uvCmVKphB3zpBJrE3xekWhtY= X-Google-Smtp-Source: AGHT+IHyqUxUeWkSg1n1U8oNvkVbbey8z/8Bqdaq6epsNoTgDYD0JfIM/ekgt7b5n0xo20G2rwmO0Q== X-Received: by 2002:a17:906:55cf:b0:a6f:1f67:9815 with SMTP id a640c23a62f3a-a6f47cbf200mr132578466b.33.1718208943604; Wed, 12 Jun 2024 09:15:43 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:43 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:14 +0200 Subject: [PATCH 01/23] ASoC: codecs: wcd-mbhc: Constify passed MBHC reg fields MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-1-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2446; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=lGtoXBpE7BDm5Q/i2Wcu8KAtimyFq3GJwH5lkJgYlCk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmXbkCdl7gUWmJ4PrYh5YY44RWpc/Hr1isIl 6mOhW2URX+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJlwAKCRDBN2bmhouD 1/0oD/wK37LUGMcsFyd0V3lhgpczQVaknnrVNkiMiWdEt+e6xIeZe0DXhnbdD3WQcNCxP4iPBtS luPHSRAve/nIvjamz/2Uvpj/AYXmdkuZnUDyy/uPlLCBwDgUoX/bJbgyqxFsb416+mjQEVrd9Fc LjeyEv3KG+T2JB7strwvK8jmmKcNUW0ia7cHWHV68EfSNuvALNeHZqeaE93j6jGqq1vpZiRqkXL 9ayNhupSwpG/f00+Ivuwfr28cgxgGlf0dYV2zDz2GH+7dMn+egsbMl1lzhc7/syObHRHyqj4eoK VWevQEnDQFdQ7YUeIJAsfMXcc87flB+HqFsl+it1C262Oe9QI9ljEzPiaEagD20VtuNvfQOh5Mg 0wL3LJ1wf5MfORQW8I87h3lIvLR8/rnSmNzaZ43TVK/r11Pa9VomoJ8WTsCQGunN5taUrQcu6vC I90MzIUGiOC8K0OZ97mu0l8GXIAzLGbYZ11XSnxvsCSEvoJFamQPiD3r9aP/Kn65aEdZvJ8BDTO B+GUksYmNyQgMkzUod7U+h+UIDeF6/jCjD6Up4R8ZyU6kczLsvysNjs3S7ytDp4RqFLKFq/6v7s +0DB6AyHkM8xhrKZOV55+Yb+kVD9NG6Pkx8cnRfxTMQd4OZkF4G8nTNno/ckGclPOSufkUPyCnk JohcYRKSVGUSygg== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: BCQKHKVADGDXEIVYTX2RFUY5VK5ZWFT7 X-Message-ID-Hash: BCQKHKVADGDXEIVYTX2RFUY5VK5ZWFT7 X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: The wcd-mbhc-v2 helper code/module does not modify passed array of registry fields, thus it can be made const for code safety. It will also allow individual drivers to allocate the array in rodata. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd-mbhc-v2.c | 4 ++-- sound/soc/codecs/wcd-mbhc-v2.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v2.c index 0e6218ed0e5e..d589a212b768 100644 --- a/sound/soc/codecs/wcd-mbhc-v2.c +++ b/sound/soc/codecs/wcd-mbhc-v2.c @@ -50,7 +50,7 @@ struct wcd_mbhc { struct wcd_mbhc_config *cfg; const struct wcd_mbhc_cb *mbhc_cb; const struct wcd_mbhc_intr *intr_ids; - struct wcd_mbhc_field *fields; + const struct wcd_mbhc_field *fields; /* Delayed work to report long button press */ struct delayed_work mbhc_btn_dwork; /* Work to handle plug report */ @@ -1505,7 +1505,7 @@ EXPORT_SYMBOL(wcd_dt_parse_mbhc_data); struct wcd_mbhc *wcd_mbhc_init(struct snd_soc_component *component, const struct wcd_mbhc_cb *mbhc_cb, const struct wcd_mbhc_intr *intr_ids, - struct wcd_mbhc_field *fields, + const struct wcd_mbhc_field *fields, bool impedance_det_en) { struct device *dev = component->dev; diff --git a/sound/soc/codecs/wcd-mbhc-v2.h b/sound/soc/codecs/wcd-mbhc-v2.h index df68e99c81a3..b977e8f87d7c 100644 --- a/sound/soc/codecs/wcd-mbhc-v2.h +++ b/sound/soc/codecs/wcd-mbhc-v2.h @@ -279,7 +279,7 @@ int wcd_mbhc_typec_report_unplug(struct wcd_mbhc *mbhc); struct wcd_mbhc *wcd_mbhc_init(struct snd_soc_component *component, const struct wcd_mbhc_cb *mbhc_cb, const struct wcd_mbhc_intr *mbhc_cdc_intr_ids, - struct wcd_mbhc_field *fields, + const struct wcd_mbhc_field *fields, bool impedance_det_en); int wcd_mbhc_get_impedance(struct wcd_mbhc *mbhc, uint32_t *zl, uint32_t *zr); @@ -300,7 +300,7 @@ static inline void wcd_mbhc_stop(struct wcd_mbhc *mbhc) static inline struct wcd_mbhc *wcd_mbhc_init(struct snd_soc_component *component, const struct wcd_mbhc_cb *mbhc_cb, const struct wcd_mbhc_intr *mbhc_cdc_intr_ids, - struct wcd_mbhc_field *fields, + const struct wcd_mbhc_field *fields, bool impedance_det_en) { return ERR_PTR(-ENOTSUPP); From patchwork Wed Jun 12 16:15:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804201 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 9F7CEC27C53 for ; Wed, 12 Jun 2024 16:17:19 +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 DAB12857; Wed, 12 Jun 2024 18:17:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DAB12857 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209037; bh=TdNpNaj0eDwPSxq1ZGkE2FZQIvk+R7zfpn4gMLOjX+A=; 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=iAF4Zs5ueUjj3/Tt7aomMx4sylu+Ex58UNAep14K8mA0Evq//ZK1fEd1nBKrYWrv2 qF1RNGh5YeXjkILTRzjxL8ofw5CR9E9P3jRfqrWXNH+pOSzYiLlbMbtDCimDfHbGMN RG4UGF7V6brpTy13wllT3gPis9kE1+IN9jTbtB2U= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 61BE6F8061C; Wed, 12 Jun 2024 18:16:03 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id CBAB2F80641; Wed, 12 Jun 2024 18:16:02 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8FE68F805E0; Wed, 12 Jun 2024 18:15:55 +0200 (CEST) Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 7D081F80578 for ; Wed, 12 Jun 2024 18:15:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7D081F80578 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=bT9uVv/h Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2eaae2a6dc1so138353301fa.0 for ; Wed, 12 Jun 2024 09:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208945; x=1718813745; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zaKNd5i+gdVNaPciWa/D++J8qKGcN7FLtSQUh7AiY4Y=; b=bT9uVv/hoRtaFmrZiEZDD2/yx19FS6vY057r5o4fEWGgvVFZWl6o/UvgtgBErRE9iz ZwB3HAvE5SAL6D2Z6eST/qezNiMGdU6dwt/ShgoB87Wa8Sr8wnmj7xONkUEfG9oeC2a/ bhOpfPfqxPsZIWFa25ybqAt/7YtxKi/OV2W+6bYAAyGGm+a165Z+7X3EaqvzagHKgOnZ 1uti2ehOrlQP+oIYT01UJfWE408C1Eg5cRKHr5ZddNsZu2TTfvdrj57gobUfCo2mebue mklf6/e1vIh9mdELk3cQzmKMuFrYog4sgBLWp7lXWIwsDC7RKrSgr0o9qFUtSTTdZa8Y brWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208945; x=1718813745; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zaKNd5i+gdVNaPciWa/D++J8qKGcN7FLtSQUh7AiY4Y=; b=gVKcJczYbMZKDnlSgqrzBGtKO0pXkrvNqyxmCW9GVrkeMANO9RSei+4kt+fcSARDfe JowOBVr0Q0E/YQnANYIzvcoF/pE7IcTclhnl3JaNOPmblQSVBZ5Ux81vQrlwik+Kq9GA lLAOeQ8E+tX56qrexmGG2MCuIB9KgiS/Li1BnQNub4zqmaSiW6fWcSmpd18jABSz7eBl L5zSS8bmgR22mOqZ1xecZv/hwAhtdDescnsEeG1aoq7a025UijaWvlOFMRQ84Tx3Q8MK 1Trr8gBpZnP5CUncjEetq/x5LzLjHUJBcsGtv7yJHuZICO18L4JQvPLOWBxw5PCQ709x 1+TA== X-Gm-Message-State: AOJu0Yzr6XNBPkGPSIhvudrePcWIx1qlUdAP5X3u5BMZQePN753bieBB gOAwCEySe6Ln8RZbVXVXMGXPkqeVRduKeB40Q95I/C86MlIl2/P1nZT2DL5bjuo= X-Google-Smtp-Source: AGHT+IEzwT2wxUG76kYf4EvMc9Yl30u9Y8PGMPa0J3TjZNyfXgkujITCkQDy+SdY3WFDHmynS9zvlg== X-Received: by 2002:ac2:4255:0:b0:52c:823f:2a10 with SMTP id 2adb3069b0e04-52c9a3bfbacmr1594725e87.1.1718208944923; Wed, 12 Jun 2024 09:15:44 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:44 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:15 +0200 Subject: [PATCH 02/23] ASoC: codecs: wcd9335: Drop unused state container fields MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-2-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1182; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=TdNpNaj0eDwPSxq1ZGkE2FZQIvk+R7zfpn4gMLOjX+A=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmY8YBeHR15m8f+5MErlfvmIqZp0bmj+SsSf RNUS9y57USJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJmAAKCRDBN2bmhouD 1wL1D/4m9Z8zECPMaR+QlPgGunewXkoXk4J8kftoxOJj041f12JKBnLg6dCCKMumkStuyALj26P GTcjwaDvh8pZ5ZDQdWRsIkz0ybb+P/SV4w+fFivPV5aCA9vSd8FhFe27SR/cR5pUHdaOZbbCCwa 7wdTp6mQ8vU/913MBTKAmIwvyRxxUYgizmDR+DCXgCqW4DXSiStrHVgWxNpTHGrr6y6FOOs5jHE 98kKSF0cCcmjlSBq066h1hq5n6RdiAWXqQ09R19dGMGIVh/+2tBtmhqdLsJuOpJv7U7Icuj3+wz Nos33lpPPUdIP7fjGEsrCfjTEHwYm9XWH5lLbFHAiL02thR/RSmCITEUjr2wHXfitMb7/BwlXbA r5RSwDsmqyIJTBxg2Ai90wyi2k3OxY9Z1Wv2D7/8A9pInpnBnn1/4dRebMXHO16T5TeNfESqOqo r0yonRkAWKWERkv+/Uwcb8FVJ/axk3ruw6xL6kG00RORnksktUrVx82ugI08z7Dt7h2x2eL6GWn 9JoeEUUWe9aJuMELV/BWAb2UuzdbomV7pXF6on3ZH4310rP2TBQda6pWWWKRmnLdb00KkTrWmZl OzoEH4Ir5kYhjM29ccF3nGwj845CsJGLXUivBinWBT2uxMvuWGRQmU8IKJYCHMSElYQze7OFE4V dI8DwQKo7I0y9Dw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: D2QWCICEA4R4RLYDEKLLA7SHLNULEM2U X-Message-ID-Hash: D2QWCICEA4R4RLYDEKLLA7SHLNULEM2U X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: The driver does not use few 'struct wcd9335_codec' members, so just drop them for smaller code. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd9335.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 42a99978fe5a..60e7704e48d2 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -297,7 +297,6 @@ struct wcd9335_codec { struct clk *mclk; struct clk *native_clk; u32 mclk_rate; - u8 version; struct slim_device *slim; struct slim_device *slim_ifc_dev; @@ -347,8 +346,6 @@ struct wcd9335_codec { int dmic_4_5_clk_cnt; int dmic_sample_rate; int mad_dmic_sample_rate; - - int native_clk_users; }; struct wcd9335_irq { @@ -5109,7 +5106,6 @@ static int wcd9335_bring_up(struct wcd9335_codec *wcd) if (byte0 == 0x1) { dev_info(wcd->dev, "WCD9335 CODEC version is v2.0\n"); - wcd->version = WCD9335_VERSION_2_0; regmap_write(rm, WCD9335_CODEC_RPM_RST_CTL, 0x01); regmap_write(rm, WCD9335_SIDO_SIDO_TEST_2, 0x00); regmap_write(rm, WCD9335_SIDO_SIDO_CCL_8, 0x6F); From patchwork Wed Jun 12 16:15:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804198 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 51248C27C53 for ; Wed, 12 Jun 2024 16:18:57 +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 AF2ABDF9; Wed, 12 Jun 2024 18:18:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AF2ABDF9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209135; bh=kmHrZal9uMPsgRPbVS2wX2WDN6jgfyJMmeShmB1SJBo=; 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=C/RIZ9G9k3INPtDVGuLNdj5LaBCuCvz9Hxtfc/WDs5tcS7go7q2PnHpRu65JGrZBC odFYlXSWvMbMNvfkBd+JcDbeZ3BWGthSqgNQLhf35frHBm/CTn7sKz7pntSyVUS4j8 fM5yyNLSeSyYf6LSKsr8haYtN986tDChC4lzXejU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 00E90F80751; Wed, 12 Jun 2024 18:16:17 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4560DF80752; Wed, 12 Jun 2024 18:16:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A9BBDF805AC; Wed, 12 Jun 2024 18:16:05 +0200 (CEST) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 75A9EF8010C for ; Wed, 12 Jun 2024 18:15:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 75A9EF8010C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=gHtVPwf+ Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a6f1c4800easo6785066b.3 for ; Wed, 12 Jun 2024 09:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208946; x=1718813746; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1vbzfTDLIXVMqmme/hD5kLRfNrGqESO/8cdwhRwG3gw=; b=gHtVPwf+y1fnlZyZ5WzYGwI297T0a21MCtPQ9Wuq9esbdX4iAgbX8tcMjTsk7lMm/G Ei2yx5q2ZxumQG4hQ52j0uVBtv2Nucb6eluOHTrfg18p/aYHApVwdyYJq9OBryP9m+ec IJ6ScMM8f6j3saMaGXK1cMSVg6Nndk4YTvIYhKtSgp/t2PhiKx4Tnim3w1DidNos+js6 H9QL+wULhuHDEaLPzX+4vX3ck47q9+IlrldL3lyZZsDirHfzwl5ay1GcoK/RGZz+KMNb IPr9pqyedtQJe7sN3T9To52wtyaW/RRi1RBVbAVX1e1LcDcRDJe9K2We8isYHzrfcbZf hyDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208946; x=1718813746; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1vbzfTDLIXVMqmme/hD5kLRfNrGqESO/8cdwhRwG3gw=; b=BlS2CFIiZX3mJ+U7s/JMTN1gGfgUWakdDNZD1w7HsisEjIpfB2/hA25+8CH6upwgUw MDx+ifB4qjCLEJ4D7Oa0cOM0TcIIIKzzriNYjiOvz5hfj/EDa8NNBPXPG15wKbl2o54F xNFan7ReE3jCrrjnSZXp0qNXTEkHrgUDsjyk0l/NNECy37ZTbIBgFnd+7Rc/7pU0nHX4 7jg3O/41oW+87MhxRISnoimZ73rdXOlJpNLIgUjRD2eiNF+oRJrAgFdShG93HhMYIUqO ALaOv3Z5r28OMOnKaWyjqne36C1WPV7YlLtjQkuZKMC+e+peSeJaKXBhi3StH+1/Mcd8 lq2g== X-Gm-Message-State: AOJu0YzwFo4QrHSfVGzKwRebgudJdpZE3I54OyyYNMWRgoiQNLsRhPk7 /2BG/7biRVcrdIWfs0AR/meVSE6M1VN5tDLErz1uhcHUha2GO+gQgLXFEf1eSK8= X-Google-Smtp-Source: AGHT+IGHo7iEHrMc6jZ+1uvhQ5GWbZxNEiTM+xSPoQ25wNo69BzSn1Gz2bKI/JAgaTLz5pYO3KXTWg== X-Received: by 2002:a17:906:d1d1:b0:a68:cc6f:cb5a with SMTP id a640c23a62f3a-a6f47ff7954mr124721866b.68.1718208946393; Wed, 12 Jun 2024 09:15:46 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:45 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:16 +0200 Subject: [PATCH 03/23] ASoC: codecs: wcd9335: Constify static data MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-3-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1876; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=kmHrZal9uMPsgRPbVS2wX2WDN6jgfyJMmeShmB1SJBo=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmZZugs/rmJyBKWN4qJvPQc9RXY0qGtUACXg e9KokazjtaJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJmQAKCRDBN2bmhouD 15pqD/wMYa35jKtzWSHg52wUZoc1riTh2ujENos0BMiZu0FIaRg1JHLUX9u+s5tb1WCAuJGpaOh aiARbNbjZ9qYYcz3BKViBe+ns4Z3KTeM23gOwUQZjpP17RhK1xE+Aq6ZBDOh78f3g8Ep6043Cdn Lo1bcFH9zmhz/6N90k9YPHHZfAH9cck5rEcd/f85v7YPrcwJl2fr+pgtYjA/pUl6kmCyltlAsVu hZpF2g6ZqDlDwHtsijkaVGuAZaylrm/Ev1FnHmvFE0GfUnNhqZeWN+FsBrByL57TNbePY+fS5oz 8o1zf5dAJz/w97D7G74N+gViSe5x5a3Lkn//301EZJw02AOpG61fGOup9XKrQGMi3ujkAIY3xR2 wQhuVesGfuWhKiQyQsALwEps4XlMviu8Zq2aHnAqZIfqrUjrp8hcaSL7wNavN9w3XA+/MTE7K7C EdnoWbbYMQ7DIcOE4bLRsT0j26y65+yqABu8wJZFqhBgQkVYWabWd+PnLClFdOUnQkXYI+IfQSX aWoYKP0xNNp2MnxJ6HUJFRY+yt30OxePV7UnpK+Gr7rIXQeLwHiUkZKM54dXZAJAxmJCeSDtqyJ Jn7yR+/oI3gH6kY1IfuGjU/0wi7BHO8W2XL//goRWEMIyg3Q1SinEM2akpRIkDxo4tVvnfcWkJ6 mo5QlXMSHSiDF8A== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: F6EPYBFYZMWEBHAVFZ2QI6MVHAL4KHNV X-Message-ID-Hash: F6EPYBFYZMWEBHAVFZ2QI6MVHAL4KHNV X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: Driver does not modify few static data (arrays with sample rates, interrupt description, regmap config), so make them const for code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd9335.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 60e7704e48d2..c5ac2d46e556 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -394,13 +394,13 @@ struct interp_sample_rate { int rate_val; }; -static struct interp_sample_rate int_mix_rate_val[] = { +static const struct interp_sample_rate int_mix_rate_val[] = { {48000, 0x4}, /* 48K */ {96000, 0x5}, /* 96K */ {192000, 0x6}, /* 192K */ }; -static struct interp_sample_rate int_prim_rate_val[] = { +static const struct interp_sample_rate int_prim_rate_val[] = { {8000, 0x0}, /* 8K */ {16000, 0x1}, /* 16K */ {24000, -EINVAL},/* 24K */ @@ -4023,7 +4023,7 @@ static irqreturn_t wcd9335_slimbus_irq(int irq, void *data) return ret; } -static struct wcd9335_irq wcd9335_irqs[] = { +static const struct wcd9335_irq wcd9335_irqs[] = { { .irq = WCD9335_IRQ_SLIMBUS, .handler = wcd9335_slimbus_irq, @@ -4960,7 +4960,7 @@ static bool wcd9335_is_volatile_register(struct device *dev, unsigned int reg) } } -static struct regmap_config wcd9335_regmap_config = { +static const struct regmap_config wcd9335_regmap_config = { .reg_bits = 16, .val_bits = 8, .cache_type = REGCACHE_MAPLE, @@ -4984,7 +4984,7 @@ static const struct regmap_range_cfg wcd9335_ifc_ranges[] = { }, }; -static struct regmap_config wcd9335_ifc_regmap_config = { +static const struct regmap_config wcd9335_ifc_regmap_config = { .reg_bits = 16, .val_bits = 8, .can_multi_write = true, From patchwork Wed Jun 12 16:15:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 803500 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 F0AD2C27C53 for ; Wed, 12 Jun 2024 16:17:03 +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 ED534A4D; Wed, 12 Jun 2024 18:16:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ED534A4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209022; bh=+6N7gMq4jHzelVlw8umcPCRfVgXICvRLvIVfctyIHUQ=; 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=OB0XKC43gyFAk0aA1au2OM4uASo0GNMf81jkdybFczW1/GJPcVcFQ0SsuWWjVZ+Qu CY5mj22ToynWM4sw1L11c1hYAKNz6xDzbZSNp+jHlhChMlpX0lhxwUIsOnyIBwtkOb ECc5Rxe5abS688XWYmsKuIEWBHQgruM7vYS3SuCY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0AB6FF80619; Wed, 12 Jun 2024 18:16:00 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3C6C3F8060D; Wed, 12 Jun 2024 18:16:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7CBACF80579; Wed, 12 Jun 2024 18:15:54 +0200 (CEST) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 DB7EDF80580 for ; Wed, 12 Jun 2024 18:15:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DB7EDF80580 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GzAx6Ky+ Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-57c6011d75dso2940563a12.3 for ; Wed, 12 Jun 2024 09:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208947; x=1718813747; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=UbUB+HoAqq7FbsjH4xIB6iwTWnEv+liGNHJk9xgO0cg=; b=GzAx6Ky+bd4+YcWtAJPdmRIhdP1JuY6+H9j8BoWkNq2zR+V4q2X4BfT+o75QmlDsXR PWf5+NJ29cUBs3RFwrPeXLmOJJoQo8NmwmhWusdsivmvAOvQCybhdJTtrDct0yceJUou fTLP7XxeXAHwMa1Zd0TIbhEG1dDJX5qEdGAqYw4RbbkFZj53Bxzv7vABVAKbGGD3HoOI bv2qXLl+AnZ0VoDhJgXO+/ln/lMtHX94Crjck2sOQ2WNMgdXEGVnG2ljxBaq4eQHkJOY zWLkOdovgrphDD+UnyuySZShD7iXiHWRGKsMZibogZMNXF3fQUTIW/dR5o/4QqR3RV0Q 4mdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208947; x=1718813747; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UbUB+HoAqq7FbsjH4xIB6iwTWnEv+liGNHJk9xgO0cg=; b=rOsQILJC9STZPWYjuZ4JpzWmOdoQJ8aygrs5XHso8zNlBaq17Cvs79km9ZYsYWjcDZ fh4dNaKzbhfqXKLBv8oYYdF0wbgdpT7JLqIs8BBUtVyPE2BxgVcx2wLHOTPf4teiMAA0 NDGb+MmBAHkbZlBn2F6nty1ctAUgKDI6qiLPYlZ2fXF66ESye635UpotyjKgymYOji0I lboN9Vjm7G3kmkvNG3JOBGNMuWS1w8CFWLiGQd+zmB3EPsI2ps+NqKVpEpzW+TRpSOYs w/mnAocBnyXTBu5uXxYcxGX8HELRUZYGebjFZdsY+NbwVSMK45ad4GazAi9/FCgbrrSN lzgA== X-Gm-Message-State: AOJu0YzdM9B/RTLzG+0SaCgnyAUGREjvYg6rVX9BwBBya1L24KRPXPFT nVAXeAhGrSR0096zaOdNqt8t6BdifsUeQEhBN1qZWnFDVwgT/AulTlQKzlxdKDM= X-Google-Smtp-Source: AGHT+IG0yCZZBR115YOLcbqPgpzpGDnmFUZQ7t8V3T3cBvW0NmL6cdA4+NAFWt7VmyHk43Bf5ICYxA== X-Received: by 2002:a17:907:38c:b0:a6f:15f5:261e with SMTP id a640c23a62f3a-a6f47c9b5fbmr151234666b.7.1718208947613; Wed, 12 Jun 2024 09:15:47 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:47 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:17 +0200 Subject: [PATCH 04/23] ASoC: codecs: wcd9335: Handle nicer probe deferral and simplify with dev_err_probe() MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-4-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2279; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=+6N7gMq4jHzelVlw8umcPCRfVgXICvRLvIVfctyIHUQ=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacma7eeNDLLN0oFnHMu4KHxXU88PgA6aoK/iC kzfL/NTn/qJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJmgAKCRDBN2bmhouD 12oDEACbOfb0Sh+eYacsC3jNLnc/sjhcEJmmabc7LSV2WeyBsOpmWU2H+R1hzWoehPhT/C56MFZ E6eECee+tk5B07aSBZ3m7AmmjXcpplP7fmG25JGiRKnSZAAscVYTDv9Nn6r3b6WBkmu1y3fK446 FZEcVG/vIThP6TFX4KnxO/zq4iM7AtzCEqWqPYqIWOfVvTKOG2oQRGV83sqAgsg7PT7Rlq06R/q H5UztTT74rl09nhTYlgdXvPrcLpyUeqog56haAg6sRXSffwo9YvkusGOS1tn8gHvQLD9limLpk9 5VR/iN9CwtSDf5jItZUPYSAEmaD1qiUZNPXehwHZMoLRLbSB8wJCXU2AZJ71TkU/SgyeGGREIKY f/cfNQWiPJWRjIs1gIjCi+BgoX5PUn7vsvnxrf5rmN0PdvVWimILgdX2Q2/BO9CsC0wHU7LZkI4 uvP/eIv1wytwf0EczGdvUXWoPUZb4fkH+GYLtJlb67p4VNeAP0APnLDAvaL1pMH34nLr9dXppOU DSnh/hZDOVU8J5pblyOyJeuOP6dMS0ypPhLWjh52wLLr1JBKPD5p+B4tQsAArE6vvUCdFwAlrdv FFo+J0hi8cwmycN0F5sp8ATkRQVH84qpupHF8PxAJbm8tzuUVN20GFd/ibngZBqQ42zxLyZj1Ag p83UAfr91YoTpyw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: YIB5VX6HG6HNXIVYLKAR5HWZHXMZ5T6L X-Message-ID-Hash: YIB5VX6HG6HNXIVYLKAR5HWZHXMZ5T6L X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: wcd9335_parse_dt() function is called only from probe(), so printing errors on resource acquisition is discouraged, because it can pollute dmesg. Use dev_err_probe() to fix this and also make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd9335.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index c5ac2d46e556..334c5241617f 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -5031,22 +5031,16 @@ static int wcd9335_parse_dt(struct wcd9335_codec *wcd) int ret; wcd->reset_gpio = of_get_named_gpio(np, "reset-gpios", 0); - if (wcd->reset_gpio < 0) { - dev_err(dev, "Reset GPIO missing from DT\n"); - return wcd->reset_gpio; - } + if (wcd->reset_gpio < 0) + return dev_err_probe(dev, wcd->reset_gpio, "Reset GPIO missing from DT\n"); wcd->mclk = devm_clk_get(dev, "mclk"); - if (IS_ERR(wcd->mclk)) { - dev_err(dev, "mclk not found\n"); - return PTR_ERR(wcd->mclk); - } + if (IS_ERR(wcd->mclk)) + return dev_err_probe(dev, PTR_ERR(wcd->mclk), "mclk not found\n"); wcd->native_clk = devm_clk_get(dev, "slimbus"); - if (IS_ERR(wcd->native_clk)) { - dev_err(dev, "slimbus clock not found\n"); - return PTR_ERR(wcd->native_clk); - } + if (IS_ERR(wcd->native_clk)) + return dev_err_probe(dev, PTR_ERR(wcd->native_clk), "slimbus clock not found\n"); wcd->supplies[0].supply = "vdd-buck"; wcd->supplies[1].supply = "vdd-buck-sido"; @@ -5055,10 +5049,8 @@ static int wcd9335_parse_dt(struct wcd9335_codec *wcd) wcd->supplies[4].supply = "vdd-io"; ret = regulator_bulk_get(dev, WCD9335_MAX_SUPPLY, wcd->supplies); - if (ret) { - dev_err(dev, "Failed to get supplies: err = %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "Failed to get supplies\n"); return 0; } @@ -5157,10 +5149,8 @@ static int wcd9335_slim_probe(struct slim_device *slim) wcd->dev = dev; ret = wcd9335_parse_dt(wcd); - if (ret) { - dev_err(dev, "Error parsing DT: %d\n", ret); + if (ret) return ret; - } ret = wcd9335_power_on_reset(wcd); if (ret) From patchwork Wed Jun 12 16:15:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 803499 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 E3D79C27C53 for ; Wed, 12 Jun 2024 16:17:35 +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 CAD2ADEE; Wed, 12 Jun 2024 18:17:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CAD2ADEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209052; bh=44SvPncKGed5222crY2QmWyS1bBJY6ITGdo0S3bUKlg=; 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=uhltNZI1PtC/liEyziR59UhByucm0pMAeDA1raO0TxnzGQWwTPoENQqc/Vxr0Czvv ZPHggIvaD8qRkPj1hN+9PC8Xmfv99iiYY2G6KByru9Z3jQvdwLP0xYJJFElJgvUGCM LQxYCuqV176m4sEATEWOet+Z1JMZbGSZJrXd0R4c= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B124AF8067E; Wed, 12 Jun 2024 18:16:06 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E803BF8067D; Wed, 12 Jun 2024 18:16:05 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 69BB7F805E6; Wed, 12 Jun 2024 18:15:57 +0200 (CEST) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 9305FF8057A for ; Wed, 12 Jun 2024 18:15:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9305FF8057A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=C2+pKG1Z Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a68b41ef3f6so8982066b.1 for ; Wed, 12 Jun 2024 09:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208949; x=1718813749; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=VmEnUku8lwCm6C2oNC52aCB1kZkiPbgX5VQWbXgPBbA=; b=C2+pKG1ZLgG7WgFfAmf7XIhdP1qxpSR7enqEL9bGjMy/Jk9+WAzCLkdZa3eGGX66J9 Ty4khHVrH6DlBCy5vuV2xt19uhV0Mzk39VOCpKS3GCXwWpMZsjTEFOIq/JwNAXiRUAiN jOrOAn9x2/XLsk6hg+kxZRxxWN+6HeK1tI5O37j74lt4WfTZxznLuw82dZt+0RhykS2n u5jTlmGB5Mcpy09TyYxQlQGI2z2T1hTwd9x7EBtfHpJDVmIu41fLg3Nu8YrqJjL2nrXS 9lL1lJLHE0XCQ63T8S9NC00Ylk/3O5BhjF2m61hBGVDJHlNk8Rye+B6RqEXy0OFE3CK+ CU/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208949; x=1718813749; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VmEnUku8lwCm6C2oNC52aCB1kZkiPbgX5VQWbXgPBbA=; b=pFFfbaC7BucNWtTvYNiQIOqC2bFFYxOmicIdMBEr5lvjNYwyjPaiLnX3zHttphyD6N zswZWT9kajdY6yQz7MQn69ngW3UDJKj9tW4jtZhRZsMXuE8qUxT4pCg0+AY7YeZdzmVg tSSx7cejGjIWWs/mHu7+RPDZw/E3D4HaCMxoaFiWlk64QJ66eksynQdohpHenlfto5iO cUqNnOKGMxHOzFdSUUiOPjcTSg1+Y79QzZOEBoF4ntgr127bM63XWfEifW+NCh6RwipL YALQQpMIqoe2FM22Z+2J79D3v1B75rVof3Sf1lcELGV2HfXygCH/G/TTEnvJMl89PlfQ iDYw== X-Gm-Message-State: AOJu0Yzm4ipdNw2lpQayQEuT/0EjJLx2n4g0nlwkF5u5GHFo62eurqem I7eX8B35GMoBwjPqro0wY9gMCoOT2TgqG42wp01gedqrKfWfsItvyhZPy4Ls7Q0= X-Google-Smtp-Source: AGHT+IFoKaDJDYfIyho5GczSHSkqKxu7KN6zUTd+u7cNPd4fAXx5KP0876Uwls0hd/gjuxcHkQ/dtg== X-Received: by 2002:a17:906:355b:b0:a6f:4e02:ce50 with SMTP id a640c23a62f3a-a6f4e0323c0mr68616866b.58.1718208948949; Wed, 12 Jun 2024 09:15:48 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:48 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:18 +0200 Subject: [PATCH 05/23] ASoC: codecs: wcd9335: Drop unneeded error message MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-5-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=936; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=44SvPncKGed5222crY2QmWyS1bBJY6ITGdo0S3bUKlg=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmbvr1fmPfm/PMxuNcXIa5+ruSQV6ftFq3SU UD9sww97xuJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJmwAKCRDBN2bmhouD 14i2D/9ENklcp84Bwc6wDhkbkAIOZoKpswTywzAoWiMdry4iky0WUt0gd6WLJT/qv5r7Co4+EhR S7yKqdbaTpPQEDfHVshh/lcsePxUi0cfYWgPYOfybJkEslsGWveTrmpl/YGUIGtb+gh+TMu88EC r8rXn0ZwL3jAEywWS5sqQ61SK4jXB3fYA7Cuv97vBqqaY+r9Sp7i7N0ivMV+CM2jsZYrptOM0G6 YcpxzGgBjLaDYRfQx/Bzts2ll7eDKNzMGPivjfX1sDZKly0HxVspivE2lyReNwyuSC5LIDEtDca swIpoFbqUa0LIBjwqix+fx+Qm7nmz5BfO7WnohsR41EgR6+G7UzAGqAMLaY2Wo1UwEcN3aRGFcU lhwtwDCj1Ft9NxY/D375Eam6tH+uylUnKq9azvGq31IpL3iM3+I7lz9AAdrVxUVKkEZIEbv4azv XvJE11BzRVWF7aEWJo7OB/d+3wMQ8KJKEVsWShZrwYA5BNFm/T64dgTH9Ivtz8TD0BoBlEJq1ax tVONbpPPUAu8eaRNmyXvSmroCSMi37CDSc/Eh+XVi6oFrLXwk16FrP9kXeCCEtFWVJbpY2IgOCo XVjQLRJMmWo97dJTc7RALr6tH6t3DQAWupxZDsUT5GH7oZX9ajL3ULkXGxFW1nRa8r83/mcsIBn FGM0S/aIAx0610w== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: VOLU3YCEMUMRI7IT3NGK3GSW6ZAAH2PT X-Message-ID-Hash: VOLU3YCEMUMRI7IT3NGK3GSW6ZAAH2PT X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: Error-level should not be used as debugging. The code (function wcd9335_get_dmic_clk_val()) will always be called with same parameters, so this is not really useful debug anyway, so drop it. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd9335.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 334c5241617f..6a1376b3b98c 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -2849,10 +2849,6 @@ static u8 wcd9335_get_dmic_clk_val(struct snd_soc_component *component, u32 div_factor; u8 dmic_ctl_val; - dev_err(component->dev, - "%s: mclk_rate = %d, dmic_sample_rate = %d\n", - __func__, mclk_rate, dmic_clk_rate); - /* Default value to return in case of error */ if (mclk_rate == WCD9335_MCLK_CLK_9P6MHZ) dmic_ctl_val = WCD9335_DMIC_CLK_DIV_2; From patchwork Wed Jun 12 16:15:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 803496 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 7BC37C27C53 for ; Wed, 12 Jun 2024 16:19:12 +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 5B143EAB; Wed, 12 Jun 2024 18:19:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5B143EAB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209150; bh=u2prIGwh5jqmNbs4Jyq4LFMn7uSJkWnvV3kkEVVaI+M=; 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=DyVV0b4ZtVifqDsLbUHUbDG24j2OgYYiwK6of9ufkX9fk8LmQJDWpopvEp0OzUglM cQpHWe4v8wnfYlaZF8ueO6lbNEX3wIl7HXmBJrzTqgwQDtqmDYSjK9Wp5sn9Dhn70K KWqSvqbPWPEOjrHE1YmbpfgoicxvwYOoYen37CHA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D8A25F8075B; Wed, 12 Jun 2024 18:16:19 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 8109AF80791; Wed, 12 Jun 2024 18:16:19 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2E723F80685; Wed, 12 Jun 2024 18:16:07 +0200 (CEST) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 7682CF805AA for ; Wed, 12 Jun 2024 18:15:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7682CF805AA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=DtC+uriN Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a6f1cf00b3aso6575366b.0 for ; Wed, 12 Jun 2024 09:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208950; x=1718813750; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=eOJFJF+t6lUE1cjVVqmcWFg9bqxOoxHwGyxHu2Jt5/4=; b=DtC+uriNpg1Zpx6rBJMZoOzahTD91WPC3Gy9Id0GqDtroPobuSTY04iymo2ODPoWC8 pKU+Xy4ututMtVG6zWSeOiSn1IUCjEOkkO22+QwLAI0o1b8Wi6CEtVbC9U/0SKfyX3md g1FYPIwOojZ9YUn2uZw2keH97uslxry+mNWlxYsaKxBbD8SbeAMmpt6stDQcIMr63bJ1 KvYUaMtz3v0rq7RI/fJEiBxnPhUsARxewvqQkbqijAmTHJFycUjq+R3jSO6vIVNlodDO bZrhnaXO9TGXsgOel61raykxq/bkOz6oF5lmyVPSLfyUyADp4ln537KK3dvSlYUJkBc3 ftcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208950; x=1718813750; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eOJFJF+t6lUE1cjVVqmcWFg9bqxOoxHwGyxHu2Jt5/4=; b=JiklD3p2ZnNxnGAN2JXkhxV77fSwY4fG3W/jCxhmAtHCo3FnmxYUgbezKnDbP0I30r H7tt5WfcKdeO8qq/osAdeD2xFQjqM9T7U7FO9WeiW5gH0rkocmZkpyRkrq2SKm/sIM8n CahYJp0FBbMuWcFcsnWZohP33dRxkmF7nX8abzrVSkoL3VrPZqi8LVuJjfBFdgpRujFr /SISQcFLVrgOHNVzEzU4qWi9qSGZT3qCTPwbCMX2wKIoN3dzL2Njn1BUgTxAfqw+Sclc nX2b4oQHECDy5/9imhFJOY6VLH1pazV8sTT98mZYlUnFgImQM4D8Ti78zLHHJdWPX+Ul 5yDQ== X-Gm-Message-State: AOJu0YzhPDssuLeACTQIFz32Oh2c9h98IEVGWgWg3nBN4G4pnaTkJc/d sSvbFRZEpsvECLJiJbQT9j4elVHLzQLNbJoAF8cSro4WlZzXr9qgtv5dvYAJX8g= X-Google-Smtp-Source: AGHT+IHUF0KmidhvpAnMl83vBdXTEssqSGLDlaWZMxVn1Dusd8E2ucNDNmW4b7weNZmhLGChKPIjNg== X-Received: by 2002:a17:907:390:b0:a6e:f655:ef29 with SMTP id a640c23a62f3a-a6f52414220mr7988766b.17.1718208950323; Wed, 12 Jun 2024 09:15:50 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:49 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:19 +0200 Subject: [PATCH 06/23] ASoC: codecs: wcd9335: Drop unused dmic rate handling MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-6-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3095; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=u2prIGwh5jqmNbs4Jyq4LFMn7uSJkWnvV3kkEVVaI+M=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmcYazksfFeAD183iY592oj5Ey1hnxf+2W8n pqiTV4pmYiJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJnAAKCRDBN2bmhouD 1yYVD/9xhjb8/1RHvXSBot2oW4imUHAfeV8TcbJ9t+iXnPPX9FAMldbq/LyJUFk2DfhjKJGMNFt SaWwA0cCxCSEAiHOfwP3I9obF3YXgm2XZKBRE+yYkdiuoEzZF66gXXHKwKTuuamcu/PPWERpGhw vpdXRPsyEu362gwv59jzNP38uQPZeuN3iipR8jomWaBwKH41B8muTgbo7H4FVF859fDgDPIa5fd ZLrvkYfXW6Nigr53w4oqLDO1iCu1KWDZZUZL+amAEI3rmr9RwD//+1eTdO2W4RPqtoGXW8VHoUw J9ROx43g3R3uEIsPj8A/5mWYtnU4gZaWpfWw9388o13h31KefPFFrwCT/ld9mCjRpshtOZ5yMuO lZB5gdQcxd2Bmz7bNujs4rVS/jl0wZNDroZnpF1oBftoFPj4VH4ocBB7zOr4FNFv0GsFb+JD7Hf TNB0Aef0wgTGOTOHuQloQ48Nb12NfRKR1xggnBLmHPCjwABUhfZWQtnWLHYq9kE0lobug3buf1R w+p5zF3v3PT99QqgQFsgYeeHFi8KVgztWZVDciFPHhXsb2v9dGR9ZT6QevnYrApTQTDYE0TC9wO ReXnwlyDpWIP0doK+LHywWZNaogywVzQclTIG2RjRK9lBJpLKATJwgmTD4lMET86Tco8Nbi6nzf 6btju6azCzJ9Sfg== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: JM6U3NNRNLVIPDPFCTDKWQPEOSBV6F5G X-Message-ID-Hash: JM6U3NNRNLVIPDPFCTDKWQPEOSBV6F5G X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: Driver was prepared to adjust DMIC microphone parameters according to DMIC clock rate which is read from platform data or Devicetree. The latter part never happened, so the code is always called with dmic_clk_rate=0, prints error and uses default/fallback values. All this part can be simplified by dropping dead parts of code. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd9335.c | 52 +++------------------------------------------- 1 file changed, 3 insertions(+), 49 deletions(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 6a1376b3b98c..f5fe2583b807 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -344,8 +344,6 @@ struct wcd9335_codec { int dmic_0_1_clk_cnt; int dmic_2_3_clk_cnt; int dmic_4_5_clk_cnt; - int dmic_sample_rate; - int mad_dmic_sample_rate; }; struct wcd9335_irq { @@ -2844,52 +2842,15 @@ static int wcd9335_codec_enable_dec(struct snd_soc_dapm_widget *w, } static u8 wcd9335_get_dmic_clk_val(struct snd_soc_component *component, - u32 mclk_rate, u32 dmic_clk_rate) + u32 mclk_rate) { - u32 div_factor; u8 dmic_ctl_val; - /* Default value to return in case of error */ if (mclk_rate == WCD9335_MCLK_CLK_9P6MHZ) dmic_ctl_val = WCD9335_DMIC_CLK_DIV_2; else dmic_ctl_val = WCD9335_DMIC_CLK_DIV_3; - if (dmic_clk_rate == 0) { - dev_err(component->dev, - "%s: dmic_sample_rate cannot be 0\n", - __func__); - goto done; - } - - div_factor = mclk_rate / dmic_clk_rate; - switch (div_factor) { - case 2: - dmic_ctl_val = WCD9335_DMIC_CLK_DIV_2; - break; - case 3: - dmic_ctl_val = WCD9335_DMIC_CLK_DIV_3; - break; - case 4: - dmic_ctl_val = WCD9335_DMIC_CLK_DIV_4; - break; - case 6: - dmic_ctl_val = WCD9335_DMIC_CLK_DIV_6; - break; - case 8: - dmic_ctl_val = WCD9335_DMIC_CLK_DIV_8; - break; - case 16: - dmic_ctl_val = WCD9335_DMIC_CLK_DIV_16; - break; - default: - dev_err(component->dev, - "%s: Invalid div_factor %u, clk_rate(%u), dmic_rate(%u)\n", - __func__, div_factor, mclk_rate, dmic_clk_rate); - break; - } - -done: return dmic_ctl_val; } @@ -2943,11 +2904,7 @@ static int wcd9335_codec_enable_dmic(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_PRE_PMU: - dmic_rate_val = - wcd9335_get_dmic_clk_val(comp, - wcd->mclk_rate, - wcd->dmic_sample_rate); - + dmic_rate_val = wcd9335_get_dmic_clk_val(comp, wcd->mclk_rate); (*dmic_clk_cnt)++; if (*dmic_clk_cnt == 1) { snd_soc_component_update_bits(comp, dmic_clk_reg, @@ -2959,10 +2916,7 @@ static int wcd9335_codec_enable_dmic(struct snd_soc_dapm_widget *w, break; case SND_SOC_DAPM_POST_PMD: - dmic_rate_val = - wcd9335_get_dmic_clk_val(comp, - wcd->mclk_rate, - wcd->mad_dmic_sample_rate); + dmic_rate_val = wcd9335_get_dmic_clk_val(comp, wcd->mclk_rate); (*dmic_clk_cnt)--; if (*dmic_clk_cnt == 0) { snd_soc_component_update_bits(comp, dmic_clk_reg, From patchwork Wed Jun 12 16:15:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804200 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 E2127C27C77 for ; Wed, 12 Jun 2024 16:17:51 +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 2A56D1D9; Wed, 12 Jun 2024 18:17:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2A56D1D9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209070; bh=0x271Ao5g1756MkJM0YnZ2eY6hyaiNB56Snmlinm2o0=; 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=fsXuUrx6ETFAIztI/TzkWO0N3E03NHZkn50DxlMuJG5MJVR5s/E5U+lmZUhrSLQKp OOYdkzGD13p9oJtM9dbHkke5/zKN69I0AiYULbU108j1ReJhUnRPBg7B8lnoCj4drr AgSw6KhKRSgnQhUA0yHAEaV4rXN6Zs0VhoGHMQi0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C7525F80694; Wed, 12 Jun 2024 18:16:07 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9EC51F805AC; Wed, 12 Jun 2024 18:16:07 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A8DE8F805FB; Wed, 12 Jun 2024 18:15:58 +0200 (CEST) Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 7CC82F805B2 for ; Wed, 12 Jun 2024 18:15:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7CC82F805B2 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=pK+9vh2a Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a6ef8bf500dso8460966b.0 for ; Wed, 12 Jun 2024 09:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208951; x=1718813751; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=nSj1wRbpqkX+8+PyNrcUZX8/G9u8adS5MtyYj32OWN4=; b=pK+9vh2a3DoNycZ7u/50Q5MxlwphGoEcZPjTI6XWn2e7J2AXil3fs41mqLlZ8iMsnN qWhNhz+KBpeH9kVkHRyhWxqyhmQeaLMW9x5f/uuX+MVQrxf1vp0Uc5ysudCG2yctng1e z+o5/I8aPgDZSFNFlQeGwbr/SYQgr2sUzabsiCSv7fNwM9HCeOeeuOeemjpNzZa3lIcE UWBC1NBDx8fiTIhH225y/AdEKMHsTD2u8oRnTHt88YxSvXUNEGeTWC0VhAT/sHA2j+ig TnK2d9amRyCCDsufTKg/UBGEc9U1XT4VvYVYW2ZU59wCFijQ1rveguGQEZUhVlb5jFr1 KAFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208951; x=1718813751; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nSj1wRbpqkX+8+PyNrcUZX8/G9u8adS5MtyYj32OWN4=; b=P83eJ0zORqzPWVKD4ix+2hYRtJ5bkiPKXDZyNltg8FHu5hWF34LQ1mr+q7kDi4iBWt JqFg+TO06kY5STIyStqigTwFiG3qiIQBWFipfaFuyqk6s4DvGeI9q8drfoPfxrpM+yif /i1/GUgRqWfJx6B8UzxKdD3kaQGl741znVaaNkuYh6ZWJWI2Td+2OJMG/v4trcJ/83Fj wG7a8Cq58+OLmeme1k+eOWRgha4Ux0kEL46PwzVZ/KfWRzyRkUpHy/38NF60mxwaE1ET xalM8OB+bEe6u0GqPRrBsdseYMrJoPvBwzDKp4Kdf6r86OYsPqXBZphqT+kqNSDrJys5 /Gig== X-Gm-Message-State: AOJu0YwhSNAwP0XxYmlHLZ6m5kgPFS2j7S2CEtAxl7AH0PoU6ZjmZ9SC HtadQO4ZQ7RKfjw8EtWP8ZRYFwOgnwGGM2/QWORWHyuhJT5BYgDyjmhe5ZGEbcY= X-Google-Smtp-Source: AGHT+IEV+h2vbFgATGGL7Df9HCn4pV0I/mu2nGi8vVCTHaKKyDaxGp2hEWUoko7ZRX+TvbTeiXVv0w== X-Received: by 2002:a17:907:7208:b0:a6f:51d5:ef0d with SMTP id a640c23a62f3a-a6f51d5efb7mr24161066b.60.1718208951530; Wed, 12 Jun 2024 09:15:51 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:51 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:20 +0200 Subject: [PATCH 07/23] ASoC: codecs: wcd934x: Drop unused interp path enum MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-7-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=574; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=0x271Ao5g1756MkJM0YnZ2eY6hyaiNB56Snmlinm2o0=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmdGHA1Mc5AxCcNSVn2jKSCaXp7KokuKm2d+ NCQKnMfgTKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJnQAKCRDBN2bmhouD 1+lTD/9nG9SnZKzUodnBZ9jKxGLqAYbuAcS95yXfKwvzL7gcFcHTqWYYRmWfOkUvUdXI0oY0gsm f2e1nkk0kmT0EkLmhc3iqNtQyJJoyUIPl39A/Hb+F1xHJxJEKwD8ClpD04ZOk9ttcSFpL0Rp4My xMc6F76okJKgmFYQEkjA+076pxMninW9PZsJ/7+4pfSHl53ZvN7OOVTnV8o+zztUXXh4ENPaRK6 NT0hxYfYW87xM8IDjxSoZ/gfah56JrgpkuJsLcuqnyOUax151rXLuTUSkMy229tfBykSVlnEOeh COZ6QUszw1/K+kOiHIuCvmIDqxbm/AQzJ/F8Db+NLmZq70RX7Q34KQlL4EUCUVyZNTjLxv4tCWx yPMnljYyvrsk0+Qt6t0BgyBpHsok0j2BNV12pheUwwHxfU4yQ9DYPDTRvgIPokPcGj3ouo8zL31 Voqe+7/fffZVwBdpxp7wSgQCYoipHd9JLt3a8i2dne2u2J00Dd6TvCEP3EAzZ8nz6fsuOrlgvkf +tuImGM4u7PgBskHjQAsbryVbBayat5FJ9aHg4H2nc0Qd57pkZa7VXPubWcDPwVaX6/IoADkNYi aUHwj8pgZ4b+vIJnI2FJyeg+Uz9KkrJMvaYbQySUq6Xr1DWkeXOSHpE2uYQD6NleQs078936UEP p6r2LGdNa4noAmQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: NEH3EZZKYICU2Y7JUBNJTGQ3S76TSTGV X-Message-ID-Hash: NEH3EZZKYICU2Y7JUBNJTGQ3S76TSTGV X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: The enum with inter path is not used. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd934x.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index fcad2c9fba55..cdb68f34e55a 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -475,11 +475,6 @@ enum { INTn_2_INP_SEL_PROXIMITY, }; -enum { - INTERP_MAIN_PATH, - INTERP_MIX_PATH, -}; - struct interp_sample_rate { int sample_rate; int rate_val; From patchwork Wed Jun 12 16:15:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804199 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 74D71C27C53 for ; Wed, 12 Jun 2024 16:18: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 98292DF8; Wed, 12 Jun 2024 18:18:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 98292DF8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209107; bh=g2xHVarXvyCS+YBEFCdlIQ1R2j746Vst49InZdmOz3I=; 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=RmME8x7q9Kexukin4pBQO0uL1+fyuYsxNLYljdfFvhi9ZIXdB5Qv91pHTQHiasgzf w53iWO3BRgq5nkjmIVv3Oi4mY+EO+Z5JDbXSOG1JHj1X+O2mAzmJWJZbPwinlBJ59N 9SnK+EZd0cyQXHJIsYPJuxvOPx3qS25gUEHNMEQ8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0213AF806D7; Wed, 12 Jun 2024 18:16:12 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7C18DF806D9; Wed, 12 Jun 2024 18:16:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 19CF3F80632; Wed, 12 Jun 2024 18:16:02 +0200 (CEST) Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 CF465F805C3 for ; Wed, 12 Jun 2024 18:15:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CF465F805C3 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ddkyDnEb Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a6265d3ba8fso8600866b.0 for ; Wed, 12 Jun 2024 09:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208953; x=1718813753; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=T8VimLKvT4ABsxFxevhxxNfg0qw4/IiIcQHT7uX7SMs=; b=ddkyDnEbGlEZ5lEPLo2Q5g3EM2Gee2Fn3ky/9Y9DY1HEoiW24etyq/oGLafcRrMIlj bwxVv6QiGrtlkmXo4kGw4HP8XdDDdFqgv/sNLVgPsecvJFpTcchxCPxAbqkqlXKHyQt1 +ZX9kRTnA0Yl33v9Ciczy3Lpw0bAMYkkpySBZzf4TPsQqEe2zkWaD+00wm9RW8676pUW 0I07py5M9mM+aDIEz++V4ViBcYctjbVO9z+bBseWDxXHYa95tAhJu7dNOkzeid7cyuV1 aMPIUk81tiTBhuhT4Wm7nM8i20mi+9SoCUpqLRcSL+ivoAn46enRvNf2vVcPo/+t1rpu TQZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208953; x=1718813753; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T8VimLKvT4ABsxFxevhxxNfg0qw4/IiIcQHT7uX7SMs=; b=fKfE5IOwpIplTGori94A/Ix+kW+RZk3qTezsrf+i29WGe3oqxTJ8j9Ui8lzlD2cdCs FSiscQjnVTj7MhM6SI1yPuimrwBQ/37ketHEJNcXbi7a9Pu16o/QncMgtmIgNm/SyZWm yIc+sww32p3qUBcv6bg584uzY8O8cD679IXnj2PidbasCyaMsuR4/X6ygF+OU9It0BZN CblNjL3gVU/Y7ViysaMf4t0FNPpvXP+FQHhMwmhJyyWZN3mL3O/mcM+FAi8lah+YtVV5 q2YXjIL0pS7/QhpePq8iDicNpEaR4hmnEZdE83HqaFFGEOG0ZSq55WcxtS+p4P6UU4Ku hZ9w== X-Gm-Message-State: AOJu0Yxwia2hyvhPToWpR4aMPDXJVlpO5R6pKF0gz65laBHWiI1wdgg2 QNxHz132o5rIi3PILU6tyV5E7GnLFo8j91Xd3THlaoK25TZMATe6YRjlLjwdxYo= X-Google-Smtp-Source: AGHT+IGTfvvCQj+ZNaFMkZ6wx7TiN7Ii9ExBRfK9lmhqZIRybLOb+747kCSXpsZax+KK21ylmXhTPA== X-Received: by 2002:a17:906:a20a:b0:a6f:16c4:a5c4 with SMTP id a640c23a62f3a-a6f47d52367mr134173866b.20.1718208952754; Wed, 12 Jun 2024 09:15:52 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:52 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:21 +0200 Subject: [PATCH 08/23] ASoC: codecs: wcd934x: Constify static data MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-8-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1584; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=g2xHVarXvyCS+YBEFCdlIQ1R2j746Vst49InZdmOz3I=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmeSFE+f/zsNCHQgFuBYKnXqNHmd/j2SQ58e 6jiG2sco7GJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJngAKCRDBN2bmhouD 1yzcD/4yxf5LOsAQ3mrol2YYLGKoGQIRXfK3WfZuxOS/lBU0ucumfmz1z+oqUzYIqmccjQeKaXq NlGKJmaMY04RD+gyEGukOUDwSNI0d77Pf6bkVyzNe5924vuhazpCb58XhPOaAclJM0M6L2qwXXh 7aLnQeNr4LC1yEyXxV4hVfxFyJHgRi8utspCKZKvtfhnwfm0xfURtYHoIg934GdiVpmbA/efN01 zlWiGLeJcUr8tuFrykdDTP26XZVJaugMn9TjdcW2u2fHOnjX8SE2HlkckuvGFaTLFzw/N3/m9cw P3ClaU3RhJX58wtvJBETIVAYFeQgN++2cs9JQzQkTZovfsIeDNXWWWu6o3jDJj3IC6wxWpqE8nO yzuKEO65UNfyzwaV54XBGJu5lE37s4OsHPTbpwgYg7p0pRAAKhEdMnzTvB6Jr+qrF4Me8JQ903f wPrmt5RRRd04oMegWBw11QtzQVD0fmkQ3+9bntUc8pSnD/r6pKf5NJ1/TtJlNF7Nuh3VtUWyjXV o71thRJ5S/EcXAFiXbBCN58Q/re7UFQ5l/XRnQsvOIPO+bXA4bscNaiFerHEeBVYO7Q226iBweK soCp0AordfiLwFZ/Uh27/z7SZ3hFY5Z/EAMbunvdFmPkp9gciDgVreTzA6ihJR96wDL+i7JGQYD xzK1fG79wxsrJow== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: RP6Y3Y4B45T7GFR4RXYXD5DT2SPRVIUY X-Message-ID-Hash: RP6Y3Y4B45T7GFR4RXYXD5DT2SPRVIUY X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: Driver does not modify few static data (arrays with sample rates, MBHC reg fields, regmap config), so make them const for code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd934x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index cdb68f34e55a..7885aa423886 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -480,7 +480,7 @@ struct interp_sample_rate { int rate_val; }; -static struct interp_sample_rate sr_val_tbl[] = { +static const struct interp_sample_rate sr_val_tbl[] = { {8000, 0x0}, {16000, 0x1}, {32000, 0x3}, @@ -522,7 +522,7 @@ static const struct regmap_range_cfg wcd934x_ifc_ranges[] = { }, }; -static struct regmap_config wcd934x_ifc_regmap_config = { +static const struct regmap_config wcd934x_ifc_regmap_config = { .reg_bits = 16, .val_bits = 8, .max_register = 0xffff, @@ -1212,7 +1212,7 @@ static const struct soc_enum cdc_if_tx13_mux_enum = SOC_ENUM_SINGLE(WCD934X_DATA_HUB_SB_TX13_INP_CFG, 0, ARRAY_SIZE(cdc_if_tx13_mux_text), cdc_if_tx13_mux_text); -static struct wcd_mbhc_field wcd_mbhc_fields[WCD_MBHC_REG_FUNC_MAX] = { +static const struct wcd_mbhc_field wcd_mbhc_fields[WCD_MBHC_REG_FUNC_MAX] = { WCD_MBHC_FIELD(WCD_MBHC_L_DET_EN, WCD934X_ANA_MBHC_MECH, 0x80), WCD_MBHC_FIELD(WCD_MBHC_GND_DET_EN, WCD934X_ANA_MBHC_MECH, 0x40), WCD_MBHC_FIELD(WCD_MBHC_MECH_DETECTION_TYPE, WCD934X_ANA_MBHC_MECH, 0x20), From patchwork Wed Jun 12 16:15:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 803498 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 34339C27C53 for ; Wed, 12 Jun 2024 16:18:08 +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 4B16CDEC; Wed, 12 Jun 2024 18:17:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4B16CDEC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209086; bh=EX2ahL6J6gVjXyyMMyKCJVoPSigpcf+psbFgYuluYwk=; 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=DodSVr+OhSrfBxEzMhI0OwCPwAw5T5j1SrbGBeMReuLf6WiOzd0HUxjo13kVR8Poz Xo3qPa+ufV3pwBJNn31vQFbU+U0+Y8uev9q/mjQ0wpxoKp9ETuAUAdhYEeZ05moftx tS+Cwj2BXxkgSBlnaitfOxIg5KnQqAoEVS+vrNnM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BCE3BF806B8; Wed, 12 Jun 2024 18:16:10 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 41597F806B7; Wed, 12 Jun 2024 18:16:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CE7ECF80617; Wed, 12 Jun 2024 18:16:00 +0200 (CEST) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 59B8DF805E3 for ; Wed, 12 Jun 2024 18:15:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 59B8DF805E3 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=r8sf7Xl8 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a6f1c4800easo6821066b.3 for ; Wed, 12 Jun 2024 09:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208954; x=1718813754; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SEKGICqGgE2b6uDcqkkwK9UClcAb7dqdvvSEbvTTj0M=; b=r8sf7Xl8amNWiXWyMhBylcQVukdioAF2C2T4bgYW9aF2zWFlA/QrDbkbDH8x2cN/Bd 6QMUwoQqE7IaavlYCD7F9wbSsODY6yD4/e7ilBGoa7SbepmqZgPAZBXq+B1rgQfvxrld F96/qy7PLTOqbhIEjwcMrfT50U8hMoThSs7nIBPE1No2TpTO9zY1DP6x4VzmgwCQICZ5 ib+wIgsq7LA3uzaW1ZR41yDofHKW9PErXBJieepyHXp7MjUvJwJ5CwE+KfJ8gs+vxDSC 2fWG+0+GpxuQkaQLYLa7SWMQDkQixmAClYq0ofU6EQ4T0uMgHpwvMpL48Fu0Shgrmo4o MAgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208954; x=1718813754; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SEKGICqGgE2b6uDcqkkwK9UClcAb7dqdvvSEbvTTj0M=; b=hZd4nRCSXZ65dXtcwUTqSykDdFcrd5wM/n/G5oJQRWTxlY6LK8bHFA6i6eg7LIakKI PDZvoKCIWK3PB6PwtqetZ4dThYes/QLsVXc8ZtgSa3VD99jFyIdN0zMm1jKlDZYsYt+F W++TWkT+lwHrg7i7r/T/0g0UvicEQvHcKoPvM2Wmry4r+GcW6y6JD26Z2qu2DIFEhImQ COshvl7qQr6iNVGgypaYQpYDqxm+MLNw5YF+XR4vZjfMe8jwhQSAv9l0r7T4FaqgzzRe BDl5USC++0DJO3g1lE3Cs1SgA333KaY6E+qkq4YYsuNOkz/ucwKQQC/L24L5KDta5lbt dgUg== X-Gm-Message-State: AOJu0YxhWsL3nW/6m4n7990t2JQC1FGrmu735jTf7FX3bbY746XW8zU9 ECV0xLe/Cyyoy53Cyj4lk+RoSGUkToNee1UmkRcw+Z+YpVsYf865DhpqBPqhE5A= X-Google-Smtp-Source: AGHT+IHYEtQvDVbT6uJNSotzJaByqehhuWhxlB0O63Bn7wSy9KpB96B9a+ukyvZ1xgkh0eq0/z6n5w== X-Received: by 2002:a17:906:480a:b0:a66:c338:65cc with SMTP id a640c23a62f3a-a6f47d3593emr150992266b.19.1718208954195; Wed, 12 Jun 2024 09:15:54 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:53 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:22 +0200 Subject: [PATCH 09/23] ASoC: codecs: wcd934x: Drop unused mic bias voltage fields MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-9-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1979; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=EX2ahL6J6gVjXyyMMyKCJVoPSigpcf+psbFgYuluYwk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmfUq+jhizaLbMXoUgIxvDCzWGZrgeZdF/wf dfrMV1SHqKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJnwAKCRDBN2bmhouD 19N0EACMZdzHK7kT5jfHO+OLl2KWwObwFoTIuOxIp2z/nCRwkYmmH02uCrwaLRwMC6fTy1HAoV5 mfunts6Spsg3P9FcQyJQGg8nYTIsxsVy+76SMxhR3+F0lU6QPwy24A7K6gvXK3L5T5mhY0iZ7Ln gGqf2XlV7tReFlQKp7SFtIEi8FZ+A1HBuzZocEhH4DFdPEeOOdWRq7O5Zv2HdPb2dFEraohL+Xx /xJ13ZPSYAImCF+qofa7m6k1Fq2+FuZrHKxveVRX/qy2VsvfKZAo+XacZhfvGej+IXLKEIFtlWJ LpJlJPDhXm8TKBo/vCpFQBB6Sqk78qzISUt039KpyOrDbJ8JbZUBHK5X1WZYJFWp5f64KQC9wQw yDoAA3RRn0HGVc+zEyQVaglLLK4wInPzEG6wzctKEGfOyiaFa4ew4T2ZU/qraojlEcG4We+AqVD 2Mvi37jqLcoso6oojXPIE35B1mCBrLQJdVKGi0hHknqu2lJ7VKmxFiYPdSrDBYjKkHTmqEUB9Mn xh6pzZXWYHKq7oBOs7U0CITuH41NACzebveNzxkOI7XSrEprZ5NYGUNgGMjXnCpYULn3n6HtVKH 9XYfNS2QTNaT0PeJY3NT+B8PV/pW0R+drWRPTh0QcsGSbs6GYuomsDLx/39b/kdxI4ttJS0Rgzw 7STZMgm9Urff5nw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: G42X35DEKIOH5BCEPWAJH766GYGBS5AJ X-Message-ID-Hash: G42X35DEKIOH5BCEPWAJH766GYGBS5AJ X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: Driver stores the voltage of mic bias in fields in state container structure, but actually never reads them - except for the mic2 bias (micb2_mv field). Drop the fields from the structure so the code will be a bit simpler. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd934x.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index 7885aa423886..2a5fb4370ba3 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -566,10 +566,7 @@ struct wcd934x_codec { struct mutex micb_lock; u32 micb_ref[WCD934X_MAX_MICBIAS]; u32 pullup_ref[WCD934X_MAX_MICBIAS]; - u32 micb1_mv; u32 micb2_mv; - u32 micb3_mv; - u32 micb4_mv; }; #define to_wcd934x_codec(_hw) container_of(_hw, struct wcd934x_codec, hw) @@ -2203,7 +2200,8 @@ static int wcd934x_get_micbias_val(struct device *dev, const char *micbias, mv = WCD934X_DEF_MICBIAS_MV; } - *micb_mv = mv; + if (micb_mv) + *micb_mv = mv; return (mv - 1000) / 50; } @@ -2215,17 +2213,14 @@ static int wcd934x_init_dmic(struct snd_soc_component *comp) u32 def_dmic_rate, dmic_clk_drv; vout_ctl_1 = wcd934x_get_micbias_val(comp->dev, - "qcom,micbias1-microvolt", - &wcd->micb1_mv); + "qcom,micbias1-microvolt", NULL); vout_ctl_2 = wcd934x_get_micbias_val(comp->dev, "qcom,micbias2-microvolt", &wcd->micb2_mv); vout_ctl_3 = wcd934x_get_micbias_val(comp->dev, - "qcom,micbias3-microvolt", - &wcd->micb3_mv); + "qcom,micbias3-microvolt", NULL); vout_ctl_4 = wcd934x_get_micbias_val(comp->dev, - "qcom,micbias4-microvolt", - &wcd->micb4_mv); + "qcom,micbias4-microvolt", NULL); snd_soc_component_update_bits(comp, WCD934X_ANA_MICB1, WCD934X_MICB_VAL_MASK, vout_ctl_1); From patchwork Wed Jun 12 16:15:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 803497 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 0D9C9C27C77 for ; Wed, 12 Jun 2024 16:18:42 +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 24278DEE; Wed, 12 Jun 2024 18:18:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 24278DEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209120; bh=Qvm23q2GYZ89u4m4lnW1gC9ZSpuZfm4HZTc7sb1PqHc=; 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=DR9ZNQC6WVNEX7M/O2CO4jCTRT7vudX8Zo/Nkq3mh7SBjbudG8k/VsI8ZSUGc/b4s 8RucNVOKtdNNirv5V10BjlnJaMITjn9Urebm9ez9CeO9AtIH6/z7evyApBEAEAE9TM seMpDCGsTFcyus0IorZpcykBp7rVNsUYKEaxNb1U= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BF5AFF806FA; Wed, 12 Jun 2024 18:16:15 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DDB59F80714; Wed, 12 Jun 2024 18:16:14 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B64B2F8064F; Wed, 12 Jun 2024 18:16:03 +0200 (CEST) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 CBA58F805FD for ; Wed, 12 Jun 2024 18:15:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CBA58F805FD Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=rWBflnEp Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-57c61165af6so6689931a12.2 for ; Wed, 12 Jun 2024 09:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208955; x=1718813755; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=61skfWvt9BRl/9QYc63/KGerHmR4wxlY7IwK9GFNUXg=; b=rWBflnEpvWAWeY8snRlCitEcYZmTpZ+cxYDvY5Nm19y7QiW+0cfOYp5zj8n1Kzo7Ej CIIX1HttQnsaN0eKeL9AIrh+EDe2FunKjbWB57HhCTf6e44XF774r76yoJ1XtR0xx5Jj oDKy4aHoBQpN+4JoAlkTBR0yehsYmHut1gQxLUq1VfBhXsErPHJ1IYu1Ks6nkOZ7m6Q0 7sZ6pJjgnNnU4qxhUoRmgoljTtXqX1araJ1ipgTl/m6cvP5EdUyB/1TqFMxo+BHDsWaw y8aVKgP6mW8ZWF27BiLufboTaWII/P9YwMh44vqJw57LXv380uOhJp4d4w+Ltu0SS1jl B5Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208955; x=1718813755; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=61skfWvt9BRl/9QYc63/KGerHmR4wxlY7IwK9GFNUXg=; b=u34TeMOOyr+3K9sdiw4UYO5CM4iEFRu7d1KrbNWC/WgJbCJlLjDQN9kmnht9CLaUsc OGfxOmRAnmbtiE8CKs4qnoXBTqzIhJRJiNEPdLtsb/tNJ1CPQmXZlbE+dvtY1S+I0vUc Q0HT/q0AjeWs3Ndmy8sy8OJ7fC7m/NNWY2ZPkLOtnTIPNuURMCEbOl+Wfmm2zgPKSY4J YYOCBA/dYXpteSb0Y5AXOnlX8MrZgzumqK6ZsOJijABd0JPPjLszjO9vDO1s5fVUfyBT XzaiekezOv6fz5SvL7RzRRUCRze19oGFn0rvnGak7A/1D1OGAFl6pLtgmBiN9WOQxr0M NyeA== X-Gm-Message-State: AOJu0YxpAkg+bbRH/GbmgJDy51qCD7Ch5VoGtl5kFa+4pLG2xOxHjEKA qs1NWbkEbvRuaXpOtcv4VpODoOT2GRl+R3Z2VJhNtLITW/GrjEVrx4LbzHYwE2c= X-Google-Smtp-Source: AGHT+IFrFEyR1KwAKRzvE5BUx0XlzQZ7BeNBxLJzklNFCPiFqELpkjXvSl/mHaW5rpddnl1lvh2tFw== X-Received: by 2002:a17:906:2c45:b0:a6f:1893:f549 with SMTP id a640c23a62f3a-a6f47f7ff70mr125342966b.28.1718208955435; Wed, 12 Jun 2024 09:15:55 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:55 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:23 +0200 Subject: [PATCH 10/23] ASoC: codecs: wcd934x: Handle nicer probe deferral and simplify with dev_err_probe() MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-10-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1792; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=Qvm23q2GYZ89u4m4lnW1gC9ZSpuZfm4HZTc7sb1PqHc=; b=kA0DAAoBwTdm5oaLg9cByyZiAGZpyZ+iUkory59nFZNw3S4z4Zfqy+Cwzs2u33Jv5ftaDeLtk 4kCMwQAAQoAHRYhBN3SYig9ERsjO264qME3ZuaGi4PXBQJmacmfAAoJEME3ZuaGi4PXJoQP/RIF O+QjkDONoNlP35hSnfUWOqDNPKOOqqeXELTnnNWBOo9hK+x2Q9kxQYTbKIfVwhVnyACJWoMBGGr 0oGDECFTwTqAqxWtO/zctF3fzRFR9etq/+JadVGW7SLgtcX0aAX96Clr16BnOibMFeUfrNbBh/3 /ySkxMl+TewZCjxNlGqCiYRisNwaP/HRmu1cMaQcE37iditJkrfP69L/KlJEhG9oq+dhCk4x86E kf5Lhd+LG6ZLo+p3qiZetcvlCDP8zSddbBpAINJDroxSA1t5br7yySir/Z0ZQ8SR/VooNpYahGv /M+J3mCkpHSi28/3OCC9/hrkWKM0j+F+rQ+DPfYqgbCy9iuMQrHhbZQ4pFQ6OzcjezIRGlU7DbX p9/XllFtOaBce/vwjnMyWC4lOeG020XioQTa29S/VWNEIlBj/eVn2lL9IrbwW4HpNMHL6zI8rQS Le+WMuhWh5oK0xR1vBhv1Y3okzrbFtJ4dBvWFq8xXIleHIiLlYWT62Qp8oUZL5DjG4yWFUr78j8 vvFIgpo0ydjM0Q/aFlr95Bxw7OHlLyzmB5KO5OPcuP3C/32dirueNHMHp7LSJmWsGGrbZSnDRGw IYni5KrQfaP4MDtAOYT+8OksVXrF/CuuvNmNC7i6yH3chQLVd34cB9fkSxO9USJ8fViC0CnEHDo gYf56 X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: IJSWFGTSH6VYON5SK6GYJUVUCJ4MUH4K X-Message-ID-Hash: IJSWFGTSH6VYON5SK6GYJUVUCJ4MUH4K X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: wcd934x_codec_parse_data() function is called only from probe(), so printing errors on resource acquisition is discouraged, because it can pollute dmesg in case of probe deferral. The actual deferral is here unlikely, but still the code is a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd934x.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index 2a5fb4370ba3..d1bbc963856b 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -5856,17 +5856,13 @@ static int wcd934x_codec_parse_data(struct wcd934x_codec *wcd) struct device_node *ifc_dev_np; ifc_dev_np = of_parse_phandle(dev->of_node, "slim-ifc-dev", 0); - if (!ifc_dev_np) { - dev_err(dev, "No Interface device found\n"); - return -EINVAL; - } + if (!ifc_dev_np) + return dev_err_probe(dev, -EINVAL, "No Interface device found\n"); wcd->sidev = of_slim_get_device(wcd->sdev->ctrl, ifc_dev_np); of_node_put(ifc_dev_np); - if (!wcd->sidev) { - dev_err(dev, "Unable to get SLIM Interface device\n"); - return -EINVAL; - } + if (!wcd->sidev) + return dev_err_probe(dev, -EINVAL, "Unable to get SLIM Interface device\n"); slim_get_logical_addr(wcd->sidev); wcd->if_regmap = regmap_init_slimbus(wcd->sidev, @@ -5912,10 +5908,8 @@ static int wcd934x_codec_probe(struct platform_device *pdev) mutex_init(&wcd->micb_lock); ret = wcd934x_codec_parse_data(wcd); - if (ret) { - dev_err(wcd->dev, "Failed to get SLIM IRQ\n"); + if (ret) return ret; - } /* set default rate 9P6MHz */ regmap_update_bits(wcd->regmap, WCD934X_CODEC_RPM_CLK_MCLK_CFG, From patchwork Wed Jun 12 16:15:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 803495 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 17F80C27C77 for ; Wed, 12 Jun 2024 16:19:47 +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 8C29FB71; Wed, 12 Jun 2024 18:19:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8C29FB71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209185; bh=/rK5N4p7lzNbPikFsCFIG2uN9Y+xeaegWompkr8S1aA=; 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=DzqmhMLyzNUQcUELtpQKG+SR2iG8z/0KuFFtyESaagJ2+2KKRq1y7HDOKxvMHWNTT s9Q0Kmf3FNHCmaq863yOSA+0WwppddYIjiy0onYs5RvzxqNhs2HQm8YiwcWI7FGZ9R E+0uvshVfz6VbEiNAM0BCwe8sLUvMDvPc6YQ7xaE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4021BF80862; Wed, 12 Jun 2024 18:16:23 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F1D32F80856; Wed, 12 Jun 2024 18:16:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ACBF9F806B9; Wed, 12 Jun 2024 18:16:09 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 D73ACF80603 for ; Wed, 12 Jun 2024 18:15:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D73ACF80603 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=lPR+KeZv Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a6f21ff4e6dso9093666b.3 for ; Wed, 12 Jun 2024 09:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208957; x=1718813757; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=/iEo4Md295/OTL7Myd2RIYbHSuX6XmNxZdXGojd1Rgg=; b=lPR+KeZveelgIjwzae5vqYjU3fqoJYVMmvxVZNDSFPOPhj/G7m9iKa5mbCIK2hpgWA 53QAUgcBTdrpckLtZ09shQEJDFIws+Cvyy/FgnX/QananQRtrNQXRoS3N37wemgT+rW4 MbZ7gv9nByhlL7X1Dz9Omc1m8IFlQCIbqKyXEyHLpsGAlSSkOhE34fTZdPS10ViUb8mp edEWx6V0Q9cwBp2zSQ86Agpt1qTDc4oRHJ7h60Hwr4jA7NpK3k9fLdqKvq3orqPWnEen s7956fSF/TN/G6pVT0kc0Fx8gAJ7W3UQ4Z5yzxpX6/PJQkJn4hrGYLi1EGn4IK1/KlkO wXjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208957; x=1718813757; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/iEo4Md295/OTL7Myd2RIYbHSuX6XmNxZdXGojd1Rgg=; b=I+c8Yie841OXuIHiWsILaHT85O1v4EEP3gka/kGgsYI7oJwqryD1uvGvTOhsIsuICG dDKIju2blyf6Zq+KgtkWaaHSxGWleVT+OXxZ6+xxLqhDcANdp9zVAyT+eozBzWpNgMFm d1MlZ7jD/8lGyd75UqcWwKeCYxviXqvAQXlpJPP1F3TKByt6a3JlaNHYPCoGZfKfCA9K sX6UIfPE4BvmBVlyQbzhV2JT5JpFC6I2Zo9gGQW0eKc1CZf4XPdz3s/C9r+/CI+XgRHh 797IekBY2d20JT20+Ytyvmdxj+tmzxmGQBB4CG8M5rlU3bhggJuTzYqQ5Vc+YSwUdjjP PA6A== X-Gm-Message-State: AOJu0YxfFv1ERtuJY2qhxYjmo5x0FKUZhDE86+Pf0oOFvIOIIcSgEyFV 4QfgueCN8CkNrIETvA2vDcgHI/dFs1eLlH/Hf2ti/AYYgV8LzkjaSl/5djD+0hE= X-Google-Smtp-Source: AGHT+IEy50S8SITZi3bjq2DbDVZcQs7pImUEBnzlSKFFftxfcGZSuVKB5uF7YIpLQwSbQnYIWU2E/A== X-Received: by 2002:a17:907:6095:b0:a6f:526e:5f4b with SMTP id a640c23a62f3a-a6f526e6074mr3480066b.14.1718208956973; Wed, 12 Jun 2024 09:15:56 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:56 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:24 +0200 Subject: [PATCH 11/23] ASoC: codecs: wcd937x: Constify static data MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-11-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1465; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=/rK5N4p7lzNbPikFsCFIG2uN9Y+xeaegWompkr8S1aA=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmgfrAvN9jmrz3zOenScYVJk3VRxnk6Op1wW DYK4/Iv3s6JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJoAAKCRDBN2bmhouD 11nsEACB2gWgRhL36G/IHrTBMlWrvaaF6KR0xQBOPCetIqklAbL8fvnh5L+rf/eDEw7kCYPy3i1 i8mw4seuiZYhJpCwAWrJcD4hogyGtwa3B+af+/pXC7YaaKJBAuKUlo4uj8dbcpc+yFml0P5VXiW /E5xGbhl7xlKmkIHhB3Fhip/r37Mlj38RPzTVQexKwR4Foys73xWfcgY5e5ZC0FLjdLlhI9wptF 0sKCLx9Es3zFxAl6S+nIqF19JhYlBnNDTmHHRw6zoDhVUCWbR5aMbqn8srovfpnMJd3c4rDRMw/ jMbnGB5l6LJBo8nzc7ljuV6fo4Wf2/0egGaDmLwXw+VjxX6gWBKgc9MK+OvuwLacXrBmkomApL5 NvaCJoiITxa0P27g0tEm3XiHJcAxICk9t4ZcqIF101QeYnSi1k7abnSRczKemTS/AeqwKIo4olM elHbe21+/y0LLq1L+f3313qf3BqcyygVeNR0gZWyyr/S2cOwJ4orxqkZegRrYxi/WygfbXzNG2y xvyW9YaAoxf6/kCLKS0mfOrkGF0HTNwBI1QA6IBDUOX7gmSOr9vs8aWzqh9H56ZB9e3mDAlt7cg YxQTfHb7S5PoUeo6vU4qJnER0AmKMfuLS23dc60tDw7AsRQMiiZ4ag0tFKGX378yuf/yTE7mdRU Iq7SaBlQ+Oks0Vw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: OA72NPDJ4BJN5MWALHBMQG6BP77ZIZZF X-Message-ID-Hash: OA72NPDJ4BJN5MWALHBMQG6BP77ZIZZF X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: Driver does not modify few static data (MBHC reg fields, IRQ chip), so make them const for code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd937x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wcd937x.c b/sound/soc/codecs/wcd937x.c index ef649ed77fb2..4cf17d62a0bc 100644 --- a/sound/soc/codecs/wcd937x.c +++ b/sound/soc/codecs/wcd937x.c @@ -133,7 +133,7 @@ struct wcd937x_mbhc_zdet_param { u16 btn7; }; -static struct wcd_mbhc_field wcd_mbhc_fields[WCD_MBHC_REG_FUNC_MAX] = { +static const struct wcd_mbhc_field wcd_mbhc_fields[WCD_MBHC_REG_FUNC_MAX] = { WCD_MBHC_FIELD(WCD_MBHC_L_DET_EN, WCD937X_ANA_MBHC_MECH, 0x80), WCD_MBHC_FIELD(WCD_MBHC_GND_DET_EN, WCD937X_ANA_MBHC_MECH, 0x40), WCD_MBHC_FIELD(WCD_MBHC_MECH_DETECTION_TYPE, WCD937X_ANA_MBHC_MECH, 0x20), @@ -227,7 +227,7 @@ static const u32 wcd937x_config_regs[] = { WCD937X_DIGITAL_INTR_LEVEL_0, }; -static struct regmap_irq_chip wcd937x_regmap_irq_chip = { +static const struct regmap_irq_chip wcd937x_regmap_irq_chip = { .name = "wcd937x", .irqs = wcd937x_irqs, .num_irqs = ARRAY_SIZE(wcd937x_irqs), @@ -2503,7 +2503,7 @@ static irqreturn_t wcd937x_wd_handle_irq(int irq, void *data) return IRQ_HANDLED; } -static struct irq_chip wcd_irq_chip = { +static const struct irq_chip wcd_irq_chip = { .name = "WCD937x", }; From patchwork Wed Jun 12 16:15:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804197 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 BC346C27C77 for ; Wed, 12 Jun 2024 16:19:34 +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 B2146EB1; Wed, 12 Jun 2024 18:19:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B2146EB1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209172; bh=LTstfjn1hMHMf+Q8MdqFM/YRF0Q4UyK8wtDcQ2OvBmk=; 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=IvHQFaxPpaxF+kODWq3OUopeVaLgqz7IjQY1T8uAzzhG7u7QLZUGGLT7RibsismxF /DcwcpDeRCp7WdLcwEBuioP2FJyRmxt4by/8kXYC5p+AO5Vry0rSB9gYNayhVa4Y7o 3fcukTPDVmphGhisdSouumGKOv+kc5oh7QA9FCTc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 87260F8080E; Wed, 12 Jun 2024 18:16:22 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 06B33F80803; Wed, 12 Jun 2024 18:16:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 12D20F80698; Wed, 12 Jun 2024 18:16:08 +0200 (CEST) Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 4DD83F8061A for ; Wed, 12 Jun 2024 18:15:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4DD83F8061A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=QI2jxZWK Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a6f09b457fdso4717266b.2 for ; Wed, 12 Jun 2024 09:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208958; x=1718813758; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=X0RoCwzR24DTjnx5Ae0LKefqJtZxwLkqbFaLkQ97nAo=; b=QI2jxZWK7b2W/dzCVy0KYM0sJ3AcAg4CsvlPvQLY7MtXnhYmmzQL3XKvetsaSuaIlJ S3ieja6LE0O/nF5hUzUVmy5LLegUJ1dynJSB1klvN7LgQa0bl4JaRIoPSsH2RwBcY8oS fF2R97vaeeCY319oZGJH0kohL4yhSJeS5p5g3SgBw0Xk+C2HKpAFCNCPXRpBD/zVX9pz zFI/CRI+bG6/mza7lzOn9rg1PKPoxwLjFoGjKn2eXMUtUO54i8vbKOudyjy9Xr2D/oUD zyUnVKMGtKUWkATnO5RfKkjNNiIsRGLF1KA7m3+zbDmgdAMGuFzWu4mXfgPLxQ4JeKRs VU2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208958; x=1718813758; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X0RoCwzR24DTjnx5Ae0LKefqJtZxwLkqbFaLkQ97nAo=; b=V5kUMdA4ztZqA+NJztg6V0Td6LZjNRexDzbeUctOFi2ENfGmj+m6xZyjz8tk6PAAGo Obkh641/T6bmy4v8/+T1OcQZA9pkQCQUU7AOwoP9S6dYqlYtBEppSCWctFB3avWAqZ3p QxFPXBsD63OtpEpYC58U0bOFf+k6ISugATaWnZA8RxfdHxTGAdiUdeadcNRYxXpzI+Ba qchKsip5GyvN9iYhfm8QG+9/wQkLnsQ4PCAZJpa5g0gwxlxiIGsnymdCavE8bW1vwDww 62bzEQkk1Me5qHUSUxP6YEecVo/HwfHt/0QVkehoKl5u7EwtocbKDXo3bEbFdVVrvTpX VUgQ== X-Gm-Message-State: AOJu0YyFILMEgH0VB8QYGkn0jizUnUfsRGJ5BUNeCZz7c2u/uxe00jGE /qtC4aTLSKOHEX9VaDkK4n7W/i/RITyCBVpB2XRFwwJ5K+AwIRHOJT1e9a/uixU= X-Google-Smtp-Source: AGHT+IEHT7fjxNIbBkv5TRIIRZ6myoWuerWmlXjHIwCrkRZNl6xan8/1FVtMhhGq1x0G45gcVVc3LA== X-Received: by 2002:a17:906:756:b0:a6f:4a5c:4ba9 with SMTP id a640c23a62f3a-a6f4a5c4e2dmr136376666b.39.1718208958141; Wed, 12 Jun 2024 09:15:58 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:57 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:25 +0200 Subject: [PATCH 12/23] ASoC: codecs: wcd937x: Constify wcd937x_sdw_ch_info MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-12-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2590; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=LTstfjn1hMHMf+Q8MdqFM/YRF0Q4UyK8wtDcQ2OvBmk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmhBBzVRShUj1VYQpmrpSMRLxtLFx+CLMBIR JATHB9laYKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJoQAKCRDBN2bmhouD 17KNEACKbYdkfoppv6n+mBfwN8E80Bvdy7+v/7JJre6HAW4Z6Z6RgRdCLEAxh05k7fBgq4/UAfj jSxcu7pXOKCgUvlkBMbA1/OjwGIq0+qB6t7R7RMS8OW72dlYEnJc5gz+SG1hTVybKfpkbXcN5y2 ivhTJfyi0bQeYCftqgRR6Dhzy7goc+Vd28khWHuP3k+zolV6qTXfmSskz818mWDjP7aoP9d/57k gFRgmyvHtpRHs8AOr9rPQSwmG+al98s8M4+oHnmfgyO/xBT/k0VvLJgj54etrGpsyiFbp1XG9YU FKsecBbhHyPa+LNUVGIlEQ/qIn8exFoy6hfVGLEDQGcrz6HpwDZEbnPIi17fw5PNCmbkAaOUQRM HUhdZgjG2HSsiAAL5cr+drtIoD4Fkpj83PFFvWOP2cnCPMAO9s6gDJj3FQl2AEhc5ppiHGsJNBA B/SsxDtfZ9jxvgi4PitAUd1KnfwBLZ+Zs1yqLDPdqnG/6o6S2rfP/3jLS38vkmZUWU8O9T2oJ88 KHIqlsWzayMzsvh4w/OqekWzHmwAl2yOdm+b2FOtdF92gvcfO5D0wlGg0a1cTkMrFCdyIbE+RUN 5SzOTH1/xvQslhNtKqRQHYcvUwmyIaA8HtW0kY5rPyje0N2h/e6GmNVRX1H8iPgeBrxYTTeMZS6 mFNdzhmp5tQTS3g== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: J6LC25C4ENPN3VUGKAYRSP6OILX5APYE X-Message-ID-Hash: J6LC25C4ENPN3VUGKAYRSP6OILX5APYE X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: Driver does not modify static wcd937x_sdw_ch_info array, so it can be made const for code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd937x-sdw.c | 4 ++-- sound/soc/codecs/wcd937x.c | 2 +- sound/soc/codecs/wcd937x.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wcd937x-sdw.c b/sound/soc/codecs/wcd937x-sdw.c index a45025bf96c6..a24d6c620dba 100644 --- a/sound/soc/codecs/wcd937x-sdw.c +++ b/sound/soc/codecs/wcd937x-sdw.c @@ -19,7 +19,7 @@ #include #include "wcd937x.h" -static struct wcd937x_sdw_ch_info wcd937x_sdw_rx_ch_info[] = { +static const struct wcd937x_sdw_ch_info wcd937x_sdw_rx_ch_info[] = { WCD_SDW_CH(WCD937X_HPH_L, WCD937X_HPH_PORT, BIT(0)), WCD_SDW_CH(WCD937X_HPH_R, WCD937X_HPH_PORT, BIT(1)), WCD_SDW_CH(WCD937X_CLSH, WCD937X_CLSH_PORT, BIT(0)), @@ -30,7 +30,7 @@ static struct wcd937x_sdw_ch_info wcd937x_sdw_rx_ch_info[] = { WCD_SDW_CH(WCD937X_DSD_R, WCD937X_DSD_PORT, BIT(1)), }; -static struct wcd937x_sdw_ch_info wcd937x_sdw_tx_ch_info[] = { +static const struct wcd937x_sdw_ch_info wcd937x_sdw_tx_ch_info[] = { WCD_SDW_CH(WCD937X_ADC1, WCD937X_ADC_1_PORT, BIT(0)), WCD_SDW_CH(WCD937X_ADC2, WCD937X_ADC_2_3_PORT, BIT(0)), WCD_SDW_CH(WCD937X_ADC3, WCD937X_ADC_2_3_PORT, BIT(0)), diff --git a/sound/soc/codecs/wcd937x.c b/sound/soc/codecs/wcd937x.c index 4cf17d62a0bc..8b000ba9a469 100644 --- a/sound/soc/codecs/wcd937x.c +++ b/sound/soc/codecs/wcd937x.c @@ -1244,7 +1244,7 @@ static int wcd937x_codec_enable_micbias_pullup(struct snd_soc_dapm_widget *w, static int wcd937x_connect_port(struct wcd937x_sdw_priv *wcd, u8 port_idx, u8 ch_id, bool enable) { struct sdw_port_config *port_config = &wcd->port_config[port_idx - 1]; - struct wcd937x_sdw_ch_info *ch_info = &wcd->ch_info[ch_id]; + const struct wcd937x_sdw_ch_info *ch_info = &wcd->ch_info[ch_id]; u8 port_num = ch_info->port_num; u8 ch_mask = ch_info->ch_mask; diff --git a/sound/soc/codecs/wcd937x.h b/sound/soc/codecs/wcd937x.h index e6e1ad5926d5..6f857ce7d8b7 100644 --- a/sound/soc/codecs/wcd937x.h +++ b/sound/soc/codecs/wcd937x.h @@ -522,7 +522,7 @@ struct wcd937x_sdw_priv { struct sdw_stream_config sconfig; struct sdw_stream_runtime *sruntime; struct sdw_port_config port_config[WCD937X_MAX_SWR_PORTS]; - struct wcd937x_sdw_ch_info *ch_info; + const struct wcd937x_sdw_ch_info *ch_info; bool port_enable[WCD937X_MAX_SWR_CH_IDS]; int active_ports; int num_ports; From patchwork Wed Jun 12 16:15:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804196 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 EE8DBC27C77 for ; Wed, 12 Jun 2024 16:20:00 +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 63366E69; Wed, 12 Jun 2024 18:19:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 63366E69 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209199; bh=k3aHGQ35T7ijjTVwTgAA+AUOyeA0WrPr6zQfs8D75H4=; 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=VeS007K5KUcYCtCTUe6km0WiavkUYd5pBQb2zWyOtQ5YZNnBg4SsD+tohpknaqM3l ryR9ULJNds3WLlByHfEKg7oq8J7ckcBk4m70Ms0RbHwLh2IAJPlgF+YEJ6bYZ4jhRG fZLyLJrqzYVYpDuYG63hAz+yaWtEiUzLPrcH9VZg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 76932F808CC; Wed, 12 Jun 2024 18:16:26 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F0F1DF80C07; Wed, 12 Jun 2024 18:16:25 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 63A7EF806CA; Wed, 12 Jun 2024 18:16:11 +0200 (CEST) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 06D6CF80617 for ; Wed, 12 Jun 2024 18:16:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 06D6CF80617 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=BiFBpSB4 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a6f0dc80ab9so9284966b.2 for ; Wed, 12 Jun 2024 09:16:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208959; x=1718813759; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=UcbW+JTPzOIFFpOVum5uDUaAmhIV61iigZY7iqshvBY=; b=BiFBpSB4ZITG2/9wZY1atS4QKFw1dvQYZ3ndwiUtzDZUq+qKOyUWVtU9sSQC8cbMnA T/fTDB45u9iZwy7Tzjxp+ImEx+f69bjB+MChjmO44hWafVT7UpBWeO/CEPhbFQsF8Y3j 3WzoXi9lv2YRiU6gGInq/TPCjK0SsDZ0QxLx9rwjnoOdXg3AeVYwivhBXT5NCtcMstQd VaTavJJSk1P78Mfyj8I3SOkYt9McK641lYweBEBmFkDpyPsQCxhms/pN3pDoncx+dp17 piL6lwM7gV1SyVXw4qvKLIa9y6oonVaNLsbSRsD4G9EgO5IH+/y97GN1P9bGkeG7dUE+ QlZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208959; x=1718813759; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UcbW+JTPzOIFFpOVum5uDUaAmhIV61iigZY7iqshvBY=; b=w4AufHg5u6Yzn/qlLqP1z1UkEnVyeiV+MYtgC6J5A3mz/MZ6pT4tANJ+2tJoO/hwsG XndpxayE5epBUqkKqqqQITwvQEiplM+ActKpw/GLZP40EKMZJ/apqZ/r5oUMI3CKePY9 6ElnrR1hddVfwnbbDzsTAaw94/O4/DF2Kg9GgRrrj252eAtv2ALswqyoNMLY3EdTt8Go GhWEPyFEUGhlqIQ/hZygihxaIYJRQ9yct2F4WMLt2cuwQaFIfTlVuLwbRO1+pubg3ATi c6fByJMe7YOsUTkYGqlNgEAJS6AwA94BZAlSYeIXWAZoPNHoD+qdDhZ3SpGVjjBezXKV qh+A== X-Gm-Message-State: AOJu0YxZiCI0TxpWcWcGpha3EHO6BXLnW/RlVAeB9CrYOsvyaYLih+2H g+DyVSHRZhr0diLz3/rWUsuYLF8RixLSvruUfz9ZMLiGwsnyT9+y1D6/Vo6LeMY= X-Google-Smtp-Source: AGHT+IEN9rj2+7IxBP1nbcBt9m7CJsmICBXS9QNlv8TKrqAIqhUGB4qf3LQZ9NZjbSz+56EqZjtyAQ== X-Received: by 2002:a17:906:8411:b0:a6e:f701:384d with SMTP id a640c23a62f3a-a6f47c9ef68mr138716266b.29.1718208959469; Wed, 12 Jun 2024 09:15:59 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:15:59 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:26 +0200 Subject: [PATCH 13/23] ASoC: codecs: wcd937x: Drop unused enums, defines and types MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-13-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1405; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=k3aHGQ35T7ijjTVwTgAA+AUOyeA0WrPr6zQfs8D75H4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmiUZs1tlbK6jnBBYnES4RTFwj4cUtfFCOno R4s7gGO52qJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJogAKCRDBN2bmhouD 1+tcD/42Q1kKDqlMFYK6egSvrDjb4I3laIlWnthXZ8q/mP9P/VxLLWKe7SKkna8H5vuR2rE5l6T cmSj9/GPYecCXoPSdWTKTbhBkREhIEk4Y+t+7cN6oK5ZoaHTJuUfy6TDKixktFYHx9hu/VfW/4O J6CGsTtWiVKWgiIY+VmQbPbCBNjJAtmrQELlqovmVej1yKPAFzSNjgcoE7hIHxUnoteR5KFpg/Z YzHXBjwy5EuFYyxU3MRKFhGajmJUWjnXMw2CAWuNodCx5eWwq77/7GIHaIeiE9DwZobMpd/ciOb gaqSzQ2AaiNpChSnnZYRVnlEWROQ5UtDTW9tkYBFnxjo5bYGuVMZnFBUJ3L9IELS6fcKZ/sYyN9 nXqJm5bRSeunVFnT6eoCAyaTpAaqz9xltxWp2Sqb97A0c+a48MsPHT81MuI76SrA/mmy/o0myaw q+ZM13T6b2t3w2mIthMaepqU3iXyy2+dHNSUhfQ/bJEudXyAAqBnrwKgX9LE4GwqDi0JTEOsfek iBVgz26+46X+CVPOhFp1fPyVpg4BNGuZV7JJOjjQtN9C9P93fXhJYJTLNtHTlCMRVt1U++FrqUk fdW8z5HQ8ziDaldRy22lPOuGzDe9d7Fja5OiYl04I5DDRWv1LYxZ2HC+ScDNxzdVfF07oazsdKx Yi3lbgwGryYWV3A== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: HVF4YRZIUOEPRZ3WCJ36EOHY5MBUCYZX X-Message-ID-Hash: HVF4YRZIUOEPRZ3WCJ36EOHY5MBUCYZX X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: Few declarations (defines, struct codec_port_info, enums) are not used and can be safely dropped. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd937x.h | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/sound/soc/codecs/wcd937x.h b/sound/soc/codecs/wcd937x.h index 6f857ce7d8b7..834a3e7713a3 100644 --- a/sound/soc/codecs/wcd937x.h +++ b/sound/soc/codecs/wcd937x.h @@ -488,23 +488,6 @@ #define WCD937X_MAX_SWR_PORTS 5 #define WCD937X_MAX_SWR_CH_IDS 15 -/* Convert from vout ctl to micbias voltage in mV */ -#define WCD_VOUT_CTL_TO_MICB(v) (1000 + (v) * 50) -#define MAX_PORT 8 -#define MAX_CH_PER_PORT 8 -#define MAX_TX_PWR_CH 2 -#define SWR_NUM_PORTS 4 - -#define WCD937X_MAX_SLAVE_PORT_TYPES 10 - -struct codec_port_info { - u32 slave_port_type; - u32 master_port_type; - u32 ch_mask; - u32 num_ch; - u32 ch_rate; -}; - struct wcd937x_sdw_ch_info { int port_num; unsigned int ch_mask; @@ -570,12 +553,6 @@ int wcd937x_sdw_hw_params(struct wcd937x_sdw_priv *wcd, } #endif -enum { - WCD_RX1, - WCD_RX2, - WCD_RX3 -}; - enum { /* INTR_CTRL_INT_MASK_0 */ WCD937X_IRQ_MBHC_BUTTON_PRESS_DET = 0, @@ -645,9 +622,4 @@ enum wcd937x_rx_sdw_channels { WCD937X_DSD_L, }; -enum { - WCD937X_SDW_DIR_RX, - WCD937X_SDW_DIR_TX, -}; - #endif From patchwork Wed Jun 12 16:15:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 803493 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 9E324C27C53 for ; Wed, 12 Jun 2024 16:20:55 +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 D93E6E80; Wed, 12 Jun 2024 18:20:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D93E6E80 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209253; bh=t1W8fZJc08OWTn9drn5Isz85PBMXQQtI8H3pG9X8loI=; 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=NNMkGbg3Qz02dMTFKdc1fN6+8hvW1dEkB97J+2FzOkcKZHDZN1YVWrXcfWu7xYCEU g95eMj1+QcnV8sTbHJCN+7Xdjnklp5UzfMj7ZU99E2rg6LN6U4PNP9ep47O4WLPuve ys2QRjnZR4lcvRM/JIa7lI5uIA8VEPCPrO3wVoWE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 76491F8961E; Wed, 12 Jun 2024 18:16:32 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 27586F80C97; Wed, 12 Jun 2024 18:16:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 94D07F805B4; Wed, 12 Jun 2024 18:16:16 +0200 (CEST) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 88C87F80649 for ; Wed, 12 Jun 2024 18:16:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 88C87F80649 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=sqaGUBFj Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52c82101407so102503e87.3 for ; Wed, 12 Jun 2024 09:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208961; x=1718813761; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WOyBASUhg7ig8GH/FzL2HhKWigPyyxASUZk5LUtWyQI=; b=sqaGUBFjirU1ydK1PWMVS7JkLlG7lqCGWin2TEF5rUN6ctb4Ih0tnZq/pUnlkuVqOU 0ynUNyXbVt5MCycmORoUsIIbUU+qnbQG3CzxoMbkFxtgObBlcaVPO6rcHmSiPpYDNWnD HgBzLPw2SE1dKZb/nwxZNDgrrQ4zNa+u59meCZOsm2+JrQ21KOoQAbYXjWx95ErUC14L QeB7ObJq5XkL2kkFiw9Pv+7WBNg7Y6u7y4d0nlify5Plc1G0cDg6MRGcxyl2bShp5ApR /nmqDWqAiAyD6NRQ2HpYczMOpD27LSeUT1WHmIAdDfPnSfrIOnyH9Ep9EDV6YZLU8Jsq 54Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208961; x=1718813761; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WOyBASUhg7ig8GH/FzL2HhKWigPyyxASUZk5LUtWyQI=; b=cRs2CMnCnGqjF3lm/bKlySVv6Urux4FtQywh8hEAvE8i78tBDR6a+8OGL2X5L5R21R l903nR48rDSTLITUCa4W1Fp0u1YpY4J8RDQSPyv+sK7Zq6rud2B91ZXlBs2poe1JcqmI 1htkG6h4P051yaYFhEdpMG/0j6i+SVgp2xWcaEVeDbiPQ8X1Hm2n6t5nTIWlA/424T2n aQxHaGRLi0GIFsvIwPxevp2zdexLSU8z3stZshK2R8SjVecJpW7Wv9cyewSo5bORVzBO V81BZJw5biRZCRd8JBg7M3HpMxISyqbaPEgmXh3pC1PaYwsjHUPt6N5YjeFI+uIukuhs h4Yg== X-Gm-Message-State: AOJu0YzhaRiyR7ppUgZqlOJ39DTJY2xmtVJZaXkD8oQBWJGy5GOj5WgJ dIWBB99vYXbni8PNVkVi7wb9ChcEG16Iad2IIIiTLr2haeP2Q2jY4Hsib0E+LAY= X-Google-Smtp-Source: AGHT+IEWRBqWsxwgvrJQWye7VveA5xb94vJGDj2onicCiggy/FGFATNeH2oWusyHU6RLe7TqvK/r5w== X-Received: by 2002:a05:6512:31c7:b0:52c:8342:6699 with SMTP id 2adb3069b0e04-52c9a403655mr2243960e87.55.1718208961478; Wed, 12 Jun 2024 09:16:01 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.15.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:16:00 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:27 +0200 Subject: [PATCH 14/23] ASoC: codecs: wcd937x: Drop unused state container fields MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-14-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1386; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=t1W8fZJc08OWTn9drn5Isz85PBMXQQtI8H3pG9X8loI=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmjKk/cSa0vLmOH1Wr4+Ic2SQUQHPw5w7m0r rW1nPqA7zaJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJowAKCRDBN2bmhouD 1+miD/9dW1UyFrklWvHwePml6lmZcpdQMxwTt9JA1H2+9BAq61olORcBTuj/boisiFPdwUwZ/Fj YnEhI4V9gRT0Jt5z1JInpiLwN0bx6Z1UVjgGLop5LRhQDwYXOUA8wnoz6iStmtWodULd7ntp2so bfQ/tvkf+LafQV98UPAasekyJY+dd9DJXVitrZCkwPAA2NKjye9TE6SosjPkPDI7sw2/KW/T6cm I0yHZRHQYpmQr+hfUlKqYevkd57hx5cQeTQJeZ3m48pK/7b8FQBv1cb8A9AHt+EZhLM8euSIrPa vWoFQoLqMJBLhC5YZbilAt7A3TAIF96h+kfJH0fWh/Pm2Isb/kgq5TfD2FRVf2ggJLcsHYtqVuM SYVPuzdpLeuI6wu2AZRQy6lVeUWaESOLllSncQ3eyRkI5FDiKFiHJmv5Ki5Rudzlm4aigLPrUY1 MYIYjarXaerHU3eK+PC3n+0eTylWBdvUn7PC9DGftUIAXk2UM0lPnIvEWJigAzS9r/24Y84dHOT GPetz02oLUJrSIZpPlVliXi0wHvP0gEECtNEM5Vqxr1YlXbAT46J0cjV6zfWdYAWI7Ez0vVpOUP klB9PMMCteeGk8o7ylVAv2IPsxzstcwPFWfNWpkfK1ryiSkNtJZsBokx/q4KE0erop1p8v7wH4H 3uwiRTC0df1ARYQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: S4C4CCZNUUWKL5HPDM2RPT7I76YEONG3 X-Message-ID-Hash: S4C4CCZNUUWKL5HPDM2RPT7I76YEONG3 X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: The driver does not use few 'struct wcd937x_priv' and 'struct wcd937x_sdw_priv' members, so just drop them for smaller code. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd937x.c | 4 ---- sound/soc/codecs/wcd937x.h | 1 - 2 files changed, 5 deletions(-) diff --git a/sound/soc/codecs/wcd937x.c b/sound/soc/codecs/wcd937x.c index 8b000ba9a469..96e2989f9722 100644 --- a/sound/soc/codecs/wcd937x.c +++ b/sound/soc/codecs/wcd937x.c @@ -103,7 +103,6 @@ struct wcd937x_priv { u32 micb1_mv; u32 micb2_mv; u32 micb3_mv; - u32 micb4_mv; /* 9375 only */ int hphr_pdm_wd_int; int hphl_pdm_wd_int; int aux_pdm_wd_int; @@ -113,9 +112,6 @@ struct wcd937x_priv { struct gpio_desc *us_euro_gpio; struct gpio_desc *reset_gpio; - int dmic_0_1_clk_cnt; - int dmic_2_3_clk_cnt; - int dmic_4_5_clk_cnt; atomic_t rx_clk_cnt; atomic_t ana_clk_count; }; diff --git a/sound/soc/codecs/wcd937x.h b/sound/soc/codecs/wcd937x.h index 834a3e7713a3..f267c66ca959 100644 --- a/sound/soc/codecs/wcd937x.h +++ b/sound/soc/codecs/wcd937x.h @@ -508,7 +508,6 @@ struct wcd937x_sdw_priv { const struct wcd937x_sdw_ch_info *ch_info; bool port_enable[WCD937X_MAX_SWR_CH_IDS]; int active_ports; - int num_ports; bool is_tx; struct wcd937x_priv *wcd937x; struct irq_domain *slave_irq; From patchwork Wed Jun 12 16:15:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804194 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 CAF3AC27C77 for ; Wed, 12 Jun 2024 16:21:07 +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 F2EF3E94; Wed, 12 Jun 2024 18:20:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F2EF3E94 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209266; bh=DfQrCy7EPdHobgPyU9Z15QMCzkozExD4qQYmVl1720A=; 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=aGTqiGvtia/QEY3rX8vZxOZ/3riF8hAV2CCY5Q1tGD2hvyqs+f1a7QE6G0BQVqpHU DBlxZ1ITBqhVF/u6U3DB/SSxTar3elWYWM7OQA8AI7WYU/VZCQg/TQc+9uvnmmnewK ry0nQo6wwb53HmlPPEQ21GlJA7lCn08Q00waH9Rk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 011C9F8962F; Wed, 12 Jun 2024 18:16:33 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6478DF89678; Wed, 12 Jun 2024 18:16:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 211A6F80760; Wed, 12 Jun 2024 18:16:19 +0200 (CEST) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 A6D9AF80678 for ; Wed, 12 Jun 2024 18:16:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A6D9AF80678 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=r4TsAXHV Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-57cad4475e0so1140649a12.1 for ; Wed, 12 Jun 2024 09:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208963; x=1718813763; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=a2qLhgW8KCLNLm5E9+T5V7rINfGXJY8In7L0xJk0yrk=; b=r4TsAXHVmHkS6CIj/jRzvgBRkoB2Ee4OX8sbLGwTshs1pwOxUWYNuStijjDbGicVvK 7vEMD4CEywtfbM49+3qX7Fj09x+dxg4gC3EB/TWQ1hO0kPsC7W3TE9+JVdxgeqHRd0Iv ZZeCs+aqzlJlbp3C80yRtEFgyjeqBIqXKVVD4OR96Bxg5rgZQZQ/uOQZaBvwzUq97zd9 qlBtKyQlCLq3xfhwOZJc4ybk83iQ810UPvEHABCRM75gddnzy/JSDxnfdHuqRU0y8xW1 3WFGS0nT2nFEwEvFw0aLr3bOmETxmgPyLghxr/2EeTiuKrpEXXkD5CVT0kJ0VRGG374X jXIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208963; x=1718813763; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a2qLhgW8KCLNLm5E9+T5V7rINfGXJY8In7L0xJk0yrk=; b=AlLaSymZPpPZrUsBclA8Edn6EXJoA6wwa2zhUGpKn1Hw0q+i6+9h9gdT4bae/gcm2L Y/DZTfx/lyQ4dtfl0/B8nrLdx3cosP4VWlgs4hz1oH586oBOBln7rPUPvlTRUGnm7wXL lUkt1ga99wqcLOZb3JjFBOxlq1uG5hHpx7te08LoqpbX4mV4uYmJyGpgRU1BJeDK/dsY 8lJNth3aHLhr0FmAYk2p4JtzOgQLZ6bhvARVItXiml5waOuia0kzdOOUusSqBIawvsU6 4bGRVQ4I3792xn+f7r7p+iTTc9Q88Kx8WI8FHoOlsfFrjXoS770bg27cmakd9TqhBaWw W2TQ== X-Gm-Message-State: AOJu0YzWdQ5pAefJLwsybwwMJXjGmc1HzQnWF+Tx9a3GD3bBO3rdbFOw eOYH/ErqF9I1Yv/dMhhSkexSXNw92VUufEr45jfrlGlLvzh9Fm1Njq4SIgXudPw= X-Google-Smtp-Source: AGHT+IEaxDscDTCz98NySxu5kWNh8RbOVnW92/hmTae69P40NS2kQrWhez3Q7lBBRuGgxN9hl/EswQ== X-Received: by 2002:a17:906:27d6:b0:a6f:4232:4370 with SMTP id a640c23a62f3a-a6f523ed34cmr9882066b.5.1718208963267; Wed, 12 Jun 2024 09:16:03 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:16:02 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:28 +0200 Subject: [PATCH 15/23] ASoC: codecs: wcd937x: Drop unused chipid member MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-15-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2010; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=DfQrCy7EPdHobgPyU9Z15QMCzkozExD4qQYmVl1720A=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmke3u0kf8lnyb0s0QfPL8aI/2dH2R1t684n kmKyhh8/siJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJpAAKCRDBN2bmhouD 1x8cD/9qfnVnoulRcTk6aU0YK+dtSPJsmk9BsXwzTqwP6Ehddbn+CarFRP2bjWywEuweaxNGAl+ QaGdzy8AFkLtQzgtJFZr3nf/CShN+mvfOIH2zK7VmnhYihL4+AW6RS+Y8Bm21xvFFGbZejrOKQa 9l3kfbRn5+8s5ZIxIQ+zba/V+sZsG9fAYIAO560YoCCejowEl60W7uJ3+yntEBo2ADlE1xsdnCw OH9NOL0L+V24troQbqXV2v+tN6txvfka2NGDrIDNfVoFfipZlijd/8I14YSnoZwFgBARcyqCFyg CoZX8HVQLxLFfo1ljtLJAahgmZQ/XRDZj13hM/TF52MaYuV/zaSW1Jyw63Qn2lAn+0zvojZobnG 7RXw8KUbnOBc+tecVdA441Nz68RKgnx0M9r4EOl0j9rb2TwsfeT3vjGJHU3sxxbwnzamMTqK3m3 JVSrInxoo4VVwvrCbRTNk7WA+a20B4A/jhRwUq8//Gtusg7D4jt9ahU9OOy/aTo7fEECG1ZYF61 ysCZxeUFm2vdapjO40MtZC+DJjmeuCCaN7p0jYl+UTgiKPR4bJHo/qy/zXr67r/0bkl1BF9LzAs DEVKCINiuMNGwbtL//wTaiUlfmVwvC5RxShzuz32ycPERp750AWQkqX4ZBNGAJq6kL5/W8+Cts7 TSWOUyWEsbCbCRg== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: 5SB5B5PYBYVG7VI56GHKVTU5WV32EZ7T X-Message-ID-Hash: 5SB5B5PYBYVG7VI56GHKVTU5WV32EZ7T X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: The driver stores the read chipid in 'struct wcd937x_priv' but never needs it after. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd937x.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/wcd937x.c b/sound/soc/codecs/wcd937x.c index 96e2989f9722..4beb70bc4d8c 100644 --- a/sound/soc/codecs/wcd937x.c +++ b/sound/soc/codecs/wcd937x.c @@ -99,7 +99,6 @@ struct wcd937x_priv { s32 pullup_ref[WCD937X_MAX_MICBIAS]; u32 hph_mode; int ear_rx_path; - u32 chipid; u32 micb1_mv; u32 micb2_mv; u32 micb3_mv; @@ -2539,6 +2538,7 @@ static int wcd937x_soc_codec_probe(struct snd_soc_component *component) struct device *dev = component->dev; unsigned long time_left; int i, ret; + u32 chipid; time_left = wait_for_completion_timeout(&tx_sdw_dev->initialization_complete, msecs_to_jiffies(5000)); @@ -2552,11 +2552,10 @@ static int wcd937x_soc_codec_probe(struct snd_soc_component *component) if (ret < 0) return ret; - wcd937x->chipid = (snd_soc_component_read(component, - WCD937X_DIGITAL_EFUSE_REG_0) & 0x1e) >> 1; - if (wcd937x->chipid != CHIPID_WCD9370 && - wcd937x->chipid != CHIPID_WCD9375) { - dev_err(dev, "Got unknown chip id: 0x%x\n", wcd937x->chipid); + chipid = (snd_soc_component_read(component, + WCD937X_DIGITAL_EFUSE_REG_0) & 0x1e) >> 1; + if (chipid != CHIPID_WCD9370 && chipid != CHIPID_WCD9375) { + dev_err(dev, "Got unknown chip id: 0x%x\n", chipid); pm_runtime_put(dev); return -EINVAL; } @@ -2605,7 +2604,7 @@ static int wcd937x_soc_codec_probe(struct snd_soc_component *component) disable_irq_nosync(wcd937x->hphl_pdm_wd_int); disable_irq_nosync(wcd937x->aux_pdm_wd_int); - if (wcd937x->chipid == CHIPID_WCD9375) { + if (chipid == CHIPID_WCD9375) { ret = snd_soc_dapm_new_controls(dapm, wcd9375_dapm_widgets, ARRAY_SIZE(wcd9375_dapm_widgets)); if (ret < 0) { From patchwork Wed Jun 12 16:15:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 803494 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 A86E3C27C53 for ; Wed, 12 Jun 2024 16:20:18 +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 DFA73E7F; Wed, 12 Jun 2024 18:20:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DFA73E7F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209216; bh=zKXd+91xEq5pfFCX7DOuH5v5v4sMaD9C4FPc04gU9r4=; 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=pPm1VPH82OilofzWSH9qsWzom8BlYIxBjf+cpsuFuZ4tOMh+qkysEj75/XMWZeRbn G/NP/2PMxriNlRVUGQ91AK5gPxHEUJr9lCl3EUY52UORN/rqbB+J2l+NFgNjSxiuc7 skl2cdsjuKU+FuoiwpT9p7nIAjh6hPxSeFxzOMCw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 08A15F80C1E; Wed, 12 Jun 2024 18:16:29 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 723F7F805BF; Wed, 12 Jun 2024 18:16:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0CD68F806E5; Wed, 12 Jun 2024 18:16:12 +0200 (CEST) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 31C6EF80695 for ; Wed, 12 Jun 2024 18:16:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 31C6EF80695 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=mNidMt+U Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a6efe62f583so6327166b.3 for ; Wed, 12 Jun 2024 09:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208964; x=1718813764; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SiX6Sbf9ddGFk6daznvxWZY69rEFKNMVZ2nde0CgHqI=; b=mNidMt+UxRoR5xz38p+rJBGIHKCUgLcv7enkCK7J07tRUy/swYxWZV+VItNBWkCm1/ uW7beifqjy5vh0KilFJE6R21eUYvi+uEg1yZY66zcaMl7iIhpm0FzX3y5tIAVOH38KjZ 5ZDNknk53Mf1oEHFUz06hE/m7pMI7x5bu6BBUt110ccShepWAlvH9D/rnI73ihhyjQQr xDKmMPeTQMpwtAl8L8MXs5X+x1a7Jkmxt9HlghN9j98cETGjz3Wy4LqQoe2ZpE9xEcXj d/Hvcpn693v+byyUndhh9CVJ7qX2hfNrZ20bWfWAc594OHAYQJDYYysYuj0FHOTmhKw3 YiRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208964; x=1718813764; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SiX6Sbf9ddGFk6daznvxWZY69rEFKNMVZ2nde0CgHqI=; b=VDf/Y+57VrbFlvI/rna6m30ySe1JVXmIfM74gIq/sPBwaRmhZy0+ij6jOh/eDN4zeo akHmPAKfS0618n2fn8nzX+F8YslHCDUuqwHEAvRtxfQBcbwwKJGMKgeLeeQQEHPXTcSV PZc/qVokSKE8HV9/DD2FwXtAoQqMc8ys2v0KjgYbcrcK04gBwFO+QFTjk5eAeiRDygjK ODClW2PkCoc04smGtfXosB9WsNvlCGuMp1oAqoqzl5VXSs7CZZmyvl8EHOZ/98A3++Ai shC2ERJIhSZ1YsXUJPYSNLPlaJJIyaUa7svx2FBsg1oxQjmWH0tzm3J3QQu/I+PKURfj Uk2g== X-Gm-Message-State: AOJu0YyS3gz66uMR5HcjryLBtNdZiwwpHL/54BchlvJsqKx8b3Rkz5JE FV3jtiF7hMtaiXguBDfOWwE5N17t62GEKuudN97j5Z5nPA3nmo7JJKp5BS5EmJg= X-Google-Smtp-Source: AGHT+IGiiOo8DvyESFXAfcAnuf1NGFEdhUpYILJtrfGZXuVCuhwhQWT5bCBjkKfscjQ0XSUs8MlYHA== X-Received: by 2002:a17:906:c349:b0:a6f:22ea:55b6 with SMTP id a640c23a62f3a-a6f47d5cf04mr139036266b.65.1718208964688; Wed, 12 Jun 2024 09:16:04 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.16.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:16:04 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:29 +0200 Subject: [PATCH 16/23] ASoC: codecs: wcd938x: Constify static data MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-16-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1144; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=zKXd+91xEq5pfFCX7DOuH5v5v4sMaD9C4FPc04gU9r4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmlSsu/q1HO0eaUx9PgU+Dxz56B2dOlI+KPw SXkBY21VYKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJpQAKCRDBN2bmhouD 1yyVD/sEH+iwt0IY8qp1uSeTqpdM8WJOxtJQKO07crLnieq69XT6lz0MVNvBufuf1+jprRqGX4v G+vYXNWTc2+wT34jYp4HAVPIkd5O/+jrCJ2Fvc+D+l7/guwa6h7qp1K+K+AHgbPnrpLd3yWalYp LX9cWjSDD3e5vaqhn6Aj8UCMdTTy6uSqdr+Eu+MxpJoUb0+bhxmiJoCuAd5VDvxWYh5RguxjN92 aRShTmq5mkX7ivZVE40xXJs3SYstK17V5HnByrTJwLNBWVZGGtvGmgFk7XQbrUAz44kSvOmkiyy LmVGLnZXVsA34h8P6QhaIcQU1K5HS1nNqmVgOslpjqbgn8X2543TlhR6PwncLlfT+O/ZPwu3qb6 pn7Pduxpcz3NZiNctj6N/5SxqJ/2//NN6UWsYqvTg8oVEJJlEKIxTx6fp+uDaf1Y6WsPNqhE5vr EWMkoZA5/sh6D6A8NS0lwMpO/bgUuyXUFVu+5+RhTuTp8PrfAmCsALZAHKj1ioheTwKbKzPOwh8 eXFODdsxR3TlMLou1tiByjgTfS81dywRci/lTwsS8j8RKTLgiKdD+KkuVVaDcFG0BQ9XWkHAUdr WB7JMNouzyG8LBZYzEIxeT+tAtaamYudAG3LzvraWM1USEsCt0RbSul5XqhNbUr3ZmdgF5gmAFW gfuek37KPhyfRQw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: YBCXTEW5MYCSH4TGN3S2DWI6WZ3VC4CH X-Message-ID-Hash: YBCXTEW5MYCSH4TGN3S2DWI6WZ3VC4CH X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: Driver does not modify few static data (MBHC reg fields, IRQ chip), so make them const for code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd938x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index 73387152ce02..124c18712422 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -221,7 +221,7 @@ struct wcd938x_mbhc_zdet_param { u16 btn7; }; -static struct wcd_mbhc_field wcd_mbhc_fields[WCD_MBHC_REG_FUNC_MAX] = { +static const struct wcd_mbhc_field wcd_mbhc_fields[WCD_MBHC_REG_FUNC_MAX] = { WCD_MBHC_FIELD(WCD_MBHC_L_DET_EN, WCD938X_ANA_MBHC_MECH, 0x80), WCD_MBHC_FIELD(WCD_MBHC_GND_DET_EN, WCD938X_ANA_MBHC_MECH, 0x40), WCD_MBHC_FIELD(WCD_MBHC_MECH_DETECTION_TYPE, WCD938X_ANA_MBHC_MECH, 0x20), @@ -3027,7 +3027,7 @@ static irqreturn_t wcd938x_wd_handle_irq(int irq, void *data) return IRQ_HANDLED; } -static struct irq_chip wcd_irq_chip = { +static const struct irq_chip wcd_irq_chip = { .name = "WCD938x", }; From patchwork Wed Jun 12 16:15:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804195 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 61273C27C77 for ; Wed, 12 Jun 2024 16:20:35 +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 0BEF1E72; Wed, 12 Jun 2024 18:20:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0BEF1E72 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209233; bh=j1T2EZc5hy8lhjfjDFFJirW2r0PITpoz1SZidS75cJA=; 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=ozME6sZMxvqIcTnqQva7gP1ly9JaHmX2I02bVX03cIFBIpdNbSjcXeJGc/OQWUX6G IUEyP5SWWlp0iLPU5I8W6hv+6dIxsV1/pq8WFE1ODNnCDj/EaD/9ZFPrF9No+8+5Hf CxDttHT2SsyyP/8ELSQWu5TJCw1oqiZ5R+o/uxMs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 99875F80C7A; Wed, 12 Jun 2024 18:16:30 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 092B6F805BF; Wed, 12 Jun 2024 18:16:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F0BD0F805A0; Wed, 12 Jun 2024 18:16:14 +0200 (CEST) Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 552D8F806C9 for ; Wed, 12 Jun 2024 18:16:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 552D8F806C9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=cns3/MU6 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2eaea28868dso71924571fa.3 for ; Wed, 12 Jun 2024 09:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208968; x=1718813768; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Rn1wCxSzpGhMj3lz649lAS7ysUYN5adwkzVT1CE950E=; b=cns3/MU6lJRQELTfz28uTrD5mhuZ6XCQnmYbwezaMEu+5ckzeA9nLH+OHap84JVGgL LGK0/Pc7gs3b1oXro81jLVmt1KxirpPVLfs/oDs+p2AMbs+mBAfklON8dhxV7QyFvKGn cihQFXLdptoNQ+yG5TpZo2A14Zm4Dv2VD7v7hticHpAqidt4V/w179a4r2Hk5HuTLlZn iWVMBguyu4imaSy330hdn+BjywfqDmN+YzRB09bK9l9oQDYvtQ+5v9JsEGgrtlCSZcDS AtYVLmuXGNsgqAWL451gwl36EQ4NGRfl7e0CYTzeXqKC/NelvnCvrALR7AwKAU1Gl4zZ Golw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208968; x=1718813768; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Rn1wCxSzpGhMj3lz649lAS7ysUYN5adwkzVT1CE950E=; b=V2xYITeLKNjJ0UNiH3BZhclSeepFofTCDQsO1p305Spq2hN9nh0se/Z3i7Jm89nMRk MQUPNhAZolM1juCDKTW3TMoyvjQwKxVOGMbwW0d/CMM0D2vqMjIoPe8lm/nAyDwRU75r EjYvCWODI6yqZZclMbPiepp/1BxCrK2DA+S85PHddQu59/JEXfaNDiwysjuypok5EVyR 8Qvw+oOGeQHjNFi7+yjjcdJOQa2vWsgwAzpoD4t9Xl0Gtx4DoSEI6DSqIU8v2ylvqhh8 Zi7B9QwVTVF3TplFI9/rcm9vV1ggKcltQ5pGek/kxWC3WrlRAGXmf8pLnjqTkIL4+fQZ d1Xw== X-Gm-Message-State: AOJu0Yz/dSaVO1auK/xGtRFxjSuXu3UA2FKKnkaqaUObd0WoJRbsEgH4 +IiUxEknGoP4Y6aVD6CqJzjB+L7EV4dURM+sbGehj7z0aBVyzF0HpPJOTK36fCY= X-Google-Smtp-Source: AGHT+IGF8tDc6fkHQhj8N0hBjM0u1nGROYuT7Ky5zocWTWK4ZZ4FhkHBtm3BgA4jMGwDrmWzo/tEWw== X-Received: by 2002:a05:6512:3045:b0:52c:8909:bd35 with SMTP id 2adb3069b0e04-52c9a3bfb2amr2359349e87.10.1718208968108; Wed, 12 Jun 2024 09:16:08 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:16:07 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:30 +0200 Subject: [PATCH 17/23] ASoC: codecs: wcd938x: Constify wcd938x_sdw_ch_info MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-17-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2444; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=j1T2EZc5hy8lhjfjDFFJirW2r0PITpoz1SZidS75cJA=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmmYxa/plx5aUYu0Ka2ucFGIRTRrFo7Zs0gg 7Q9/bMif+uJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJpgAKCRDBN2bmhouD 11tkEACYAHc9bdHHeVS2Gv1XjeucTe9X7Oo2WPwk6KJYcaNsU2AiC9XpS12sBTLgeH2jxck69ON ENyisZlJPK6YD7pIj6ZMCVrYz8wwURZD9ude5K8SbcL2I4vldJgFAZrb4L6SdQhbQ7fzJGl9rJG v4OLP9QG4IYMPYyGzvYCFv4aHDfRJ3/0aYCi51mL0BwAlzfwLYO0/kFQDXx82PO0MqpJ0KUDq3Z 9sLczZ0XAEODYAoMGn8pnRMqxeliLNlY88AerigAwL4jDwpA8gKG7rFFyJSaRc3OHUNZ6NDUOO8 VCk/lWCtLumTJHzUuL/1PEQ7Bc45I4hq+9OIONgD2YFfI1HjkaE7VH7+qiNqfcScDPN5qLiiYev ZkYbFf4gbmn0wmVAnbxPCT1C8WmaUATtVghp/P1/uI0C0A7JfoRtDqewr3/qyOEbSgqTTs4t09R 8/xA2VwxD0Z96StDjow5IL8yp9sSJQIW4agyeog0qrBVbn+LHHEQnfR7FaTbZpE9eZu7XV8d2gh 6ynIgcvHcUh4BAKO4+GgRyMewsUl8UDTkfyqztiHEidhz3yKMKmB78Zl9ldXv+1DFdQ9eb8MY+B vgbNO0b3GslqnljwB6pCcjbNPFaHP0DLmJRJm3Pi3vTuIBNvMIspwaBr3Bsa0txzjJcz7oETcIn 5ZIrsZyzehWULHA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: JKFXXQIMICPI2HSYAMMZE4HQXRFSGCUD X-Message-ID-Hash: JKFXXQIMICPI2HSYAMMZE4HQXRFSGCUD X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: Driver does not modify static wcd938x_sdw_ch_info array, so it can be made const for code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd938x-sdw.c | 4 ++-- sound/soc/codecs/wcd938x.c | 2 +- sound/soc/codecs/wcd938x.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wcd938x-sdw.c b/sound/soc/codecs/wcd938x-sdw.c index a1f04010da95..c995bcc59ead 100644 --- a/sound/soc/codecs/wcd938x-sdw.c +++ b/sound/soc/codecs/wcd938x-sdw.c @@ -21,7 +21,7 @@ #define SWRS_SCP_HOST_CLK_DIV2_CTL_BANK(m) (0xE0 + 0x10 * (m)) -static struct wcd938x_sdw_ch_info wcd938x_sdw_rx_ch_info[] = { +static const struct wcd938x_sdw_ch_info wcd938x_sdw_rx_ch_info[] = { WCD_SDW_CH(WCD938X_HPH_L, WCD938X_HPH_PORT, BIT(0)), WCD_SDW_CH(WCD938X_HPH_R, WCD938X_HPH_PORT, BIT(1)), WCD_SDW_CH(WCD938X_CLSH, WCD938X_CLSH_PORT, BIT(0)), @@ -32,7 +32,7 @@ static struct wcd938x_sdw_ch_info wcd938x_sdw_rx_ch_info[] = { WCD_SDW_CH(WCD938X_DSD_R, WCD938X_DSD_PORT, BIT(1)), }; -static struct wcd938x_sdw_ch_info wcd938x_sdw_tx_ch_info[] = { +static const struct wcd938x_sdw_ch_info wcd938x_sdw_tx_ch_info[] = { WCD_SDW_CH(WCD938X_ADC1, WCD938X_ADC_1_2_PORT, BIT(0)), WCD_SDW_CH(WCD938X_ADC2, WCD938X_ADC_1_2_PORT, BIT(1)), WCD_SDW_CH(WCD938X_ADC3, WCD938X_ADC_3_4_PORT, BIT(0)), diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index 124c18712422..12b32d5dc580 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -418,7 +418,7 @@ static int wcd938x_io_init(struct wcd938x_priv *wcd938x) } -static int wcd938x_sdw_connect_port(struct wcd938x_sdw_ch_info *ch_info, +static int wcd938x_sdw_connect_port(const struct wcd938x_sdw_ch_info *ch_info, struct sdw_port_config *port_config, u8 enable) { diff --git a/sound/soc/codecs/wcd938x.h b/sound/soc/codecs/wcd938x.h index 0d332cb555ac..09e39a19fbe4 100644 --- a/sound/soc/codecs/wcd938x.h +++ b/sound/soc/codecs/wcd938x.h @@ -653,7 +653,7 @@ struct wcd938x_sdw_priv { struct sdw_stream_config sconfig; struct sdw_stream_runtime *sruntime; struct sdw_port_config port_config[WCD938X_MAX_SWR_PORTS]; - struct wcd938x_sdw_ch_info *ch_info; + const struct wcd938x_sdw_ch_info *ch_info; bool port_enable[WCD938X_MAX_SWR_CH_IDS]; int active_ports; int num_ports; From patchwork Wed Jun 12 16:15:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804193 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 8F895C27C77 for ; Wed, 12 Jun 2024 16:21:41 +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 060ACDEE; Wed, 12 Jun 2024 18:21:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 060ACDEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209300; bh=L7ZFNWdOudYPqFvlRankjfRpsFdGgmRFWod0+Jmn7g8=; 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=co4Mxydbd2OyXRaVgNZaP5itJfkHvAEIlS1fxNwXdzHqgH7kCzdH1T5r29j4b4BEH +bbB83I79FgzqguJ9oj+z+YUVnd/q4fD4XC79XV3JYnIhNMeHpeQQDxncATw4CpPeM oU8LGacSOw5kj/8LH/0+pX4i+IefcTNcfzJOyC50= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 69B66F805DA; Wed, 12 Jun 2024 18:16:36 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BB4AEF896FA; Wed, 12 Jun 2024 18:16:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B1843F8086C; Wed, 12 Jun 2024 18:16:22 +0200 (CEST) Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 A8D4FF806DE for ; Wed, 12 Jun 2024 18:16:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A8D4FF806DE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Qk8m+SA6 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a68b41ef3f6so9102966b.1 for ; Wed, 12 Jun 2024 09:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208970; x=1718813770; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=JIfrWBZ7ZLY2KaGKe1FyMOfZUNjl1h6UvB70qr9xbUw=; b=Qk8m+SA6WmRUtseTkpvMWaIzzCGkHddr+wG2OlmCG7Q4BW8ZPmwBjgfQX05jm9BrtC u0oTWFjB+ygFeXY5WAntHMvOv5TqviqkwoTNX1q90h8psUsAqICCKUgwV5BU41oUoix4 x9FZWkEMSscH/ZxyFz+LN8BpGILF2Gxn7+xLswf8W3oGuMKIFYwvX+td1MFm+PLKQYEI M/LzAYTnOwctPGWqxFLKQjn02rjejYRxdLcdM/IsvxzniMW+0wqh0V8jfLkpO3zM3vmZ /5Y1VRq9/SsyHZdzuSpP3IYWNcHkSJskz8ForLH4Ko9Y9bltxMV7OZCt/+uVJJTKCf9T C5Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208970; x=1718813770; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JIfrWBZ7ZLY2KaGKe1FyMOfZUNjl1h6UvB70qr9xbUw=; b=KstkQi9qJE6HK9/Rk4SGmRypAbUhjqBEh5y9djrltkf5IqWHSZIDZxN1Rb6LQVluS/ byjqqH6atYmCxPZcEi9s6pOvEhQZpf6s267eJytVKl67eEKS6m2kr0rQhpzdQM2nxL1f 1AjmreBFhjcNmhzB+QG0oEuxEkGVZTwnMeUH+bHxlj+bqXHDQHYhUDh7Z8wLUVfcdaHk M4ieYhjvBFknlERiV3kxzwQPF/JFT+5yRfDj6MyJYoXUAz5l8cpYuZDky0XTiDi376ge oJ0slICg/bV/k2ailyRIjVhVn44CYhWsimVWjPkjKIfEOuTlDeTaIY+uKpMpUDUpM4wq 0lbQ== X-Gm-Message-State: AOJu0YyHAKU0JIHjg52q1/Uu5+1+CBMCCE0Nr2TW+fJo4sedaHcwCQhG W++Ta92+XVNWWVsOtrT5oify4ZIGP4zRRaMolPCJWKWNJjWiOwigel5hNhPN3jM= X-Google-Smtp-Source: AGHT+IGSObf0l0L2zRr/AQv9YOpjrm5YjJDqPglWmuOwaiRYlRdW4JCSS3SNNzuVyfXhGmKq+JKeQw== X-Received: by 2002:a17:906:240c:b0:a6f:f7c:5c7a with SMTP id a640c23a62f3a-a6f48009fcamr129872066b.67.1718208970622; Wed, 12 Jun 2024 09:16:10 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.16.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:16:10 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:31 +0200 Subject: [PATCH 18/23] ASoC: codecs: wcd938x: Drop unused RX/TX direction enum MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-18-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=605; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=L7ZFNWdOudYPqFvlRankjfRpsFdGgmRFWod0+Jmn7g8=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmnp8+JwFr9BLyBT5edp/Eaw49lg2Z4J6xVC SGfKz+ZVdeJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJpwAKCRDBN2bmhouD 1y43EACagGw23sHs3N4XyJvnbu2pem/kbPuMolndb3vObHn7C2gJcB4lJImAorSaETGl3R8moji 7+UiE0M4ksdkq9A6rQOPAYl3EXd4X3QoN1IJruNg8/bLaxaNP0+MvN1oCP58DKeGgw2Iy46N/AU aJEAOJoyAEjkdq/d2uFGrZmljKF//Z6N7c5v5repECj1F12Ej4E9kMxnDxgsDBSU4Ki4VnoTbrk wefVaVxFyBh92uM63FpE8uMuTFj4I26k5vqXxbeOhgzmbMKdOssG5InJcPZRnHqnTBluKdngsbN ncIWO2+P9sUSwYYYF8nGUvuFcG87Frn1UQbE7K7QB9z6QMen/NACugh2jZBio9u2/3pi140/vVN EXu6ws+X/qu6Co+jvhGnb8Mr0ZOcNJWjYEEcJNlbjfM3RbG8qmUEBoBaYyUbkpbmBoNGiI4aPzz u0da8W/jNrSFqTWp4aBSrzbiGT8AtfA+ztYjbGkppEWPBTceb1IkJ7+HrLDpohpmJH89QG7Pexl bcs35XIj0wQ67ax4HA98ZiZOmVJKMzTljElnOsjwfLsfX+m5App7UGILUFCInTv9Tn7624Lvohm RVtqGqO1rZbLbeYEW/U85SRC4VtTqvLJ5cH/CHJY/0UZmWYYa1rX3na7FmuZlbKTQJzAXCpiZ6m y9x+UOuk1gsdjSA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: DU3TKSAJ735RTRWB3BXUBT7QTAU5DUKS X-Message-ID-Hash: DU3TKSAJ735RTRWB3BXUBT7QTAU5DUKS X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: The enum with RX/TX soundwire direction is not used. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd938x.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/soc/codecs/wcd938x.h b/sound/soc/codecs/wcd938x.h index 09e39a19fbe4..45b7de242209 100644 --- a/sound/soc/codecs/wcd938x.h +++ b/sound/soc/codecs/wcd938x.h @@ -642,10 +642,6 @@ enum wcd938x_rx_sdw_channels { WCD938X_DSD_R, WCD938X_DSD_L, }; -enum { - WCD938X_SDW_DIR_RX, - WCD938X_SDW_DIR_TX, -}; struct wcd938x_priv; struct wcd938x_sdw_priv { From patchwork Wed Jun 12 16:15:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 803490 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 4D12EC27C77 for ; Wed, 12 Jun 2024 16:22:24 +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 C1995F51; Wed, 12 Jun 2024 18:22:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C1995F51 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209342; bh=qUt++NHBE72DcCvYJJXtBbloAck2ow8GLupnZk4I2eU=; 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=h1Vwrt9nUqOmIMTPgbk+kbgfUhTEoBjhJPBYGHzABEek1c0Ma6+SuPVVAl1Sjm72P FHLwZbzXfuck3y5pJNUdf0QZoNsRo5FrTe5cm10ZeVmo84thHEBzPUiXlcafuYZHrM Np5pfIF3q6vrR9VlUVF9mNRrki8OSNvWIb2UQi5g= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 66D29F89760; Wed, 12 Jun 2024 18:16:42 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 585E7F8974C; Wed, 12 Jun 2024 18:16:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9FA91F808AF; Wed, 12 Jun 2024 18:16:26 +0200 (CEST) Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 11E23F806F8 for ; Wed, 12 Jun 2024 18:16:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 11E23F806F8 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=kwCEzBZB Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a6f1dc06298so9196966b.1 for ; Wed, 12 Jun 2024 09:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208972; x=1718813772; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=pxtE1VEMG2w+3gwFE4no+YHVTTaRE3n7buFfP0YuBoE=; b=kwCEzBZBQqo2T6XwGXWJPucfhClQOQfN+DfXt6AHc2TerKFO+Sgh63kXPOPP/u5MFR pbUiiXdByEV9A9AYHu05yMBILgDxpEWTMm0SvKLkRpWTCNH+WfsENref/fX1CBwFKqVA 6/jBzBCXAHHXkFGSAlHbK4mRqbd189bRuqCcklj58CTicSKQvAZtmi87qXsKO6j06chr Sue+FqmWiP1qwEEW3lRcQ/Yr0mfczg0ofk5oxyv3kDZjziuULY2znMuB82edYY+57Pn+ tZ53nn39jpBjLxERa/3f7BAcwSN2Mp7XYv4ziEgJ7q2NTLShp8k4JKahMhrgVO1b1TBo +W+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208972; x=1718813772; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pxtE1VEMG2w+3gwFE4no+YHVTTaRE3n7buFfP0YuBoE=; b=PJlp/ETYYFNXG9U8RPIrnirygXinIAeTOWtawZFeQNiYqvW76SRX6w7kCobbwf+Kuu Obj9AenmHe3XgwpycwiWOjgbSjzBbsUZiIgbPsRmad5k8xM5PO8w9CyzPSY7pSkqmU44 3buEqj0QyeQwf50zMCTn3MIVm5hyHq4vT+oAsDLgF0+aQ4Gbo2Wo3nT/XMW6nbKdli2m JYay42ZwVZmuJZsFkSKBr6fKlkvgzDuLlK+yieV5OIC8iCLXlsyBrGzG4enJ+5jA99Ku EO+zV7mmizMHHYjvBLlm95KKYdS3t/I5TW+q0Wik3Comn/OqZtVWVL/CNHK8UJSAzU1B /epQ== X-Gm-Message-State: AOJu0YwAafSsFPW+8PFdJU11h79SnUqQGTZ5ZEJIusdlyYvpIL8oWgvs ANeoaFjuSqDCSEr5ELkvbry1vgL7WtNjdF+XNErWlfrurmyPQTSzJeEmlan0VyU= X-Google-Smtp-Source: AGHT+IHPp7Vgza1ymphlJXdfflDu+EZC1XP7FBl9D444bj/tSph5Z6WqGCCucohWZtPiSDGFrcpvAQ== X-Received: by 2002:a17:906:f24a:b0:a6e:c5b0:b64b with SMTP id a640c23a62f3a-a6f47c7d974mr131303566b.16.1718208972037; Wed, 12 Jun 2024 09:16:12 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:16:11 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:32 +0200 Subject: [PATCH 19/23] ASoC: codecs: wcd938x: Drop unused num_ports field MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-19-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=668; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=qUt++NHBE72DcCvYJJXtBbloAck2ow8GLupnZk4I2eU=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmn6iGzlR3wL8gkCnXRUqlYysc877RLjpSI1 WJr7805huaJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJpwAKCRDBN2bmhouD 12P2EACZ/GwZF4x9vKr3nIxVzGw0Kj1fWm+rYpeuqN5GEOc2OWr+O4Xoh3v0+Zdl/w+uPBluipg aSGtiKgkXXGT+h6LdZfszQY4wmKTntlq14PzkxkXEVIA/dWaLj7dpO4Y1BnxERWXt3oN6PmgQZ3 quqeh6e51u9NVrHve97PNUJzLCK3pCsvBLHeGplucWOBYHm1AqhuOn6WnD/wUaEWqysEGof2bVE eNRvX2L2UbVD5y37u1NIPl7mhLb2EhTSX+ID0VcfOVvQRuEjMJZJ/b6mLPoiaFRL2rbTBCc59fv TpkKmnhPYIG2/PesiwaYrpEKZj8+iy6mGOAYlB97Wh/zwvP+OJ+/R+OQp+XJBVKLSf3ABLuCeP7 fv6utEQcFUXsQfWZA3krAhQROHtiryxKM7mve6xha4y30tTVWqwsTLObbmZkb3DFYiXxbDWHK+E 98HmpDY4ReYG+NWbkffNEopD331uFBmpVzWiHMRxBeQ4JUZ2Z5cV0DkPkdHPCXHw39pDBiYFMID 4mwRUl3LgbaOVmoaVYVtwCZtkqQRzKCTfJmZD8Wu0ixe8ZDcDMNc5CRCVr50DhSXIoS07XNTfqJ ZMZLaqekXsKc6s9NK/eo1dvoA8pBUPrNqik02lZWbjXAK4um0Z+gJrAvj8L8VxkMWd2/nR3Au2A p3Ol0XLuf/qQ1UA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: FJX3IKI25TDNNM42WZ7COO4PPPTYIUB6 X-Message-ID-Hash: FJX3IKI25TDNNM42WZ7COO4PPPTYIUB6 X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: The driver does not use few 'num_ports' in 'struct wcd938x_sdw_priv'. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd938x.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/wcd938x.h b/sound/soc/codecs/wcd938x.h index 45b7de242209..b2ad98026ae2 100644 --- a/sound/soc/codecs/wcd938x.h +++ b/sound/soc/codecs/wcd938x.h @@ -652,7 +652,6 @@ struct wcd938x_sdw_priv { const struct wcd938x_sdw_ch_info *ch_info; bool port_enable[WCD938X_MAX_SWR_CH_IDS]; int active_ports; - int num_ports; bool is_tx; struct wcd938x_priv *wcd938x; struct irq_domain *slave_irq; From patchwork Wed Jun 12 16:15:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 803492 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 9634EC27C77 for ; Wed, 12 Jun 2024 16:21:22 +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 95B80DE5; Wed, 12 Jun 2024 18:21:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 95B80DE5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209280; bh=BqagLWlqycAbhTFnkhaAyAXMO9chHZNsBtioPnuGa2g=; 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=K3AtFZ4Mw4CdVwUtvlmoMwx4Sy0p1NtY1ThTt5eESQ5kyfbSy6gzeiQYdq0aUGLvm A6XZ4eDSfyomQKBzYLeRrnKhOpmbKKwEsEsEoCEcdcwhaJ4qtBrty7Rwy8J6Dv0OyA kZlmDV+keuG8XHTjhhuzyMhnP+p8uABCtCoJZEA0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 24096F896EA; Wed, 12 Jun 2024 18:16:35 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 65D39F896DD; Wed, 12 Jun 2024 18:16:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 16AD8F807DC; Wed, 12 Jun 2024 18:16:21 +0200 (CEST) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 C429FF8071F for ; Wed, 12 Jun 2024 18:16:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C429FF8071F Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=bLHnW8GL Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a6f1dc06298so9202666b.1 for ; Wed, 12 Jun 2024 09:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208973; x=1718813773; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=umunyDYCcpIfLhzHvmQwuR6ONiqX1k9YBrp8qSeACL4=; b=bLHnW8GLMwAsoiws0g1C0S9Jv1Eg0FxuHndEWuXp+P6tC1AZCcbTE6lRNYcUnpN6Yr Qfl+baX19aFmHtMENUtZESIo+lkc09NSDq8nCKSS4KxH5JGvEkxUbVTk3Y7guvPAsYa9 R5i2XdVk+TRWsHqREr46G7/SlJ/6R0/+Bri1lJyRLT04akdgDWRPlApmJgRlYyfRBihX VpQfPq+/bemYyH1gclbCZMdhyv6o00aqd78IbFIo7IsUSHvoCBUmehmMhxBgwdmzrcWS kqo196YJ92xiMwZsJpcNzFgTy6cd3J2lZPhujCt+dYkYFUvFwMX8cIMyt0/H+GH27xy7 AElQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208973; x=1718813773; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=umunyDYCcpIfLhzHvmQwuR6ONiqX1k9YBrp8qSeACL4=; b=lCv0gqjJjK/puoJFgyG+ILGMtLFLvgSR4w3n2tFY4CXQfzOMHU5A0jO607PApNMTx/ /EgukO7UoIzictPyQWsVCYIrBgNTTooQbrwh15kz/dvOBJUTsbGIGNogOg5dbXfRrWZQ jjw1q4yiX33AIgnJraIptDfG1EL0O2Rf52n1/ima6jpDG4WTi4uD2LiI3LLwuMIYlcBY 5x2pEqEGJB4xwR2zHxjzbz1Xqlv4lLMkhFDEAhgAMsFNsSfY7hhgZk0P8NgPwAppFGFG GdCIeLVa9f5nTmCfWKGUWBHdMKcCVU4aZHCRIYZS5fN0cEh752p4pihoxvNz62AJKM6W a42w== X-Gm-Message-State: AOJu0Yz1QfdSTMdsmrR7NZQWlpVvqPViZhMw6/O/r4y2PonRcjOwkoqB vNOvva9gt1e6WgTn2ICmWf5ZviqIclNuSxa2dA4Vxl10yjRm5w1SkDoI23S4jI8= X-Google-Smtp-Source: AGHT+IH0GoHifL6jgy5PyEjM8Pi/KiyQ6aZDtaFe9VNNR65uXeOBOYMv+ObkalJZW+YbesSK3YYEAw== X-Received: by 2002:a17:907:7248:b0:a6e:f997:7d91 with SMTP id a640c23a62f3a-a6f47cc0a2amr171236166b.38.1718208973333; Wed, 12 Jun 2024 09:16:13 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:16:12 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:33 +0200 Subject: [PATCH 20/23] ASoC: codecs: wcd939x: Constify static data MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-20-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1698; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=BqagLWlqycAbhTFnkhaAyAXMO9chHZNsBtioPnuGa2g=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmouQc/YqbV6MVhWmi+gk/pR5ijNN2hgvhgM dfchoPH4x+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJqAAKCRDBN2bmhouD 14J8D/4zatHrqm6oR4UtKKGG9K+NcNpYMFRJHkjHL60E/Kh9xLd8cK81n2EJmH/BliM4jnGx0NX pjaQ5YkAyW7xcBOgr9WqTajad/7lf+5XbhA+i/3Ql/DmhTkIWWF/83zjMrPJPL7qAzgNEAxqFur f1gvfWMzEByI651UXn0kcGXs2TKU70U0e1+NKlIx17EmGsTJNsPl6RdrBpbcoiPD1b7EsxyV6Pk 1bceyltMIHOFEeHChT9Ps1OqOhEl6zNHIuWv4NVgOBnSrxF4Me95EwSXKsyXlYTWGZGhH+hHeeC rZyfj0SyX9xUUU9jVKyV2eQJMNoCEOaQjc0d5nYiplkIIfxia7VAE5wG7wwAhGEPW3RPg3jtBE7 robLipydkTxV3DDWf0RqucD13vO3rJz+A4PmGt9dcSKTsEDzm7mqBzl7M81dNQ8iqbpDdvo6p9e pAW5neRHNUjddj9bF/ns2ZwjbQJ6BXRMxTtNCVT0ACyh9bDnyYdxSzlaYfdOTw4NwmZDgk0fylW oac9ZhZkz+dgAUq+4m0A6GHR4/ZyCrA6F4WKUlmspmbazH+vW+P5EgQZ48cS7CZkOvF0pq9c9Sq S4jvDRRJPLRZEWnLdJH/zQD8WlCuBdESd/LqUwpdSF0YIqGqrSq45w072hZZCJjPUSbILiGYmnc Xs4jHbcM/06U0uA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: O2MNVE25VLSGCZNXRENOMWWAACGMTV5F X-Message-ID-Hash: O2MNVE25VLSGCZNXRENOMWWAACGMTV5F X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: Driver does not modify few static data (MBHC reg fields, IRQ chip), so make them const for code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd939x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wcd939x.c b/sound/soc/codecs/wcd939x.c index 72d8a6a35052..1f94f49f9829 100644 --- a/sound/soc/codecs/wcd939x.c +++ b/sound/soc/codecs/wcd939x.c @@ -220,7 +220,7 @@ static const SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(ear_pa_gain, 600, -1800); static const DECLARE_TLV_DB_SCALE(line_gain, 0, 7, 1); static const DECLARE_TLV_DB_SCALE(analog_gain, 0, 25, 1); -static struct wcd_mbhc_field wcd_mbhc_fields[WCD_MBHC_REG_FUNC_MAX] = { +static const struct wcd_mbhc_field wcd_mbhc_fields[WCD_MBHC_REG_FUNC_MAX] = { WCD_MBHC_FIELD(WCD_MBHC_L_DET_EN, WCD939X_ANA_MBHC_MECH, 0x80), WCD_MBHC_FIELD(WCD_MBHC_GND_DET_EN, WCD939X_ANA_MBHC_MECH, 0x40), WCD_MBHC_FIELD(WCD_MBHC_MECH_DETECTION_TYPE, WCD939X_ANA_MBHC_MECH, 0x20), @@ -291,7 +291,7 @@ static const struct regmap_irq wcd939x_irqs[WCD939X_NUM_IRQS] = { REGMAP_IRQ_REG(WCD939X_IRQ_HPHR_SURGE_DET_INT, 2, 0x08), }; -static struct regmap_irq_chip wcd939x_regmap_irq_chip = { +static const struct regmap_irq_chip wcd939x_regmap_irq_chip = { .name = "wcd939x", .irqs = wcd939x_irqs, .num_irqs = ARRAY_SIZE(wcd939x_irqs), @@ -2957,7 +2957,7 @@ static irqreturn_t wcd939x_wd_handle_irq(int irq, void *data) * \- regmap_irq_thread() * \- handle_nested_irq(i) */ -static struct irq_chip wcd_irq_chip = { +static const struct irq_chip wcd_irq_chip = { .name = "WCD939x", }; From patchwork Wed Jun 12 16:15:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804191 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 2C868C27C77 for ; Wed, 12 Jun 2024 16:22:44 +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 8B636E9A; Wed, 12 Jun 2024 18:22:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8B636E9A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209362; bh=AqGJEeLHu58vzcaPVEiybipjhiSIkfgmXeCqrJqGrnA=; 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=a3j5Q3aPCxo8vn1TQjigwgLwmuFdJJI6qGChGBy+SG8FZZwBT89yPnbsxQ8aZaGRr wMUfbd4lsk12tV+wH2ZFNuyDpIuZ6m0sW8lGrClP+8QVQmskzT1GakyLHQYOe69O9l IihtUMaLdUvxqIOgO3WRpekrkPJmam03BywMJgmI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D1BAEF89776; Wed, 12 Jun 2024 18:16:43 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 16403F89776; Wed, 12 Jun 2024 18:16:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 98DDFF805D4; Wed, 12 Jun 2024 18:16:27 +0200 (CEST) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 48485F805BB for ; Wed, 12 Jun 2024 18:16:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 48485F805BB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=jSbv9QkB Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a6f13dddf7eso9872966b.0 for ; Wed, 12 Jun 2024 09:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208975; x=1718813775; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=XPjxtHHdxxnis6XGqFgLr48z/PZZvjJ4q9YoUmBEYG0=; b=jSbv9QkBOB+gruLeHw02p4b4AdPA5NhTlrQju08golAZmMCjYUaGW7ywQ1rCmOkhrT wtHRf4noVkxtVzeiSuSirLmQEkOYS1rvqLkrCmYYc9H51r8aQptBB19nMF5FOVFyvJji +4sr6q2fBry8glYrs+q1HjRK9fQdKXIsvnbrt5ADjDbi+wCaPqrMo+mO5G1/15+QhnFd 7MSdYEdKepzRFNPtdb2juP5RndBAxx8YHcxncBTE3M0LqMizuW+rqpaIWJ5jYN1RZ0gF +SRn3dMh41nCtRyl80Gre5PBEdRUaOzV3w21fSldlV4tTpHfHDggGAX6lftSJS7hBmS4 HsCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208975; x=1718813775; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XPjxtHHdxxnis6XGqFgLr48z/PZZvjJ4q9YoUmBEYG0=; b=luyDFzeb21AxNoJjCWb5eF1QjU/tOIPUIKaIgWi5Lz16fYJmQIBkxCkH5+UdysvSyi v88l168+b71cLgVJAJ5eprj9egjAvg3CSt9cG6DT1E0R9Bq8jpMIgAElmYfHVPhy+/+Q h76bwVvBtDdsTShVizzOCeLNMvChIqTh90BzHHKzEKpgdqPeQac/ETjpiuZn0dUh9Uh5 y5bREWb73YCsc/1TpsXcJEFDiINskOl9/5SQZ0MsZE17HUpix460yabeWJz6nW0L8QcV b9XxNIyN5BCavoivY9c1c0yTfgQPjrZMDGgiSdEF4BFaooCbTQqLs3Of2H4xbhDDhTkv Xh7g== X-Gm-Message-State: AOJu0YxEcEn13+Rplje5S6cRI5v+CzYTvJnvIPes6dj4kCW3ZGP1AYU/ 3eb3z5u9ITI1AhHPUSkq3yUc7mFnCQQeUI3kUcr7nqUN1AWYd3intNegP48s93U= X-Google-Smtp-Source: AGHT+IE9yWBR/V1EKyUJEqTgvztyKXOF8S1AWCeYdztPcdcZitZUuETPOkxcpZ9R31ob9kdpEriv5w== X-Received: by 2002:a17:906:48c7:b0:a6f:4b5b:4ba7 with SMTP id a640c23a62f3a-a6f4b5b4c43mr123244466b.67.1718208975296; Wed, 12 Jun 2024 09:16:15 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:16:14 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:34 +0200 Subject: [PATCH 21/23] ASoC: codecs: wcd939x: Constify wcd939x_sdw_ch_info MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-21-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2471; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=AqGJEeLHu58vzcaPVEiybipjhiSIkfgmXeCqrJqGrnA=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmpxeuRkJc7UskyAuH3KS6z1/56YQ47Nrud3 89R9FiDZdiJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJqQAKCRDBN2bmhouD 1x9cD/43TrxRdQE1DLNeZsA2ZfnfnJ1pH9+KHD03KLq4jRMaNGc0vOD6gAW8YiXcfQpY5mnxwij gPatOixM/87wwVVpUFEl1mR6zyYy9gLekbU3XcgEcEFBzWfvZaG54dMfhIs1RZQD9CJaU1OeefJ MKzFWzjeeRToXCmy8z4uBl7VwPZnXc/HmdwUIQ7hizF/nconAkhnEsDRE5KQkv1EHnJ/J5ycXCm fkyVv4tTZt3GSxG9HzSSMjUPVtHFiVN7R9O3nN5SRe7VLlJfnn9qT3C7s1a2RAfWFWPpD8Im0vy slzrMvYV9fmZtjsKBTAvU+SkWOQaqL6mQ5kBZA7+ZalF/K+XWaNtNO0VQJrGPDDjr+qM5NW4aRh XFlYpJC89EFLVdpg+cquAYm/NF9tf/nfopHSgLxye0KILe0Su3ocAVO7t50OQWKhCcaPZB5vZ2Z ujcsM136t3E5JG1QbBwDr7f6hwfOe0mBLgHhwxFM2Jm8M7dyqPVwkI9Or52zkfWE7o/6lxmdfaY VA/v/HjLqDWm/GdJpRXGJyWbEpee6+qEytMnCzxEKZEPwplo8cFED3M77+uT2uQgi0lJf8Ww3tC f+7V03XArBf47xBwzv4g00GjANSYmhUFPpjNYbyjvTMnNzdJBR3fmqBKmDjLKnr2yiI9ur5ZRXx hNciNnxUGFGKUdQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: UKNXUMACI6RBFOYAZ5Q2PQRO2M6BOLBS X-Message-ID-Hash: UKNXUMACI6RBFOYAZ5Q2PQRO2M6BOLBS X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: Driver does not modify static wcd939x_sdw_ch_info array, so it can be made const for code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd939x-sdw.c | 4 ++-- sound/soc/codecs/wcd939x.c | 2 +- sound/soc/codecs/wcd939x.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wcd939x-sdw.c b/sound/soc/codecs/wcd939x-sdw.c index 8acb5651c5bc..94b1e99a3ca0 100644 --- a/sound/soc/codecs/wcd939x-sdw.c +++ b/sound/soc/codecs/wcd939x-sdw.c @@ -23,7 +23,7 @@ #define SWRS_SCP_HOST_CLK_DIV2_CTL_BANK(m) (0xE0 + 0x10 * (m)) -static struct wcd939x_sdw_ch_info wcd939x_sdw_rx_ch_info[] = { +static const struct wcd939x_sdw_ch_info wcd939x_sdw_rx_ch_info[] = { WCD_SDW_CH(WCD939X_HPH_L, WCD939X_HPH_PORT, BIT(0)), WCD_SDW_CH(WCD939X_HPH_R, WCD939X_HPH_PORT, BIT(1)), WCD_SDW_CH(WCD939X_CLSH, WCD939X_CLSH_PORT, BIT(0)), @@ -36,7 +36,7 @@ static struct wcd939x_sdw_ch_info wcd939x_sdw_rx_ch_info[] = { WCD_SDW_CH(WCD939X_HIFI_PCM_R, WCD939X_HIFI_PCM_PORT, BIT(1)), }; -static struct wcd939x_sdw_ch_info wcd939x_sdw_tx_ch_info[] = { +static const struct wcd939x_sdw_ch_info wcd939x_sdw_tx_ch_info[] = { WCD_SDW_CH(WCD939X_ADC1, WCD939X_ADC_1_4_PORT, BIT(0)), WCD_SDW_CH(WCD939X_ADC2, WCD939X_ADC_1_4_PORT, BIT(1)), WCD_SDW_CH(WCD939X_ADC3, WCD939X_ADC_1_4_PORT, BIT(2)), diff --git a/sound/soc/codecs/wcd939x.c b/sound/soc/codecs/wcd939x.c index 1f94f49f9829..66af035bd0e5 100644 --- a/sound/soc/codecs/wcd939x.c +++ b/sound/soc/codecs/wcd939x.c @@ -414,7 +414,7 @@ static int wcd939x_io_init(struct snd_soc_component *component) return 0; } -static int wcd939x_sdw_connect_port(struct wcd939x_sdw_ch_info *ch_info, +static int wcd939x_sdw_connect_port(const struct wcd939x_sdw_ch_info *ch_info, struct sdw_port_config *port_config, u8 enable) { diff --git a/sound/soc/codecs/wcd939x.h b/sound/soc/codecs/wcd939x.h index 756f497a337c..a6c9c6cee056 100644 --- a/sound/soc/codecs/wcd939x.h +++ b/sound/soc/codecs/wcd939x.h @@ -914,7 +914,7 @@ struct wcd939x_sdw_priv { struct sdw_stream_config sconfig; struct sdw_stream_runtime *sruntime; struct sdw_port_config port_config[WCD939X_MAX_SWR_PORTS]; - struct wcd939x_sdw_ch_info *ch_info; + const struct wcd939x_sdw_ch_info *ch_info; bool port_enable[WCD939X_MAX_SWR_CH_IDS]; int active_ports; int num_ports; From patchwork Wed Jun 12 16:15:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 803491 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 4DA70C27C77 for ; Wed, 12 Jun 2024 16:21:55 +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 84D6DEB6; Wed, 12 Jun 2024 18:21:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 84D6DEB6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209313; bh=kdpxzyNuweZKr0aRSDH2rz6ZRs35AU6E2D86EkplPOk=; 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=L2HaX2aCtarLy9bD9v2GEvAudaEgih5oWwTO5CZxl6cdueJskHvRQD/YpF69+p0jb r5zg8aCyoR7bh1Ogof2DvoQ4KZxoSzsMgkDJ53XcWU+AluljqutEj765asUE8YfM5f ZDAlnzM9DLUlfYhqj9ooptmeKeIvLiiyrXmFtuMI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 50C9FF805E0; Wed, 12 Jun 2024 18:16:38 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D620BF89712; Wed, 12 Jun 2024 18:16:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E8B32F8085B; Wed, 12 Jun 2024 18:16:23 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 C9441F8075A for ; Wed, 12 Jun 2024 18:16:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C9441F8075A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=NGbCljC7 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a6f0c3d0792so5777566b.3 for ; Wed, 12 Jun 2024 09:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208977; x=1718813777; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=HZaOcybsRppKpT5g6NO45LPBfW4VWvjoUX43728185g=; b=NGbCljC7qgMGPP3jEl/cTk2824xx+WEHCRyvSoNsmD4qIldgoMl0NMNHbb1NoLXcr/ 5Kar0krw/ZxBsg+b7c3Pq9kRwcrgtES/uS1uaxBvhjQyH9BIK9YW5LnOhLQhRil8qutZ +4eALfeSjv43CCxMV6FlwRU47B+xI2IT02mScoanwjIZ/8lLO6J2/oiTEvPx0dyGVONS SaGv4g1DaWvP4fWr8kIQ+tjh9rxfEmu9k4VcbWX4jRSNb6SbeTbP4RZ41shUYpDSIisI tYqfbiV2funAhchj8nEDcH8OaYtYRoxxQumcC2ciYlrAdWSfWClSsmOXLXxTEkyoaqrw kbTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208977; x=1718813777; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HZaOcybsRppKpT5g6NO45LPBfW4VWvjoUX43728185g=; b=B/rCBv/kbZHHfBFtlgaxveMrYjMmYVAr07k4swN3diHS27m0MDqJBUimyhzYAnKZHz 02C/Y/AHSXimuDvokOpgUAWu8B/FKBf3rVXrEenSbTv2/ErkXpVlPZhl7iKWH2LOHSzj UjRMMgK4LBN/44uzpY4sNHhbG9efcET/OANxE5wAjJIGIez7HulEN8MUcyFXigkjGMFm W/s9T+QBhZmDAroQp3dd+lHc821pWk7wbHxsYixKQjM/ILxCjwTQGD+BgEe6APUwQ3jS Nyp8WkuClevuEsarpVPZnmjEwMKpUX5aOe4fFYQi1OxCIF4sHy8Rm+vG8Z9JeveYpKtm FKuA== X-Gm-Message-State: AOJu0YwAIzvnzgnfhK6l8hScQ178IyQMw8EKHF1bubGyXENOyxMtI63W eoTPSG2TQp56r01EyhrmU7BOpwvGYI97tdjo8r9lIdiBr/TGVA5+6/SbJPkB/h4= X-Google-Smtp-Source: AGHT+IGBStgBwHDaeCOJIdElnx3jY9hewrQLo1+/oRczrEHocXLAooxE3WopQIuwsEkaMPbx5CZtUw== X-Received: by 2002:a17:906:1ccf:b0:a6e:d339:c095 with SMTP id a640c23a62f3a-a6f47d56e10mr143448266b.47.1718208976945; Wed, 12 Jun 2024 09:16:16 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.16.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:16:16 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:35 +0200 Subject: [PATCH 22/23] ASoC: codecs: wcd939x: Drop unused RX/TX direction enum MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-22-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=623; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=kdpxzyNuweZKr0aRSDH2rz6ZRs35AU6E2D86EkplPOk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmqTiI7/MPDpOR/QPOCYLLqnTtbJ9lWR7mV2 wJ7BGfzhXeJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJqgAKCRDBN2bmhouD 13e4D/0ZkltMoAyKX0mzksxtBOvUUWkNcgLlpCvNqdmlMIhR/r8kKBSwdJQOS7fvCxRSbJXVPjC m/7fMpyDfcF5VUMWPlZzObRfzr8W/odYj0k1t0TmXbAEUE5AG+/XqjQfv5VSJnlz9AlEFemViYR THjQKv2vWpVBVtWPfcQktJBaM56Tg+uN4uix+o4fccx2ZgmtV2fTn83UkubIbS7zRqQLIw0n21b qg77mcw7AdaW2uhqZjeo/NdlzsdyQxAR4gGfSmGIhq+OwP6xSd1CGDCknjPwVuWjK9XBso3qpdr NaTolQ9xCwPFpHERkFINSC+klwCJwlz25ESPB5SWzAFXC+W6ZvM3RNYjA5Tu1ZbhHXYDT0M/Qfs OhbPOuGRRUljpD1Z5pfwRR6kJhl/Toaj+UTz/VD4uGwnvUeFbnCgL3ftsmdOqJjG3hLwKoGJmSM RtRQCqxWIv/WvcOyG9c3qD2HnBsg6JYn/zIM539PqLbXzq2sui7zNaPY8NnzYwBZVdBAqCY6ity ceczjgqxXDBIbm7Cd+DUHClBXhgurZiEeRRHTzzlh3Gvk4/Rc9X3wD7MtBrk5/bsBNo+9ue5zfS NHK5FKcXGJlddS0XtxjxoSaXHaAbQwSHpGCsFyQnas6U36X3Wv0C2vARmWWXlEQEYT1q5DGBTgv KRWlakkVEDkoy2w== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: BUMHUU7PHOV5HKNYYF4GRAPKKY7UQEBK X-Message-ID-Hash: BUMHUU7PHOV5HKNYYF4GRAPKKY7UQEBK X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: The enum with RX/TX soundwire direction is not used. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd939x.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sound/soc/codecs/wcd939x.h b/sound/soc/codecs/wcd939x.h index a6c9c6cee056..0aa4d9d542c6 100644 --- a/sound/soc/codecs/wcd939x.h +++ b/sound/soc/codecs/wcd939x.h @@ -903,11 +903,6 @@ enum wcd939x_rx_sdw_channels { WCD939X_HIFI_PCM_R, }; -enum { - WCD939X_SDW_DIR_RX, - WCD939X_SDW_DIR_TX, -}; - struct wcd939x_priv; struct wcd939x_sdw_priv { struct sdw_slave *sdev; From patchwork Wed Jun 12 16:15:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 804192 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 C2B4BC27C77 for ; Wed, 12 Jun 2024 16:22:18 +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 1C16114DE; Wed, 12 Jun 2024 18:22:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1C16114DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718209337; bh=6+UBEqHPuSCJQ5GPuzFYqeY5be1EJ+f74Fpf7byXhqo=; 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=XT+kLWC7v4E8NK4lxDS4DYfgsZKkQVG6ClC584UMPVbqgM3YvLZMSTeXNWh/2kM1c 0sBWiTN7Z+2/jt36U/zKff45xx9IX1PxXWFQgOuYXYDi1Z4ZU60HTC5rlSuq5lndGU WjehUONK7mLpYtY7liac5+fgVsL7b6dGW/a9/1CA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D03A9F89741; Wed, 12 Jun 2024 18:16:41 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 32BEAF8972F; Wed, 12 Jun 2024 18:16:41 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5CF8DF808C5; Wed, 12 Jun 2024 18:16:25 +0200 (CEST) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 B143AF80794 for ; Wed, 12 Jun 2024 18:16:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B143AF80794 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=p9qhmz9T Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52c82101407so103693e87.3 for ; Wed, 12 Jun 2024 09:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718208978; x=1718813778; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=KUSq90CkA/e5YtyJB3DxxxJXJzc5nG1xr3zOSJv9S5o=; b=p9qhmz9TfzkgbK4FI28VFeDVOK2kYhPKQsUNb9xT0Esd7UFbyr57T8q+0qwOdeUNVM j07aktNuoSm+7Ov6qrOqFJPOkvCaHN930jCIJhK3uHPNHx3hp9uyslb01/mac0zOjSst GC5BFCwt8VOYn0FuwTS31wRXv19q465P1LQE2MEyyg28JbsV2hIWeE7J0ofkaJkPCE3M mUuddh8Z6Cc2s6wptfXUgNCUGVfBZN73n1iCeJTVpayM3/91Vmm1ilEqLS1VwuoH3FSU oyYLCknsBezH3sFZakFfdKfrJ+gbn5w7SS3B8yAaeKiI7Vv2S7ti8c9/crB9IBXGp/i/ abfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718208978; x=1718813778; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KUSq90CkA/e5YtyJB3DxxxJXJzc5nG1xr3zOSJv9S5o=; b=dUYONUUCZ+fvJoxxWbgcxtHqQw4f0DUWGUFwpkcYIQ+Txp5y5jaBTmnGEcSi72fV4K OqGLbAJ5TFcTNtCb87hBPXVtEIdlixOdxahQxUWKbYk1B2VeNUDYsNoxeywVp2+Ickj0 HXIVRhv6zPwxX1jyC8a6kW2uTz+o+xTdL8FGQ8Zw0XjcOS6q0j/cNbBUuc7yW5O+blek xYmko+R/NjdF1bWWSG4tvgfvBThGO9eMIGH1nmLLIDpT463uFKqNvdwYodxrr2ljUcot hvuHLMwrfDvmmAAXBTiA8CGrMFFtTPpGSROi5D0wcvBqg8Kbl/iRboFxeSDnP6Ou6yL8 +MPQ== X-Gm-Message-State: AOJu0YzPnyW2wcpZxvpD3uO9QeNedIgaGswvhReRPiuNVDX4HF747SKh 8sV+V69N8FJjB2TSRvzu+Yyvpe/Jc4Pt2IUxtUapn2qWK0OByj/+006vRKdEizI= X-Google-Smtp-Source: AGHT+IFwbnYghzXFTnC+RPeeiOFea6oxzdRq4GTl+xpaiMotJwnH3mE3DEOAsY+KEGhGtB0mf+6f5Q== X-Received: by 2002:a19:e00a:0:b0:52c:8811:42f7 with SMTP id 2adb3069b0e04-52c9a3d2020mr1828169e87.19.1718208978302; Wed, 12 Jun 2024 09:16:18 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6efd6cfb74sm624815866b.20.2024.06.12.09.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:16:17 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 12 Jun 2024 18:15:36 +0200 Subject: [PATCH 23/23] ASoC: codecs: wcd939x: Drop unused num_ports field MIME-Version: 1.0 Message-Id: <20240612-asoc-wcd9xxx-wide-cleanups-v1-23-0d15885b2a06@linaro.org> References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=668; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=6+UBEqHPuSCJQ5GPuzFYqeY5be1EJ+f74Fpf7byXhqo=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmacmr/WnHs89ZC/yEkUavUltM0vHYHU6KbqX4W wEotKpQ6ieJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmnJqwAKCRDBN2bmhouD 19KVEACbMMT3jPxwjV7Xo2ksLok+3WxWywwteg/LnIXFjkRxGoGONk15q24uYyDKKeTxUuPDpib XcwgtSHFW0e0q0mt2feP46Ce1INuVVah99aoK+HGWF79YJG/2UtzxzPCaTbewL7o4h+55j5TcuA vHM6nrwyyC+r7AJeOtKlOZy/tOy+YANRFZWu9UkXXRxx9pB2GtBYsTPaJ3HYwrGrjO+zJ9QITs4 ccPF7qmrb5f7Gp2yZ8NU35FLjbaS0/UOSeyXCrXNF181JruQZ+wed0snTOALbZbdQ6IDQ9JD6GO rX0VMP0JW37eGVz/wcJRUYHOQ8zKCXQ9tgfANZn4JvwUhbFay/vJGEFhRhOC1tBt+k86B5Pbjzl SAB3Azk97OvL+I9xA/jLtun1WoHWXbFeSrhYFaUx1StgW0CATkzIdD6cL23hxrvZKhDTOADiDCo edn/0N6j5mAktUp3v2PV/lSD+qgj36GvPC6/P4Tj0TAVE+33cMLYxBD/ZNXcRnlyZK3eLztTnKS yHmDTb/is8fY8DEdcpmxpSEI0TqbM0masGNvaS26HcB91dO1ND8Ghs+gn81PjrTvvskQz5Gumld ALpx3MIKDaAHcU2lRawkwvJ9Y4AeWo8YnyzrkYIykhcicLO1BA+PR+XLarpL0oGplP0tQAVtWt1 m/+jt/LnIuV+7Ig== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: SPAFC7AYXCE37LGLTEBXFFIUCXF3J7PB X-Message-ID-Hash: SPAFC7AYXCE37LGLTEBXFFIUCXF3J7PB X-MailFrom: krzysztof.kozlowski@linaro.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 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: The driver does not use few 'num_ports' in 'struct wcd939x_sdw_priv'. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd939x.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/wcd939x.h b/sound/soc/codecs/wcd939x.h index 0aa4d9d542c6..1571c2120cfc 100644 --- a/sound/soc/codecs/wcd939x.h +++ b/sound/soc/codecs/wcd939x.h @@ -912,7 +912,6 @@ struct wcd939x_sdw_priv { const struct wcd939x_sdw_ch_info *ch_info; bool port_enable[WCD939X_MAX_SWR_CH_IDS]; int active_ports; - int num_ports; bool is_tx; struct wcd939x_priv *wcd939x; struct irq_domain *slave_irq;