@@ -494,11 +494,6 @@ static int mt6359_accdet_parse_dt(struct mt6359_accdet *priv)
if (!node)
return -EINVAL;
- ret = of_property_read_u32(node, "mediatek,mic-vol",
- &priv->data->mic_vol);
- if (ret)
- priv->data->mic_vol = 8;
-
ret = of_property_read_u32(node, "mediatek,mic-mode",
&priv->data->mic_mode);
if (ret)
@@ -657,22 +652,10 @@ static void mt6359_accdet_init(struct mt6359_accdet *priv)
ACCDET_RISE_DELAY));
regmap_read(priv->regmap, RG_AUDPWDBMICBIAS1_ADDR, ®);
- if (priv->data->mic_vol <= 7) {
- /* micbias1 <= 2.7V */
- regmap_write(priv->regmap, RG_AUDPWDBMICBIAS1_ADDR,
- reg | (priv->data->mic_vol << RG_AUDMICBIAS1VREF_SFT) |
- RG_AUDMICBIAS1LOWPEN_MASK_SFT);
- } else if (priv->data->mic_vol == 8) {
- /* micbias1 = 2.8v */
- regmap_write(priv->regmap, RG_AUDPWDBMICBIAS1_ADDR,
- reg | (3 << RG_AUDMICBIAS1HVEN_SFT) |
+ /* micbias1 = 2.8v */
+ regmap_write(priv->regmap, RG_AUDPWDBMICBIAS1_ADDR,
+ reg | (3 << RG_AUDMICBIAS1HVEN_SFT) |
RG_AUDMICBIAS1LOWPEN_MASK_SFT);
- } else if (priv->data->mic_vol == 9) {
- /* micbias1 = 2.85v */
- regmap_write(priv->regmap, RG_AUDPWDBMICBIAS1_ADDR,
- reg | (1 << RG_AUDMICBIAS1HVEN_SFT) |
- RG_AUDMICBIAS1LOWPEN_MASK_SFT);
- }
/* mic mode setting */
regmap_read(priv->regmap, RG_AUDACCDETMICBIAS0PULLLOW_ADDR, ®);
if (priv->data->mic_mode == HEADSET_MODE_1) {
@@ -51,7 +51,6 @@ enum {
};
struct dts_data {
- unsigned int mic_vol;
unsigned int mic_mode;
bool hp_eint_high;
unsigned int eint_comp_vth;
The driver currently reads a mediatek,mic-vol property from DT to determine the micbias1 setting to configure in hardware. Since there are no current users of the property and the default value (2.8V) is known to work on multiple boards, remove the code handling this property and instead always configure the micbias1 to 2.8V. 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 | 23 +++-------------------- sound/soc/codecs/mt6359-accdet.h | 1 - 2 files changed, 3 insertions(+), 21 deletions(-)