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: Mark Brown <broonie@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
This commit is contained in:
Mark Brown 2013-07-18 22:47:02 +01:00
parent 57e265c8d7
commit 68defe585f

View file

@ -819,8 +819,9 @@ static int clk_sys_event(struct snd_soc_dapm_widget *w,
* don't want false reports.
*/
if (wm8994->jackdet && !wm8994->clk_has_run) {
schedule_delayed_work(&wm8994->jackdet_bootstrap,
msecs_to_jiffies(1000));
queue_delayed_work(system_power_efficient_wq,
&wm8994->jackdet_bootstrap,
msecs_to_jiffies(1000));
wm8994->clk_has_run = true;
}
break;
@ -3487,7 +3488,8 @@ static irqreturn_t wm8994_mic_irq(int irq, void *data)
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;
}
@ -3575,8 +3577,9 @@ static void wm8958_mic_id(void *data, u16 status)
/* If nothing present then clear our statuses */
dev_dbg(codec->dev, "Detected open circuit\n");
schedule_delayed_work(&wm8994->open_circuit_work,
msecs_to_jiffies(2500));
queue_delayed_work(system_power_efficient_wq,
&wm8994->open_circuit_work,
msecs_to_jiffies(2500));
return;
}
@ -3690,8 +3693,9 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
WM1811_JACKDET_DB, 0);
delay = control->pdata.micdet_delay;
schedule_delayed_work(&wm8994->mic_work,
msecs_to_jiffies(delay));
queue_delayed_work(system_power_efficient_wq,
&wm8994->mic_work,
msecs_to_jiffies(delay));
} else {
dev_dbg(codec->dev, "Jack not detected\n");
@ -3940,8 +3944,9 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
id_delay = wm8994->wm8994->pdata.mic_id_delay;
if (wm8994->mic_detecting)
schedule_delayed_work(&wm8994->mic_complete_work,
msecs_to_jiffies(id_delay));
queue_delayed_work(system_power_efficient_wq,
&wm8994->mic_complete_work,
msecs_to_jiffies(id_delay));
else
wm8958_button_det(codec, reg);