* [PATCH] extcon: arizona: Use power efficient workqueue
@ 2013-07-18 21:42 Mark Brown
2013-07-19 4:56 ` Chanwoo Choi
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2013-07-18 21:42 UTC (permalink / raw)
To: MyungJoo Ham, Chanwoo Choi; +Cc: patches, linux-kernel, Mark Brown
From: Mark Brown <broonie@linaro.org>
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>
---
drivers/extcon/extcon-arizona.c | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 7a1b4a7..e557130 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -890,8 +890,9 @@ static void arizona_micd_detect(struct work_struct *work)
handled:
if (info->detecting)
- schedule_delayed_work(&info->micd_timeout_work,
- msecs_to_jiffies(info->micd_timeout));
+ queue_delayed_work(system_power_efficient_wq,
+ &info->micd_timeout_work,
+ msecs_to_jiffies(info->micd_timeout));
pm_runtime_mark_last_busy(info->dev);
mutex_unlock(&info->lock);
@@ -912,8 +913,9 @@ static irqreturn_t arizona_micdet(int irq, void *data)
mutex_unlock(&info->lock);
if (debounce)
- schedule_delayed_work(&info->micd_detect_work,
- msecs_to_jiffies(debounce));
+ queue_delayed_work(system_power_efficient_wq,
+ &info->micd_detect_work,
+ msecs_to_jiffies(debounce));
else
arizona_micd_detect(&info->micd_detect_work.work);
@@ -967,12 +969,14 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
if (val == info->last_jackdet) {
dev_dbg(arizona->dev, "Suppressing duplicate JACKDET\n");
if (cancelled_hp)
- schedule_delayed_work(&info->hpdet_work,
- msecs_to_jiffies(HPDET_DEBOUNCE));
+ queue_delayed_work(system_power_efficient_wq,
+ &info->hpdet_work,
+ msecs_to_jiffies(HPDET_DEBOUNCE));
if (cancelled_mic)
- schedule_delayed_work(&info->micd_timeout_work,
- msecs_to_jiffies(info->micd_timeout));
+ queue_delayed_work(system_power_efficient_wq,
+ &info->micd_timeout_work,
+ msecs_to_jiffies(info->micd_timeout));
goto out;
}
@@ -994,8 +998,9 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
arizona_start_mic(info);
} else {
- schedule_delayed_work(&info->hpdet_work,
- msecs_to_jiffies(HPDET_DEBOUNCE));
+ queue_delayed_work(system_power_efficient_wq,
+ &info->hpdet_work,
+ msecs_to_jiffies(HPDET_DEBOUNCE));
}
regmap_update_bits(arizona->regmap,
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] extcon: arizona: Use power efficient workqueue
2013-07-18 21:42 [PATCH] extcon: arizona: Use power efficient workqueue Mark Brown
@ 2013-07-19 4:56 ` Chanwoo Choi
0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2013-07-19 4:56 UTC (permalink / raw)
To: Mark Brown; +Cc: MyungJoo Ham, patches, linux-kernel, Mark Brown
Hi Mark,
On 07/19/2013 06:42 AM, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
>
> 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>
> ---
> drivers/extcon/extcon-arizona.c | 25 +++++++++++++++----------
> 1 file changed, 15 insertions(+), 10 deletions(-)
>
Applied it.
Thanks,
Chanwoo Choi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-19 4:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-18 21:42 [PATCH] extcon: arizona: Use power efficient workqueue Mark Brown
2013-07-19 4:56 ` Chanwoo Choi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox