@@ -31,9 +31,6 @@
#define REGISTER_VAL(x) ((x) - 1)
/* mt6359 accdet capability */
-#define ACCDET_PMIC_EINT_IRQ BIT(0)
-#define ACCDET_AP_GPIO_EINT BIT(1)
-
#define ACCDET_PMIC_EINT0 BIT(2)
#define ACCDET_PMIC_EINT1 BIT(3)
#define ACCDET_PMIC_BI_EINT BIT(4)
@@ -448,8 +445,7 @@ static void mt6359_accdet_jd_work(struct work_struct *work)
mt6359_accdet_recover_jd_setting(priv);
}
- if (priv->caps & ACCDET_PMIC_EINT_IRQ)
- recover_eint_setting(priv);
+ recover_eint_setting(priv);
mutex_unlock(&priv->res_lock);
}
@@ -583,14 +579,6 @@ static int mt6359_accdet_parse_dt(struct mt6359_accdet *priv)
if (ret)
priv->data->eint_pol = IRQ_TYPE_LEVEL_LOW;
- ret = of_property_read_u32(node, "mediatek,eint-use-ap", &tmp);
- if (ret)
- tmp = 0;
- if (tmp == 0)
- priv->caps |= ACCDET_PMIC_EINT_IRQ;
- else if (tmp == 1)
- priv->caps |= ACCDET_AP_GPIO_EINT;
-
ret = of_property_read_u32(node, "mediatek,eint-detect-mode",
&priv->data->eint_detect_mode);
if (ret) {
@@ -910,10 +898,8 @@ static void mt6359_accdet_init(struct mt6359_accdet *priv)
0x3 << RG_ANALOGFDEN_SFT);
}
- if (priv->caps & ACCDET_PMIC_EINT_IRQ) {
- config_eint_init_by_mode(priv);
- config_digital_init_by_mode(priv);
- }
+ config_eint_init_by_mode(priv);
+ config_digital_init_by_mode(priv);
}
int mt6359_accdet_enable_jack_detect(struct snd_soc_component *component,
The ACCDET supports two modes for IRQ generation: PMIC EINT or AP GPIO, which in principle could be configured through a DT property. However this DT property has no user nor is documented in a binding, and the driver only implements the PMIC EINT case, so drop the unused code intended to handle both cases. Signed-off-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com> --- sound/soc/codecs/mt6359-accdet.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-)