Message ID | 20250302-mt6359-accdet-dts-v2-17-5bd633ee0d47@collabora.com (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
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: > The driver currently reads a mediatek,eint-comp-vth property from DT to > determine the voltage threshold of the EINT comparator. Since there are > no current users of the property and setting it to 1.6V is known to work > across multiple boards, remove the code handling this property and > instead always configure it to 1.6V. The property can be properly > introduced in the binding in the future if it really turns out that > different boards need different configurations. > > 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 12697b02faff1be39317116cd7d8ffa359f2cd4e..3f6a97e8de8d174e59e512d53135fadc5765b5c1 100644 --- a/sound/soc/codecs/mt6359-accdet.c +++ b/sound/soc/codecs/mt6359-accdet.c @@ -61,6 +61,7 @@ #define ACCDET_EINT_INVERTER_DEBOUNCE_256MS 0xe #define ACCDET_EINT_CMPMEN_PWM_WIDTH_400MS 4 #define ACCDET_EINT_CMPMEN_PWM_THRESH_2MS 1 +#define ACCDET_EINT_COMP_VTH_1600MV 2 static struct platform_driver mt6359_accdet_driver; static const struct snd_soc_component_driver mt6359_accdet_soc_driver; @@ -506,11 +507,6 @@ static int mt6359_accdet_parse_dt(struct mt6359_accdet *priv) else if (tmp == 2) priv->caps |= ACCDET_PMIC_BI_EINT; - ret = of_property_read_u32(node, "mediatek,eint-comp-vth", - &priv->data->eint_comp_vth); - if (ret) - priv->data->eint_comp_vth = 0x0; - of_node_put(node); dev_warn(priv->dev, "accdet caps=%x\n", priv->caps); @@ -594,7 +590,7 @@ static void config_eint_init_by_mode(struct mt6359_accdet *priv) 0x3 << RG_ACCDETSPARE_SFT, 0x3 << RG_ACCDETSPARE_SFT); regmap_write(priv->regmap, RG_EINTCOMPVTH_ADDR, - val | priv->data->eint_comp_vth << RG_EINTCOMPVTH_SFT); + val | ACCDET_EINT_COMP_VTH_1600MV << RG_EINTCOMPVTH_SFT); } static void mt6359_accdet_init(struct mt6359_accdet *priv) diff --git a/sound/soc/codecs/mt6359-accdet.h b/sound/soc/codecs/mt6359-accdet.h index 579373807c414130b2a7384db4978e01cf1d046c..288b8fbf7c5efaee6520a2c0a5845e156f3b805d 100644 --- a/sound/soc/codecs/mt6359-accdet.h +++ b/sound/soc/codecs/mt6359-accdet.h @@ -48,7 +48,6 @@ enum { struct dts_data { bool hp_eint_high; - unsigned int eint_comp_vth; }; struct mt6359_accdet {
The driver currently reads a mediatek,eint-comp-vth property from DT to determine the voltage threshold of the EINT comparator. Since there are no current users of the property and setting it to 1.6V is known to work across multiple boards, remove the code handling this property and instead always configure it to 1.6V. The property can be properly introduced in the binding in the future if it really turns out that different boards need different configurations. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> --- sound/soc/codecs/mt6359-accdet.c | 8 ++------ sound/soc/codecs/mt6359-accdet.h | 1 - 2 files changed, 2 insertions(+), 7 deletions(-)