aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-09 13:25:02 -0400
committerLee Jones <lee.jones@linaro.org>2013-08-14 13:55:12 -0400
commitbb3d5934201607d8514c9a481bd68b2bd9e5510d (patch)
tree66d317798f914ff50f5b34f7928fd5e5be1d8eed
parentc1d33b1b188ccf70e5c9526fa293cbc783245eee (diff)
mfd: tps65010: Use power efficient workqueue for power polling
There is no need to use a per CPU workqueue to poll, especially with the 5s delay used, so allow the scheduler to use any CPU. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/tps65010.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c
index 4d6769268739..8114567e0695 100644
--- a/drivers/mfd/tps65010.c
+++ b/drivers/mfd/tps65010.c
@@ -242,8 +242,8 @@ static int dbg_show(struct seq_file *s, void *_)
242 seq_printf(s, "mask2 %s\n", buf); 242 seq_printf(s, "mask2 %s\n", buf);
243 /* ignore ackint2 */ 243 /* ignore ackint2 */
244 244
245 schedule_delayed_work(&tps->work, POWER_POLL_DELAY); 245 queue_delayed_work(system_power_efficient_wq, &tps->work,
246 246 POWER_POLL_DELAY);
247 247
248 /* VMAIN voltage, enable lowpower, etc */ 248 /* VMAIN voltage, enable lowpower, etc */
249 value = i2c_smbus_read_byte_data(tps->client, TPS_VDCDC1); 249 value = i2c_smbus_read_byte_data(tps->client, TPS_VDCDC1);
@@ -400,7 +400,8 @@ static void tps65010_interrupt(struct tps65010 *tps)
400 && (tps->chgstatus & (TPS_CHG_USB|TPS_CHG_AC))) 400 && (tps->chgstatus & (TPS_CHG_USB|TPS_CHG_AC)))
401 poll = 1; 401 poll = 1;
402 if (poll) 402 if (poll)
403 schedule_delayed_work(&tps->work, POWER_POLL_DELAY); 403 queue_delayed_work(system_power_efficient_wq, &tps->work,
404 POWER_POLL_DELAY);
404 405
405 /* also potentially gpio-in rise or fall */ 406 /* also potentially gpio-in rise or fall */
406} 407}
@@ -448,7 +449,7 @@ static irqreturn_t tps65010_irq(int irq, void *_tps)
448 449
449 disable_irq_nosync(irq); 450 disable_irq_nosync(irq);
450 set_bit(FLAG_IRQ_ENABLE, &tps->flags); 451 set_bit(FLAG_IRQ_ENABLE, &tps->flags);
451 schedule_delayed_work(&tps->work, 0); 452 queue_delayed_work(system_power_efficient_wq, &tps->work, 0);
452 return IRQ_HANDLED; 453 return IRQ_HANDLED;
453} 454}
454 455
@@ -718,7 +719,8 @@ int tps65010_set_vbus_draw(unsigned mA)
718 && test_and_set_bit( 719 && test_and_set_bit(
719 FLAG_VBUS_CHANGED, &the_tps->flags)) { 720 FLAG_VBUS_CHANGED, &the_tps->flags)) {
720 /* gadget drivers call this in_irq() */ 721 /* gadget drivers call this in_irq() */
721 schedule_delayed_work(&the_tps->work, 0); 722 queue_delayed_work(system_power_efficient_wq, &the_tps->work,
723 0);
722 } 724 }
723 local_irq_restore(flags); 725 local_irq_restore(flags);
724 726