alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Support !REGULATOR build for sgtl5000
@ 2011-03-22 12:22 Mark Brown
  2011-03-22 18:16 ` Liam Girdwood
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2011-03-22 12:22 UTC (permalink / raw)
  To: Zeng Zhaoming, Liam Girdwood; +Cc: alsa-devel, Mark Brown

The regulator is optional depending on board design.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/sgtl5000.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 1f7217f..ff29380 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -772,6 +772,7 @@ static int sgtl5000_pcm_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
+#ifdef CONFIG_REGULATOR
 static int ldo_regulator_is_enabled(struct regulator_dev *dev)
 {
 	struct ldo_regulator *ldo = rdev_get_drvdata(dev);
@@ -901,6 +902,19 @@ static int ldo_regulator_remove(struct snd_soc_codec *codec)
 
 	return 0;
 }
+#else
+static int ldo_regulator_register(struct snd_soc_codec *codec,
+				struct regulator_init_data *init_data,
+				int voltage)
+{
+	return -EINVAL;
+}
+
+static int ldo_regulator_remove(struct snd_soc_codec *codec)
+{
+	return 0;
+}
+#endif
 
 /*
  * set dac bias
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: Support !REGULATOR build for sgtl5000
  2011-03-22 12:22 [PATCH] ASoC: Support !REGULATOR build for sgtl5000 Mark Brown
@ 2011-03-22 18:16 ` Liam Girdwood
  0 siblings, 0 replies; 2+ messages in thread
From: Liam Girdwood @ 2011-03-22 18:16 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Zeng Zhaoming

On Tue, 2011-03-22 at 12:22 +0000, Mark Brown wrote:
> The regulator is optional depending on board design.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  sound/soc/codecs/sgtl5000.c |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 

Acked-by: Liam Girdwood <lrg@ti.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-22 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 12:22 [PATCH] ASoC: Support !REGULATOR build for sgtl5000 Mark Brown
2011-03-22 18:16 ` Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).