Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 277880a3 authored by Oder Chiou's avatar Oder Chiou Committed by Mark Brown
Browse files

ASoC: rt5677: Add the MICBIAS VDD setting in the platform data



The patch adds the MICBIAS VDD setting in the platform data. It can be set to
1V8 or 3V3 in the MICBIAS VDD.

Signed-off-by: default avatarOder Chiou <oder_chiou@realtek.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 38d595e2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@ struct rt5677_platform_data {
		OFF, GPIO4, GPIO5 and GPIO6 respectively */
	unsigned int jd2_gpio;
	unsigned int jd3_gpio;

	/* Set MICBIAS1 VDD 1v8 or 3v3 */
	bool micbias1_vdd_3v3;
};

#endif
+5 −0
Original line number Diff line number Diff line
@@ -4912,6 +4912,11 @@ static int rt5677_i2c_probe(struct i2c_client *i2c,
					RT5677_GPIO5_DIR_OUT);
	}

	if (rt5677->pdata.micbias1_vdd_3v3)
		regmap_update_bits(rt5677->regmap, RT5677_MICBIAS,
			RT5677_MICBIAS1_CTRL_VDD_MASK,
			RT5677_MICBIAS1_CTRL_VDD_3_3V);

	rt5677_init_gpio(i2c);
	rt5677_init_irq(i2c);