diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-22 13:02:33 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-22 19:26:30 +0100 |
commit | 333802e90d3f0366c4a1cb767e2783d2e1df73a8 (patch) | |
tree | 19733471f0ed0779c57470d6867496129f67337b /sound | |
parent | ASoC: Remove bogus check for register validity in debugfs write (diff) | |
download | linux-333802e90d3f0366c4a1cb767e2783d2e1df73a8.tar.xz linux-333802e90d3f0366c4a1cb767e2783d2e1df73a8.zip |
ASoC: Support !REGULATOR build for sgtl5000
The regulator is optional depending on board design.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound')
-rw-r--r-- | 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 1f7217f703ee..ff29380c9ed3 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 |