@@ -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)
@@ -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(-)