diff options
author | Mark Brown <broonie@linaro.org> | 2013-07-18 22:47:02 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-07-19 12:25:28 +0100 |
commit | 68defe585f333223f0f3733340136d1b02003062 (patch) | |
tree | 6ffa32b361ef52cc7b39edc7fca8cbf3c1c83559 /sound/soc/codecs/wm8994.c | |
parent | 57e265c8d71fb94c130bfb31f589cc9e97fb3928 (diff) |
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>
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 02c320f71cdf..24131a7f9390 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -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); |