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@xxxxxxxxxxxxx Signed-off-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx> --- 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@xxxxxxxxxxxxx --- 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, -- Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>