Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

power: supply: axp20x_usb_power: Use power efficient workqueue for debounce

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.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

authored by

Yangtao Li and committed by
Sebastian Reichel
0dd713ef fbda05f7

+4 -4
+4 -4
drivers/power/supply/axp20x_usb_power.c
··· 92 92 93 93 power_supply_changed(power->supply); 94 94 95 - mod_delayed_work(system_wq, &power->vbus_detect, DEBOUNCE_TIME); 95 + mod_delayed_work(system_power_efficient_wq, &power->vbus_detect, DEBOUNCE_TIME); 96 96 97 97 return IRQ_HANDLED; 98 98 } ··· 117 117 118 118 out: 119 119 if (axp20x_usb_vbus_needs_polling(power)) 120 - mod_delayed_work(system_wq, &power->vbus_detect, DEBOUNCE_TIME); 120 + mod_delayed_work(system_power_efficient_wq, &power->vbus_detect, DEBOUNCE_TIME); 121 121 } 122 122 123 123 static int axp20x_get_current_max(struct axp20x_usb_power *power, int *val) ··· 525 525 while (i < power->num_irqs) 526 526 enable_irq(power->irqs[i++]); 527 527 528 - mod_delayed_work(system_wq, &power->vbus_detect, DEBOUNCE_TIME); 528 + mod_delayed_work(system_power_efficient_wq, &power->vbus_detect, DEBOUNCE_TIME); 529 529 530 530 return 0; 531 531 } ··· 647 647 648 648 INIT_DELAYED_WORK(&power->vbus_detect, axp20x_usb_power_poll_vbus); 649 649 if (axp20x_usb_vbus_needs_polling(power)) 650 - queue_delayed_work(system_wq, &power->vbus_detect, 0); 650 + queue_delayed_work(system_power_efficient_wq, &power->vbus_detect, 0); 651 651 652 652 return 0; 653 653 }