Commit 4ddc81c7 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'asoc/topic/wm8350', 'asoc/topic/wm8400',...

Merge remote-tracking branches 'asoc/topic/wm8350', 'asoc/topic/wm8400', 'asoc/topic/wm8510', 'asoc/topic/wm8523' and 'asoc/topic/wm8580' into asoc-next
...@@ -1242,19 +1242,6 @@ static int wm8350_set_bias_level(struct snd_soc_codec *codec, ...@@ -1242,19 +1242,6 @@ static int wm8350_set_bias_level(struct snd_soc_codec *codec,
return 0; return 0;
} }
static int wm8350_suspend(struct snd_soc_codec *codec)
{
wm8350_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}
static int wm8350_resume(struct snd_soc_codec *codec)
{
wm8350_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}
static void wm8350_hp_work(struct wm8350_data *priv, static void wm8350_hp_work(struct wm8350_data *priv,
struct wm8350_jack_data *jack, struct wm8350_jack_data *jack,
u16 mask) u16 mask)
...@@ -1565,9 +1552,6 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) ...@@ -1565,9 +1552,6 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_MICD, wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_MICD,
wm8350_mic_handler, 0, "Microphone detect", priv); wm8350_mic_handler, 0, "Microphone detect", priv);
wm8350_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0; return 0;
} }
...@@ -1596,8 +1580,6 @@ static int wm8350_codec_remove(struct snd_soc_codec *codec) ...@@ -1596,8 +1580,6 @@ static int wm8350_codec_remove(struct snd_soc_codec *codec)
* wait for its completion */ * wait for its completion */
flush_delayed_work(&codec->dapm.delayed_work); flush_delayed_work(&codec->dapm.delayed_work);
wm8350_set_bias_level(codec, SND_SOC_BIAS_OFF);
wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_5, WM8350_CODEC_ENA); wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_5, WM8350_CODEC_ENA);
return 0; return 0;
...@@ -1613,10 +1595,9 @@ static struct regmap *wm8350_get_regmap(struct device *dev) ...@@ -1613,10 +1595,9 @@ static struct regmap *wm8350_get_regmap(struct device *dev)
static struct snd_soc_codec_driver soc_codec_dev_wm8350 = { static struct snd_soc_codec_driver soc_codec_dev_wm8350 = {
.probe = wm8350_codec_probe, .probe = wm8350_codec_probe,
.remove = wm8350_codec_remove, .remove = wm8350_codec_remove,
.suspend = wm8350_suspend,
.resume = wm8350_resume,
.get_regmap = wm8350_get_regmap, .get_regmap = wm8350_get_regmap,
.set_bias_level = wm8350_set_bias_level, .set_bias_level = wm8350_set_bias_level,
.suspend_bias_off = true,
.controls = wm8350_snd_controls, .controls = wm8350_snd_controls,
.num_controls = ARRAY_SIZE(wm8350_snd_controls), .num_controls = ARRAY_SIZE(wm8350_snd_controls),
......
...@@ -58,12 +58,10 @@ static struct regulator_bulk_data power[] = { ...@@ -58,12 +58,10 @@ static struct regulator_bulk_data power[] = {
/* codec private data */ /* codec private data */
struct wm8400_priv { struct wm8400_priv {
struct snd_soc_codec *codec;
struct wm8400 *wm8400; struct wm8400 *wm8400;
u16 fake_register; u16 fake_register;
unsigned int sysclk; unsigned int sysclk;
unsigned int pcmclk; unsigned int pcmclk;
struct work_struct work;
int fll_in, fll_out; int fll_in, fll_out;
}; };
...@@ -1278,30 +1276,6 @@ static struct snd_soc_dai_driver wm8400_dai = { ...@@ -1278,30 +1276,6 @@ static struct snd_soc_dai_driver wm8400_dai = {
.ops = &wm8400_dai_ops, .ops = &wm8400_dai_ops,
}; };
static int wm8400_suspend(struct snd_soc_codec *codec)
{
wm8400_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}
static int wm8400_resume(struct snd_soc_codec *codec)
{
wm8400_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}
static void wm8400_probe_deferred(struct work_struct *work)
{
struct wm8400_priv *priv = container_of(work, struct wm8400_priv,
work);
struct snd_soc_codec *codec = priv->codec;
/* charge output caps */
wm8400_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
}
static int wm8400_codec_probe(struct snd_soc_codec *codec) static int wm8400_codec_probe(struct snd_soc_codec *codec)
{ {
struct wm8400 *wm8400 = dev_get_platdata(codec->dev); struct wm8400 *wm8400 = dev_get_platdata(codec->dev);
...@@ -1316,7 +1290,6 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec) ...@@ -1316,7 +1290,6 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)
snd_soc_codec_set_drvdata(codec, priv); snd_soc_codec_set_drvdata(codec, priv);
priv->wm8400 = wm8400; priv->wm8400 = wm8400;
priv->codec = codec;
ret = devm_regulator_bulk_get(wm8400->dev, ret = devm_regulator_bulk_get(wm8400->dev,
ARRAY_SIZE(power), &power[0]); ARRAY_SIZE(power), &power[0]);
...@@ -1325,8 +1298,6 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec) ...@@ -1325,8 +1298,6 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)
return ret; return ret;
} }
INIT_WORK(&priv->work, wm8400_probe_deferred);
wm8400_codec_reset(codec); wm8400_codec_reset(codec);
reg = snd_soc_read(codec, WM8400_POWER_MANAGEMENT_1); reg = snd_soc_read(codec, WM8400_POWER_MANAGEMENT_1);
...@@ -1343,8 +1314,6 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec) ...@@ -1343,8 +1314,6 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)
snd_soc_write(codec, WM8400_LEFT_OUTPUT_VOLUME, 0x50 | (1<<8)); snd_soc_write(codec, WM8400_LEFT_OUTPUT_VOLUME, 0x50 | (1<<8));
snd_soc_write(codec, WM8400_RIGHT_OUTPUT_VOLUME, 0x50 | (1<<8)); snd_soc_write(codec, WM8400_RIGHT_OUTPUT_VOLUME, 0x50 | (1<<8));
if (!schedule_work(&priv->work))
return -EINVAL;
return 0; return 0;
} }
...@@ -1369,10 +1338,9 @@ static struct regmap *wm8400_get_regmap(struct device *dev) ...@@ -1369,10 +1338,9 @@ static struct regmap *wm8400_get_regmap(struct device *dev)
static struct snd_soc_codec_driver soc_codec_dev_wm8400 = { static struct snd_soc_codec_driver soc_codec_dev_wm8400 = {
.probe = wm8400_codec_probe, .probe = wm8400_codec_probe,
.remove = wm8400_codec_remove, .remove = wm8400_codec_remove,
.suspend = wm8400_suspend,
.resume = wm8400_resume,
.get_regmap = wm8400_get_regmap, .get_regmap = wm8400_get_regmap,
.set_bias_level = wm8400_set_bias_level, .set_bias_level = wm8400_set_bias_level,
.suspend_bias_off = true,
.controls = wm8400_snd_controls, .controls = wm8400_snd_controls,
.num_controls = ARRAY_SIZE(wm8400_snd_controls), .num_controls = ARRAY_SIZE(wm8400_snd_controls),
......
...@@ -575,41 +575,17 @@ static struct snd_soc_dai_driver wm8510_dai = { ...@@ -575,41 +575,17 @@ static struct snd_soc_dai_driver wm8510_dai = {
.symmetric_rates = 1, .symmetric_rates = 1,
}; };
static int wm8510_suspend(struct snd_soc_codec *codec)
{
wm8510_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}
static int wm8510_resume(struct snd_soc_codec *codec)
{
wm8510_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}
static int wm8510_probe(struct snd_soc_codec *codec) static int wm8510_probe(struct snd_soc_codec *codec)
{ {
wm8510_reset(codec); wm8510_reset(codec);
/* power on device */
wm8510_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}
/* power down chip */
static int wm8510_remove(struct snd_soc_codec *codec)
{
wm8510_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0; return 0;
} }
static struct snd_soc_codec_driver soc_codec_dev_wm8510 = { static struct snd_soc_codec_driver soc_codec_dev_wm8510 = {
.probe = wm8510_probe, .probe = wm8510_probe,
.remove = wm8510_remove,
.suspend = wm8510_suspend,
.resume = wm8510_resume,
.set_bias_level = wm8510_set_bias_level, .set_bias_level = wm8510_set_bias_level,
.suspend_bias_off = true,
.controls = wm8510_snd_controls, .controls = wm8510_snd_controls,
.num_controls = ARRAY_SIZE(wm8510_snd_controls), .num_controls = ARRAY_SIZE(wm8510_snd_controls),
......
...@@ -372,23 +372,6 @@ static struct snd_soc_dai_driver wm8523_dai = { ...@@ -372,23 +372,6 @@ static struct snd_soc_dai_driver wm8523_dai = {
.ops = &wm8523_dai_ops, .ops = &wm8523_dai_ops,
}; };
#ifdef CONFIG_PM
static int wm8523_suspend(struct snd_soc_codec *codec)
{
wm8523_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}
static int wm8523_resume(struct snd_soc_codec *codec)
{
wm8523_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}
#else
#define wm8523_suspend NULL
#define wm8523_resume NULL
#endif
static int wm8523_probe(struct snd_soc_codec *codec) static int wm8523_probe(struct snd_soc_codec *codec)
{ {
struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec); struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec);
...@@ -402,23 +385,13 @@ static int wm8523_probe(struct snd_soc_codec *codec) ...@@ -402,23 +385,13 @@ static int wm8523_probe(struct snd_soc_codec *codec)
WM8523_DACR_VU, WM8523_DACR_VU); WM8523_DACR_VU, WM8523_DACR_VU);
snd_soc_update_bits(codec, WM8523_DAC_CTRL3, WM8523_ZC, WM8523_ZC); snd_soc_update_bits(codec, WM8523_DAC_CTRL3, WM8523_ZC, WM8523_ZC);
wm8523_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}
static int wm8523_remove(struct snd_soc_codec *codec)
{
wm8523_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0; return 0;
} }
static struct snd_soc_codec_driver soc_codec_dev_wm8523 = { static struct snd_soc_codec_driver soc_codec_dev_wm8523 = {
.probe = wm8523_probe, .probe = wm8523_probe,
.remove = wm8523_remove,
.suspend = wm8523_suspend,
.resume = wm8523_resume,
.set_bias_level = wm8523_set_bias_level, .set_bias_level = wm8523_set_bias_level,
.suspend_bias_off = true,
.controls = wm8523_controls, .controls = wm8523_controls,
.num_controls = ARRAY_SIZE(wm8523_controls), .num_controls = ARRAY_SIZE(wm8523_controls),
......
...@@ -882,8 +882,6 @@ static int wm8580_probe(struct snd_soc_codec *codec) ...@@ -882,8 +882,6 @@ static int wm8580_probe(struct snd_soc_codec *codec)
goto err_regulator_enable; goto err_regulator_enable;
} }
wm8580_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0; return 0;
err_regulator_enable: err_regulator_enable:
...@@ -897,8 +895,6 @@ static int wm8580_remove(struct snd_soc_codec *codec) ...@@ -897,8 +895,6 @@ static int wm8580_remove(struct snd_soc_codec *codec)
{ {
struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
wm8580_set_bias_level(codec, SND_SOC_BIAS_OFF);
regulator_bulk_disable(ARRAY_SIZE(wm8580->supplies), wm8580->supplies); regulator_bulk_disable(ARRAY_SIZE(wm8580->supplies), wm8580->supplies);
return 0; return 0;
......
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