From: Andrew Perepech <andrew.perepech@xxxxxxxxxxxx>
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@xxxxxxxxxxxx>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>
---
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
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]