From patchwork Sun Mar 2 16:30:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13997947 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 77E91C19F32 for ; Sun, 2 Mar 2025 16:43:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=huMaPJwTTze9g+90E4xy9vQsvov6aFHtpMjC1jIcdiU=; b=Z7z1t6xndEssVUiKhl0yXDHRPq iQYKgjHygKgK8tpuZkpLIy2dfz9jz+UznmgH3WaEJMIHVBq+WKqClXrPca4lL5iNUmxoGAYtjzJlU +DsL6JxCdo7hykIdBcMoGMRR02XLUZAkQx2v17cfxB2Tx+8zlpOrpD6jNoNUsUq1YbNIqAvV/Yz9a lAeq0t5yoa9ehGjdoNWajqm8sNvqFNaZGg73NVX06EuPr/N6MylLe1A9L+pzx3RQibcseOSBPolrn /4fzbeoEOfyZOVX5cXBstMZqUK548lP3RTn+kdIzdBAqeETpmYZnqv7QirHuB3WOHRrK1/hVsMQZn SFsr+kpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tomPo-0000000GMX7-2xsh; Sun, 02 Mar 2025 16:43:44 +0000 Received: from bali.collaboradmins.com ([148.251.105.195]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tomE6-0000000GKPY-2Rul; Sun, 02 Mar 2025 16:31:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1740933097; bh=sdW1yXEUmXq8SNfh7ww/5Pnhe7bTSRPgObGL9j+2/Hc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZIy7+JTbM9fMzJprdw3y+a2zoyZdq7Aqo+e2qy06/lEZipYow/n4TWeLRJL650CaH lzpM1/wH7W41q2xg/fkVw7BbEJySP0iPf/qwgXxVI/WO5duy45VpD3+SmIcuUG8dIJ M0S+BNhHCl+xcNOGnlehdvFCc+gvtWU3oy6lab4DEKO60GB1CekZED7EmKrICMw+OQ wq7mzOgw3Y32CcA4qCSL++AQof7MjA5BlMi+XN4sSeE4o7XflSi2e4raCW4TlfBBlc VAPcpuNF5mQ2tHlbJpCL7ChSRt4Rb2nJKX4dgUDdHfxiKkjE9zEPicK/5d6HJq8OGA t+CPhCiDC26fQ== Received: from [192.168.0.47] (unknown [IPv6:2804:14c:1a9:53ee::1002]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by bali.collaboradmins.com (Postfix) with ESMTPSA id 3FEAB17E023F; Sun, 2 Mar 2025 17:31:32 +0100 (CET) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Date: Sun, 02 Mar 2025 13:30:46 -0300 Subject: [PATCH v2 07/20] ASoC: mediatek: mt6359-accdet: Drop dead code for EINT/GPIO IRQ handling MIME-Version: 1.0 Message-Id: <20250302-mt6359-accdet-dts-v2-7-5bd633ee0d47@collabora.com> References: <20250302-mt6359-accdet-dts-v2-0-5bd633ee0d47@collabora.com> In-Reply-To: <20250302-mt6359-accdet-dts-v2-0-5bd633ee0d47@collabora.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Sen Chu , Sean Wang , Macpaul Lin , Lee Jones , Jaroslav Kysela , Takashi Iwai , Catalin Marinas , Will Deacon Cc: kernel@collabora.com, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250302_083138_768014_739BF6DD X-CRM114-Status: GOOD ( 12.55 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The ACCDET supports two modes for IRQ generation: PMIC EINT or AP GPIO, which in principle could be configured through a DT property. However this DT property has no user nor is documented in a binding, and the driver only implements the PMIC EINT case, so drop the unused code intended to handle both cases. Signed-off-by: NĂ­colas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/codecs/mt6359-accdet.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/sound/soc/codecs/mt6359-accdet.c b/sound/soc/codecs/mt6359-accdet.c index 1d4481109f6e4f473610e0797c9d3c636bdf12cf..ce8a5e64e0b9ca508124043ca1f93aaa3cc5f9a0 100644 --- a/sound/soc/codecs/mt6359-accdet.c +++ b/sound/soc/codecs/mt6359-accdet.c @@ -31,9 +31,6 @@ #define REGISTER_VAL(x) ((x) - 1) /* mt6359 accdet capability */ -#define ACCDET_PMIC_EINT_IRQ BIT(0) -#define ACCDET_AP_GPIO_EINT BIT(1) - #define ACCDET_PMIC_EINT0 BIT(2) #define ACCDET_PMIC_EINT1 BIT(3) #define ACCDET_PMIC_BI_EINT BIT(4) @@ -448,8 +445,7 @@ static void mt6359_accdet_jd_work(struct work_struct *work) mt6359_accdet_recover_jd_setting(priv); } - if (priv->caps & ACCDET_PMIC_EINT_IRQ) - recover_eint_setting(priv); + recover_eint_setting(priv); mutex_unlock(&priv->res_lock); } @@ -580,14 +576,6 @@ static int mt6359_accdet_parse_dt(struct mt6359_accdet *priv) priv->data->hp_eint_high = of_property_read_bool(node, "mediatek,hp-eint-high"); - ret = of_property_read_u32(node, "mediatek,eint-use-ap", &tmp); - if (ret) - tmp = 0; - if (tmp == 0) - priv->caps |= ACCDET_PMIC_EINT_IRQ; - else if (tmp == 1) - priv->caps |= ACCDET_AP_GPIO_EINT; - ret = of_property_read_u32(node, "mediatek,eint-detect-mode", &priv->data->eint_detect_mode); if (ret) { @@ -902,10 +890,8 @@ static void mt6359_accdet_init(struct mt6359_accdet *priv) 0x3 << RG_ANALOGFDEN_SFT); } - if (priv->caps & ACCDET_PMIC_EINT_IRQ) { - config_eint_init_by_mode(priv); - config_digital_init_by_mode(priv); - } + config_eint_init_by_mode(priv); + config_digital_init_by_mode(priv); } int mt6359_accdet_enable_jack_detect(struct snd_soc_component *component,