Skip to contentSkip to conversation

extcon: gpio: Use power efficient workqueue for debounce

PATCH In review Mark Brown 3 participants 5 messages Jul 19, 2013 – Jul 24, 2013 External connector subsystem (extcon)

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/2 extcon: gpio: Use power efficient workqueue for debounce

From: Mark Brown <[email protected]>

The debounce timeout is generally quite long and the work not performance critical so allow the scheduler to run the work anywhere rather than in the normal per-CPU workqueue.

---
 drivers/extcon/extcon-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-gpio.c +1 -1
index 02bec32..f874c30 100644
@@ -56,7 +56,7 @@ static irqreturn_t gpio_irq_handler(int irq, void *dev_id)
 {
 	struct gpio_extcon_data *extcon_data = dev_id;
 
-	schedule_delayed_work(&extcon_data->work,
+	queue_delayed_work(system_power_efficient_wq, &extcon_data->work,
 			      extcon_data->debounce_jiffies);
 	return IRQ_HANDLED;
 }
Signature · 1 line
1.8.3.2
author
#1 lore raw

PATCH 2/2 extcon: adc-jack: Use power efficient workqueue

From: Mark Brown <[email protected]>

The debounce timeout is generally quite long and the work not performance critical so allow the scheduler to run the work anywhere rather than in the normal per-CPU workqueue.

---
 drivers/extcon/extcon-adc-jack.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/extcon/extcon-adc-jack.c +2 -1
index d0233cd..5985807 100644
@@ -87,7 +87,8 @@ static irqreturn_t adc_jack_irq_thread(int irq, void *_data)
 {
 	struct adc_jack_data *data = _data;
 
-	schedule_delayed_work(&data->handler, data->handling_delay);
+	queue_delayed_work(system_power_efficient_wq,
+			   &data->handler, data->handling_delay);
 	return IRQ_HANDLED;
 }
 
Signature · 1 line
1.8.3.2
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] extcon: adc-jack: Use power efficient workqueue

Quoted 10 lines · Mark Brown

From: Mark Brown <[email protected]>

The debounce timeout is generally quite long and the work not performance critical so allow the scheduler to run the work anywhere rather than in the normal per-CPU workqueue.

---
 drivers/extcon/extcon-adc-jack.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Acked-by on v1 1/2
#3 lore raw
In reply to Mark Brown
Quoted 10 lines · Mark Brown

From: Mark Brown <[email protected]>

The debounce timeout is generally quite long and the work not performance critical so allow the scheduler to run the work anywhere rather than in the normal per-CPU workqueue.

---
 drivers/extcon/extcon-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
maintainer
#4 lore raw

Hi Mark,

Quoted 7 lines · Viresh Kumar
Quoted 6 lines · Mark Brown

From: Mark Brown <[email protected]>

The debounce timeout is generally quite long and the work not performance critical so allow the scheduler to run the work anywhere rather than in the normal per-CPU workqueue.

Quoted 7 lines
Quoted 4 lines
---
 drivers/extcon/extcon-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This patchset is applied.

Thanks,
Chanwoo Choi