ASoC: Log WM8994 FIFO errors from the interrupt
We should spot them anyway on state changes but logging them gives us better time information about when the misconfiguration happened. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
b3d7615f2a
commit
3b1af3f8c8
1 changed files with 14 additions and 0 deletions
|
@ -2874,6 +2874,15 @@ out:
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static irqreturn_t wm8994_fifo_error(int irq, void *data)
|
||||||
|
{
|
||||||
|
struct snd_soc_codec *codec = data;
|
||||||
|
|
||||||
|
dev_err(codec->dev, "FIFO error\n");
|
||||||
|
|
||||||
|
return IRQ_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
static int wm8994_codec_probe(struct snd_soc_codec *codec)
|
static int wm8994_codec_probe(struct snd_soc_codec *codec)
|
||||||
{
|
{
|
||||||
struct wm8994 *control;
|
struct wm8994 *control;
|
||||||
|
@ -2948,6 +2957,9 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wm8994_request_irq(codec->control_data, WM8994_IRQ_FIFOS_ERR,
|
||||||
|
wm8994_fifo_error, "FIFO error", codec);
|
||||||
|
|
||||||
ret = wm8994_request_irq(codec->control_data, WM8994_IRQ_DCS_DONE,
|
ret = wm8994_request_irq(codec->control_data, WM8994_IRQ_DCS_DONE,
|
||||||
wm_hubs_dcs_done, "DC servo done",
|
wm_hubs_dcs_done, "DC servo done",
|
||||||
&wm8994->hubs);
|
&wm8994->hubs);
|
||||||
|
@ -3210,6 +3222,7 @@ err_irq:
|
||||||
&wm8994->fll_locked[i]);
|
&wm8994->fll_locked[i]);
|
||||||
wm8994_free_irq(codec->control_data, WM8994_IRQ_DCS_DONE,
|
wm8994_free_irq(codec->control_data, WM8994_IRQ_DCS_DONE,
|
||||||
&wm8994->hubs);
|
&wm8994->hubs);
|
||||||
|
wm8994_free_irq(codec->control_data, WM8994_IRQ_FIFOS_ERR, codec);
|
||||||
err:
|
err:
|
||||||
kfree(wm8994);
|
kfree(wm8994);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -3231,6 +3244,7 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec)
|
||||||
|
|
||||||
wm8994_free_irq(codec->control_data, WM8994_IRQ_DCS_DONE,
|
wm8994_free_irq(codec->control_data, WM8994_IRQ_DCS_DONE,
|
||||||
&wm8994->hubs);
|
&wm8994->hubs);
|
||||||
|
wm8994_free_irq(codec->control_data, WM8994_IRQ_FIFOS_ERR, codec);
|
||||||
|
|
||||||
switch (control->type) {
|
switch (control->type) {
|
||||||
case WM8994:
|
case WM8994:
|
||||||
|
|
Loading…
Add table
Reference in a new issue