[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250304-mt6359-accdet-dts-v3-5-5b0eafc29f5b@collabora.com>
Date: Tue, 04 Mar 2025 12:15:46 -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>
Subject: [PATCH v3 05/20] ASoC: mediatek: mt6359-accdet: Handle
hp-eint-high property
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 <angelogioacchino.delregno@...labora.com>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
---
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;
--
2.48.1
Powered by blists - more mailing lists