Commit 333802e9 authored by Mark Brown's avatar Mark Brown

ASoC: Support !REGULATOR build for sgtl5000

The regulator is optional depending on board design.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent b1a56b33
...@@ -772,6 +772,7 @@ static int sgtl5000_pcm_hw_params(struct snd_pcm_substream *substream, ...@@ -772,6 +772,7 @@ static int sgtl5000_pcm_hw_params(struct snd_pcm_substream *substream,
return 0; return 0;
} }
#ifdef CONFIG_REGULATOR
static int ldo_regulator_is_enabled(struct regulator_dev *dev) static int ldo_regulator_is_enabled(struct regulator_dev *dev)
{ {
struct ldo_regulator *ldo = rdev_get_drvdata(dev); struct ldo_regulator *ldo = rdev_get_drvdata(dev);
...@@ -901,6 +902,19 @@ static int ldo_regulator_remove(struct snd_soc_codec *codec) ...@@ -901,6 +902,19 @@ static int ldo_regulator_remove(struct snd_soc_codec *codec)
return 0; 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 * set dac bias
......
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