From patchwork Wed Mar 5 18:58:19 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: 14003248 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 17E27C19F32 for ; Wed, 5 Mar 2025 19:07:46 +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=Wavfi03VLFzkRgSXBDNQjxdQA6kIqOjOjbG1Py1RCSQ=; b=qIJLx/VNBJ60w63JUfJHtVxSXq ONzdI1aVy+y46Pz1XfKOnZ9sGeoGs7Ybr3P1m/8kL8+HM7Ad/RhATHPlqIfFJWeIXGpyqo/itOBxk MU/DByTD9T9N2HnPbHS5/cK+Cf7TqaBZkebC4jp1wm0IO/r/eNfGcJMhUq4AAHb2cSTv2iB5A+KJk IQraJ93ZCTL0xqTsyB6Fx1mtEicUsxGWD39ShYtnW3NJ4JWCY5+hV1AzidSIwHZKeCRUrvx0z+w6f vkZRPzJ3COMCl9nhsl/bUWyDRJsNkBiBnwga34b81WtDzKKRT5mcKSIo5uSfQrOgqYf1EO4Y2ggTf cP9ve14Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tpu5h-000000091hH-12f9; Wed, 05 Mar 2025 19:07:37 +0000 Received: from bali.collaboradmins.com ([2a01:4f8:201:9162::2]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tpty5-0000000909K-18SX; Wed, 05 Mar 2025 18:59:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1741201183; bh=lix1WOppoHxLTu8lRo8ZOELVqyyGO52750g+3jKAaYw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=CoIUP5VwwBV5tif8gKDEdiKkhVFH1jDrE32RoRJfxre0TjDsJszxrVSk1cZ0pRXsz N3Wo5lBzowIfdBlS1u6R4vbWrYSk91AnR2LleCyb+8iUYyNbutLTGeddtDub/sUI64 th5sNwCHjSO3JKbYOfI7PVZ7ZrIUNUIEF42ybhAH40OOpfBR+Gx1ZrnlxWmTnwIcao 8mBK8khE2pCneFE9+RM8ZITh6PFSAHOqpB/kb+ovT+AmSXG/xM8YQkgdYT3GSNP2ZU 47YVpWd2TcNKRW8J9KVYw+jomYilS+2HmJQh8VMHKn3iSMD08Q1BvVDyUJEMRU2zm9 2UzyuZnype0DA== Received: from [192.168.0.47] (unknown [IPv6:2804:14c:1a9:53ee::1004]) (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 80E8B17E0147; Wed, 5 Mar 2025 19:59:38 +0100 (CET) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Date: Wed, 05 Mar 2025 15:58:19 -0300 Subject: [PATCH v4 04/19] ASoC: mediatek: mt6359-accdet: Handle hp-eint-high property MIME-Version: 1.0 Message-Id: <20250305-mt6359-accdet-dts-v4-4-e5ffa5ee9991@collabora.com> References: <20250305-mt6359-accdet-dts-v4-0-e5ffa5ee9991@collabora.com> In-Reply-To: <20250305-mt6359-accdet-dts-v4-0-e5ffa5ee9991@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-20250305_105945_475257_7029F017 X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that the dt-binding was introduced, the property that governs the eint polarity is a boolean called mediatek,hp-eint-high, while the current code handles a u32 property called mediatek,eint-level-pol. Update the driver handling accordingly. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: NĂ­colas F. R. A. Prado --- sound/soc/codecs/mt6359-accdet.c | 5 +---- sound/soc/codecs/mt6359-accdet.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/mt6359-accdet.c b/sound/soc/codecs/mt6359-accdet.c index 9bbd4497e8d481ee125693be2fc576b439574b39..ca3be59d2d0ecaadccd9ba399649ba93f20490c4 100644 --- a/sound/soc/codecs/mt6359-accdet.c +++ b/sound/soc/codecs/mt6359-accdet.c @@ -578,10 +578,7 @@ static int mt6359_accdet_parse_dt(struct mt6359_accdet *priv) if (!ret) memcpy(priv->data->pwm_deb, pwm_deb, sizeof(pwm_deb)); - ret = of_property_read_u32(node, "mediatek,eint-level-pol", - &priv->data->eint_pol); - if (ret) - priv->data->eint_pol = 8; + 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) diff --git a/sound/soc/codecs/mt6359-accdet.h b/sound/soc/codecs/mt6359-accdet.h index c234f2f4276a12853a6fe0b13c4198dfc551b6b4..a54a328bdf3797ce642da446c0cc6792f72ec939 100644 --- a/sound/soc/codecs/mt6359-accdet.h +++ b/sound/soc/codecs/mt6359-accdet.h @@ -86,7 +86,7 @@ struct dts_data { unsigned int mic_vol; unsigned int mic_mode; unsigned int plugout_deb; - unsigned int eint_pol; + bool hp_eint_high; struct pwm_deb_settings *pwm_deb; struct three_key_threshold three_key; struct four_key_threshold four_key;