Commit 5d0e7f61 authored by Barry Song's avatar Barry Song Committed by Mark Brown

ASoC: AD1836: rename suspend/resume funcs

Use less specific names for suspend/resume to match the probe/remove funcs
where these are now used.
Signed-off-by: default avatarBarry Song <barry.song@analog.com>
Signed-off-by: default avatarScott Jiang <scott.jiang@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 0679059a
...@@ -189,26 +189,6 @@ static int ad1836_hw_params(struct snd_pcm_substream *substream, ...@@ -189,26 +189,6 @@ static int ad1836_hw_params(struct snd_pcm_substream *substream,
return 0; return 0;
} }
#ifdef CONFIG_PM
static int ad1836_soc_suspend(struct snd_soc_codec *codec,
pm_message_t state)
{
/* reset clock control mode */
return snd_soc_update_bits(codec, AD1836_ADC_CTRL2,
AD1836_ADC_SERFMT_MASK, 0);
}
static int ad1836_soc_resume(struct snd_soc_codec *codec)
{
/* restore clock control mode */
return snd_soc_update_bits(codec, AD1836_ADC_CTRL2,
AD1836_ADC_SERFMT_MASK, AD1836_ADC_AUX);
}
#else
#define ad1836_soc_suspend NULL
#define ad1836_soc_resume NULL
#endif
static struct snd_soc_dai_ops ad1836_dai_ops = { static struct snd_soc_dai_ops ad1836_dai_ops = {
.hw_params = ad1836_hw_params, .hw_params = ad1836_hw_params,
.set_fmt = ad1836_set_dai_fmt, .set_fmt = ad1836_set_dai_fmt,
...@@ -242,6 +222,25 @@ static struct snd_soc_dai_driver ad183x_dais[] = { ...@@ -242,6 +222,25 @@ static struct snd_soc_dai_driver ad183x_dais[] = {
[AD1838] = AD183X_DAI("ad1838", 3, 1), [AD1838] = AD183X_DAI("ad1838", 3, 1),
}; };
#ifdef CONFIG_PM
static int ad1836_suspend(struct snd_soc_codec *codec, pm_message_t state)
{
/* reset clock control mode */
return snd_soc_update_bits(codec, AD1836_ADC_CTRL2,
AD1836_ADC_SERFMT_MASK, 0);
}
static int ad1836_resume(struct snd_soc_codec *codec)
{
/* restore clock control mode */
return snd_soc_update_bits(codec, AD1836_ADC_CTRL2,
AD1836_ADC_SERFMT_MASK, AD1836_ADC_AUX);
}
#else
#define ad1836_suspend NULL
#define ad1836_resume NULL
#endif
static int ad1836_probe(struct snd_soc_codec *codec) static int ad1836_probe(struct snd_soc_codec *codec)
{ {
struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec); struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec);
...@@ -324,8 +323,8 @@ static int ad1836_remove(struct snd_soc_codec *codec) ...@@ -324,8 +323,8 @@ static int ad1836_remove(struct snd_soc_codec *codec)
static struct snd_soc_codec_driver soc_codec_dev_ad1836 = { static struct snd_soc_codec_driver soc_codec_dev_ad1836 = {
.probe = ad1836_probe, .probe = ad1836_probe,
.remove = ad1836_remove, .remove = ad1836_remove,
.suspend = ad1836_soc_suspend, .suspend = ad1836_suspend,
.resume = ad1836_soc_resume, .resume = ad1836_resume,
.reg_cache_size = AD1836_NUM_REGS, .reg_cache_size = AD1836_NUM_REGS,
.reg_word_size = sizeof(u16), .reg_word_size = sizeof(u16),
......
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