Skip to contentSkip to conversation

ASoC: da7219: Fix I/O voltage range configuration during probe

PATCH In review Adam Thomson 2 participants 2 messages Aug 21, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: da7219: Fix I/O voltage range configuration during probe

Previous improvements around handling device and codec level probe functionality added the possibility of the voltage level being undefined for the scenario where the IO voltage retrieved from the regulator supply was below 1.2V, whereas previously the code defaulted to the 2.5V to 3.6V range in that case. This commit restores the default value to avoid this happening.

Fixes aa5b18d1c290 ("ASoC: da7219: Move soft reset handling to codec level probe")
---
 sound/soc/codecs/da7219.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
sound/soc/codecs/da7219.c +3 -2
index ddd422c..045aeb6 100644
@@ -1862,6 +1862,9 @@ static int da7219_handle_supplies(struct snd_soc_component *component,
 		return ret;
 	}
 
+	/* Default to upper range */
+	*io_voltage_lvl = DA7219_IO_VOLTAGE_LEVEL_2_5V_3_6V;
+
 	/* Determine VDDIO voltage provided */
 	vddio = da7219->supplies[DA7219_SUPPLY_VDDIO].consumer;
 	ret = regulator_get_voltage(vddio);
@@ -1869,8 +1872,6 @@ static int da7219_handle_supplies(struct snd_soc_component *component,
 		dev_warn(component->dev, "Invalid VDDIO voltage\n");
 	else if (ret < 2800000)
 		*io_voltage_lvl = DA7219_IO_VOLTAGE_LEVEL_1_2V_2_8V;
-	else
-		*io_voltage_lvl = DA7219_IO_VOLTAGE_LEVEL_2_5V_3_6V;
 
 	/* Enable main supplies */
 	ret = regulator_bulk_enable(DA7219_NUM_SUPPLIES, da7219->supplies);
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 6 lines · Adam Thomson

Previous improvements around handling device and codec level probe functionality added the possibility of the voltage level being undefined for the scenario where the IO voltage retrieved from the regulator supply was below 1.2V, whereas previously the code defaulted to the 2.5V to 3.6V range in that case. This commit restores the default value to avoid this happening.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: da7219: Fix I/O voltage range configuration during probe

      commit: fcea8b023a5f06ea0180ae65b01520b0414ee325

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark