Commit 68defe58 authored by Mark Brown's avatar Mark Brown

ASoC: wm8994: Use power efficient workqueue

The accessory detect debounce work is not performance sensitive so let
the scheduler run it wherever is most efficient rather than in a per CPU
workqueue by using the system power efficient workqueue.
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 57e265c8
...@@ -819,8 +819,9 @@ static int clk_sys_event(struct snd_soc_dapm_widget *w, ...@@ -819,8 +819,9 @@ static int clk_sys_event(struct snd_soc_dapm_widget *w,
* don't want false reports. * don't want false reports.
*/ */
if (wm8994->jackdet && !wm8994->clk_has_run) { if (wm8994->jackdet && !wm8994->clk_has_run) {
schedule_delayed_work(&wm8994->jackdet_bootstrap, queue_delayed_work(system_power_efficient_wq,
msecs_to_jiffies(1000)); &wm8994->jackdet_bootstrap,
msecs_to_jiffies(1000));
wm8994->clk_has_run = true; wm8994->clk_has_run = true;
} }
break; break;
...@@ -3487,7 +3488,8 @@ static irqreturn_t wm8994_mic_irq(int irq, void *data) ...@@ -3487,7 +3488,8 @@ static irqreturn_t wm8994_mic_irq(int irq, void *data)
pm_wakeup_event(codec->dev, 300); pm_wakeup_event(codec->dev, 300);
schedule_delayed_work(&priv->mic_work, msecs_to_jiffies(250)); queue_delayed_work(system_power_efficient_wq,
&priv->mic_work, msecs_to_jiffies(250));
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -3575,8 +3577,9 @@ static void wm8958_mic_id(void *data, u16 status) ...@@ -3575,8 +3577,9 @@ static void wm8958_mic_id(void *data, u16 status)
/* If nothing present then clear our statuses */ /* If nothing present then clear our statuses */
dev_dbg(codec->dev, "Detected open circuit\n"); dev_dbg(codec->dev, "Detected open circuit\n");
schedule_delayed_work(&wm8994->open_circuit_work, queue_delayed_work(system_power_efficient_wq,
msecs_to_jiffies(2500)); &wm8994->open_circuit_work,
msecs_to_jiffies(2500));
return; return;
} }
...@@ -3690,8 +3693,9 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data) ...@@ -3690,8 +3693,9 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
WM1811_JACKDET_DB, 0); WM1811_JACKDET_DB, 0);
delay = control->pdata.micdet_delay; delay = control->pdata.micdet_delay;
schedule_delayed_work(&wm8994->mic_work, queue_delayed_work(system_power_efficient_wq,
msecs_to_jiffies(delay)); &wm8994->mic_work,
msecs_to_jiffies(delay));
} else { } else {
dev_dbg(codec->dev, "Jack not detected\n"); dev_dbg(codec->dev, "Jack not detected\n");
...@@ -3940,8 +3944,9 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data) ...@@ -3940,8 +3944,9 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
id_delay = wm8994->wm8994->pdata.mic_id_delay; id_delay = wm8994->wm8994->pdata.mic_id_delay;
if (wm8994->mic_detecting) if (wm8994->mic_detecting)
schedule_delayed_work(&wm8994->mic_complete_work, queue_delayed_work(system_power_efficient_wq,
msecs_to_jiffies(id_delay)); &wm8994->mic_complete_work,
msecs_to_jiffies(id_delay));
else else
wm8958_button_det(codec, reg); wm8958_button_det(codec, reg);
......
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