From patchwork Sun Mar 2 16:30:39 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: 13997913 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 743E4C19F32 for ; Sun, 2 Mar 2025 16:32:39 +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: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Q1eN29b97k1+Y1Z+MsdbGac80xDmgxvlVfWV6e9TASo=; b=dgUOuya6LGQ7DC mDUA73r8OO+MzqV1D09JvQcVM5p6oW+zPgEEoAcA9N6OTf4buimJgbnsrfT5aI0y0Kyx+EFRD9jYX kxbOAH3/cwpU3obmm42pIL93uicfEKNfHvdTpiOqltHyDvOZ3moG3yispRBbFqjgST1zaVc4hiEXm eYNNqNG2YJ4A8N3X2KpiTYnj6wS8v5ArINsbg4OIGIjygooFq3HF0zupTnDRoLZb1w4yfFjFXtQ0f AD+tmgNE3UNHsxo8/Ur7XEfWYxiqV4rW4Sy1nEVQ0aGw4ebbCppxoNt6EifpElzd39Bdped7WttTL l6+YfWuOVOsbnGze2Wpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tomF4-0000000GKen-2VNS; Sun, 02 Mar 2025 16:32:38 +0000 Received: from bali.collaboradmins.com ([148.251.105.195]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tomDU-0000000GKHr-1jwm; Sun, 02 Mar 2025 16:31:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1740933057; bh=Te/+ghmA/RZrMtfC1LsnoUqBiFhdUI71MOZB0VoMZmw=; h=From:Subject:Date:To:Cc:From; b=HXgX21fRjHhEcq3b8BHzM6FFUGjiTu9fBYysFL0Z6qFQVu8vtMQTx/vtSR4ukAQ8C IK+HT77hYQTAlrY7wOvabnyxM2QKUZSbZtQBeyR3zXbprnRExQxu0yDbwoE+w0xArf +vkEbxYDTEIWk/LtPbW1RamznK1t9wsjSmcjg6+FP6vGiLTIq+gwJO6KqZ+4vR2uz2 lrycjkHQldzeSIJTmOTuSQBIF/3TlWr2RkB6DsaHExCh+FDH3/A8quZbmPi8DF848h fiDK6ir/eHRfFWy8kVaUI6dFI4ijrm7jWDCY7+21l6V0nMCl/fNHUnK+Yu7+0K+dWH pR7ad5GiRbLmg== 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 A2B4B17E07F8; Sun, 2 Mar 2025 17:30:52 +0100 (CET) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Subject: [PATCH v2 00/20] Get mt6359-accdet ready for usage in Devicetree Date: Sun, 02 Mar 2025 13:30:39 -0300 Message-Id: <20250302-mt6359-accdet-dts-v2-0-5bd633ee0d47@collabora.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAK+HxGcC/32NSwrDIBRFtxLeuK+oMb+Ouo+Sgb6YRkhiUZGW4 N5rs4AOz4F77gHBeGsC3KoDvEk2WLcXEJcKaFH706CdCoNgomGCS9xiWzcDKqLJRJxiQMY074d ednNNUHYvb2b7PpuPsfBiQ3T+c14k/rP/aokjw7brFG+4HrSkO7l1Vdp5dSW3wZhz/gIMsO1lt gAAAA== X-Change-ID: 20250214-mt6359-accdet-dts-00b189847f3c 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=?= , Andrew Perepech X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250302_083100_613640_94E10679 X-CRM114-Status: GOOD ( 12.75 ) 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 This series prepares the MT6359 ACCDET for actual usage in the Devicetree. Patches 1 and 2 add the required DT bindings, patches 3 and 4 get the mt6359-accdet driver probing, patches 5-18 clean up code related to DT property parsing, patch 19 adds the node in the Devicetree and patch 20 enables the kconfig for the driver. Together with the series "Allow retrieving accessory detection reference on MT8188" [1], and one extra patch on top enabling it on the genio-700-evk DT, this series was tested on the Genio 700 EVK to get audio jack detection working on it. [1] https://lore.kernel.org/all/20250214-mt8188-accdet-v1-0-6bbd5483855b@collabora.com Signed-off-by: NĂ­colas F. R. A. Prado --- Changes in v2: - Removed all DT-binding properties except for EINT polarity one (mediatek,eint-level-pol / mediatek,hp-eint-high) - Added patches 12-18 to make those settings internal to driver - Renamed mediatek,eint-level-pol to mediatek,hp-eint-high and made it bool - Added patch 20 to enable the MT6359 ACCDET Kconfig in the defconfig - Removed unused btn_type variable as part of "Drop dead code for button detection" patch. - Link to v1: https://lore.kernel.org/r/20250214-mt6359-accdet-dts-v1-0-677a151b9b4c@collabora.com --- Andrew Perepech (2): mfd: mt6397-core: Add mfd_cell for mt6359-accdet ASoC: mediatek: mt6359-accdet: Implement HP_EINT polarity configuration NĂ­colas F. R. A. Prado (18): ASoC: dt-bindings: Add document for mt6359-accdet dt-bindings: mfd: mediatek: mt6397: Add accdet subnode ASoC: mediatek: mt6359-accdet: Add compatible property ASoC: mediatek: mt6359-accdet: Handle hp-eint-high property ASoC: mediatek: mt6359-accdet: Drop dead code for EINT/GPIO IRQ handling ASoC: mediatek: mt6359-accdet: Drop dead code for EINT trigger setting ASoC: mediatek: mt6359-accdet: Drop dead code for button detection ASoC: mediatek: mt6359-accdet: Drop dead code for plugout-debounce ASoC: mediatek: mt6359-accdet: Drop unused moisture variables ASoC: mediatek: mt6359-accdet: Always use internal resistor ASoC: mediatek: mt6359-accdet: Make PWM debounce settings internal ASoC: mediatek: mt6359-accdet: Always use eint detect mode 4 ASoC: mediatek: mt6359-accdet: Always set micbias1 to 2.8V ASoC: mediatek: mt6359-accdet: Always configure hardware as mic-mode 2 ASoC: mediatek: mt6359-accdet: Always set comp-vth to 1.6V ASoC: mediatek: mt6359-accdet: Always use EINT0 IRQ arm64: dts: mt6359: Add accessory detect node arm64: defconfig: Enable MT6359 ACCDET .../devicetree/bindings/mfd/mediatek,mt6397.yaml | 7 + .../bindings/sound/mediatek,mt6359-accdet.yaml | 42 ++ arch/arm64/boot/dts/mediatek/mt6359.dtsi | 4 + arch/arm64/configs/defconfig | 1 + drivers/mfd/mt6397-core.c | 12 + sound/soc/codecs/mt6359-accdet.c | 599 +++++---------------- sound/soc/codecs/mt6359-accdet.h | 55 +- 7 files changed, 196 insertions(+), 524 deletions(-) --- base-commit: c0eb65494e59d9834af7cbad983629e9017b25a1 change-id: 20250214-mt6359-accdet-dts-00b189847f3c Best regards,