[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250304-mt6359-accdet-dts-v3-6-5b0eafc29f5b@collabora.com>
Date: Tue, 04 Mar 2025 12:15:47 -0300
From: Nícolas F. R. A. Prado <nfraprado@...labora.com>
To: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Sen Chu <sen.chu@...iatek.com>, Sean Wang <sean.wang@...iatek.com>,
Macpaul Lin <macpaul.lin@...iatek.com>, Lee Jones <lee@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>
Cc: kernel@...labora.com, linux-sound@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org,
linux-pm@...r.kernel.org,
Nícolas F. R. A. Prado <nfraprado@...labora.com>,
Andrew Perepech <andrew.perepech@...iatek.com>
Subject: [PATCH v3 06/20] ASoC: mediatek: mt6359-accdet: Implement HP_EINT
polarity configuration
From: Andrew Perepech <andrew.perepech@...iatek.com>
The driver currently reads the HP_EINT polarity from the Devicetree but
never actually configures the hardware accordingly.
Implement the polarity configuration in hardware.
Signed-off-by: Andrew Perepech <andrew.perepech@...iatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
---
sound/soc/codecs/mt6359-accdet.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sound/soc/codecs/mt6359-accdet.c b/sound/soc/codecs/mt6359-accdet.c
index ca3be59d2d0ecaadccd9ba399649ba93f20490c4..1d4481109f6e4f473610e0797c9d3c636bdf12cf 100644
--- a/sound/soc/codecs/mt6359-accdet.c
+++ b/sound/soc/codecs/mt6359-accdet.c
@@ -730,6 +730,17 @@ static void config_digital_init_by_mode(struct mt6359_accdet *priv)
BIT(ACCDET_EINT1_INVERTER_SW_EN_SFT));
}
}
+
+ if (priv->data->hp_eint_high) {
+ /* EINT polarity inverse */
+ regmap_update_bits(priv->regmap, ACCDET_EINT_IN_INVERSE_ADDR,
+ ACCDET_EINT_IN_INVERSE_MASK_SFT,
+ BIT(ACCDET_EINT_IN_INVERSE_SFT));
+ } else {
+ /* EINT polarity normal */
+ regmap_update_bits(priv->regmap, ACCDET_EINT_IN_INVERSE_ADDR,
+ ACCDET_EINT_IN_INVERSE_MASK_SFT, 0);
+ }
}
static void config_eint_init_by_mode(struct mt6359_accdet *priv)
--
2.48.1
Powered by blists - more mailing lists