Commit ab92d09d authored by Mark Brown's avatar Mark Brown

ASoC: cs4270: Check that we can enable regulators on resume

It's possible that the regulator enable will fail and if it does we may
as well just give up with trying to bring the rest of the device up and
report the original error.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarTimur Tabi <timur@freescale.com>
parent 497098be
...@@ -600,10 +600,12 @@ static int cs4270_soc_suspend(struct snd_soc_codec *codec) ...@@ -600,10 +600,12 @@ static int cs4270_soc_suspend(struct snd_soc_codec *codec)
static int cs4270_soc_resume(struct snd_soc_codec *codec) static int cs4270_soc_resume(struct snd_soc_codec *codec)
{ {
struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec);
int reg; int reg, ret;
regulator_bulk_enable(ARRAY_SIZE(cs4270->supplies), ret = regulator_bulk_enable(ARRAY_SIZE(cs4270->supplies),
cs4270->supplies); cs4270->supplies);
if (ret != 0)
return ret;
/* In case the device was put to hard reset during sleep, we need to /* In case the device was put to hard reset during sleep, we need to
* wait 500ns here before any I2C communication. */ * wait 500ns here before any I2C communication. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment