aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/omap3pandora.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-02 02:47:55 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-04 00:56:23 -0500
commitdd194b48465ba9c4eef7f16a4815b7761a8172ce (patch)
tree5b3f5bdc09977e9a4566eab5ad5d24fe10424278 /sound/soc/omap/omap3pandora.c
parent4f224c612438e0c2067594636c6998ce5048d228 (diff)
ASoC: omap: Check regulator enable for DAC on Pandora
This will probably never fail but it's better style. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Diffstat (limited to 'sound/soc/omap/omap3pandora.c')
-rw-r--r--sound/soc/omap/omap3pandora.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c
index 805512f2555a..10ced9d2e0de 100644
--- a/sound/soc/omap/omap3pandora.c
+++ b/sound/soc/omap/omap3pandora.c
@@ -80,12 +80,18 @@ static int omap3pandora_hw_params(struct snd_pcm_substream *substream,
80static int omap3pandora_dac_event(struct snd_soc_dapm_widget *w, 80static int omap3pandora_dac_event(struct snd_soc_dapm_widget *w,
81 struct snd_kcontrol *k, int event) 81 struct snd_kcontrol *k, int event)
82{ 82{
83 int ret;
84
83 /* 85 /*
84 * The PCM1773 DAC datasheet requires 1ms delay between switching 86 * The PCM1773 DAC datasheet requires 1ms delay between switching
85 * VCC power on/off and /PD pin high/low 87 * VCC power on/off and /PD pin high/low
86 */ 88 */
87 if (SND_SOC_DAPM_EVENT_ON(event)) { 89 if (SND_SOC_DAPM_EVENT_ON(event)) {
88 regulator_enable(omap3pandora_dac_reg); 90 ret = regulator_enable(omap3pandora_dac_reg);
91 if (ret) {
92 dev_err(w->dapm.dev, "Failed to power DAC: %d\n", ret);
93 return ret;
94 }
89 mdelay(1); 95 mdelay(1);
90 gpio_set_value(OMAP3_PANDORA_DAC_POWER_GPIO, 1); 96 gpio_set_value(OMAP3_PANDORA_DAC_POWER_GPIO, 1);
91 } else { 97 } else {