extcon: arizona: Use power efficient workqueue
None of the delayed work the driver schedules has particularly short delays and it 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> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
This commit is contained in:
parent
7281e05aab
commit
df9a5ab463
|
@ -890,7 +890,8 @@ static void arizona_micd_detect(struct work_struct *work)
|
||||||
|
|
||||||
handled:
|
handled:
|
||||||
if (info->detecting)
|
if (info->detecting)
|
||||||
schedule_delayed_work(&info->micd_timeout_work,
|
queue_delayed_work(system_power_efficient_wq,
|
||||||
|
&info->micd_timeout_work,
|
||||||
msecs_to_jiffies(info->micd_timeout));
|
msecs_to_jiffies(info->micd_timeout));
|
||||||
|
|
||||||
pm_runtime_mark_last_busy(info->dev);
|
pm_runtime_mark_last_busy(info->dev);
|
||||||
|
@ -912,7 +913,8 @@ static irqreturn_t arizona_micdet(int irq, void *data)
|
||||||
mutex_unlock(&info->lock);
|
mutex_unlock(&info->lock);
|
||||||
|
|
||||||
if (debounce)
|
if (debounce)
|
||||||
schedule_delayed_work(&info->micd_detect_work,
|
queue_delayed_work(system_power_efficient_wq,
|
||||||
|
&info->micd_detect_work,
|
||||||
msecs_to_jiffies(debounce));
|
msecs_to_jiffies(debounce));
|
||||||
else
|
else
|
||||||
arizona_micd_detect(&info->micd_detect_work.work);
|
arizona_micd_detect(&info->micd_detect_work.work);
|
||||||
|
@ -967,11 +969,13 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
|
||||||
if (val == info->last_jackdet) {
|
if (val == info->last_jackdet) {
|
||||||
dev_dbg(arizona->dev, "Suppressing duplicate JACKDET\n");
|
dev_dbg(arizona->dev, "Suppressing duplicate JACKDET\n");
|
||||||
if (cancelled_hp)
|
if (cancelled_hp)
|
||||||
schedule_delayed_work(&info->hpdet_work,
|
queue_delayed_work(system_power_efficient_wq,
|
||||||
|
&info->hpdet_work,
|
||||||
msecs_to_jiffies(HPDET_DEBOUNCE));
|
msecs_to_jiffies(HPDET_DEBOUNCE));
|
||||||
|
|
||||||
if (cancelled_mic)
|
if (cancelled_mic)
|
||||||
schedule_delayed_work(&info->micd_timeout_work,
|
queue_delayed_work(system_power_efficient_wq,
|
||||||
|
&info->micd_timeout_work,
|
||||||
msecs_to_jiffies(info->micd_timeout));
|
msecs_to_jiffies(info->micd_timeout));
|
||||||
|
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -994,7 +998,8 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
|
||||||
|
|
||||||
arizona_start_mic(info);
|
arizona_start_mic(info);
|
||||||
} else {
|
} else {
|
||||||
schedule_delayed_work(&info->hpdet_work,
|
queue_delayed_work(system_power_efficient_wq,
|
||||||
|
&info->hpdet_work,
|
||||||
msecs_to_jiffies(HPDET_DEBOUNCE));
|
msecs_to_jiffies(HPDET_DEBOUNCE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue