Message ID | 20250302-mt6359-accdet-dts-v2-5-5bd633ee0d47@collabora.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Get mt6359-accdet ready for usage in Devicetree | expand |
Il 02/03/25 17:30, Nícolas F. R. A. Prado ha scritto: > 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. > > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
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;
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. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> --- sound/soc/codecs/mt6359-accdet.c | 5 +---- sound/soc/codecs/mt6359-accdet.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-)