All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: tps65010: Use power efficient workqueue for power polling
@ 2013-08-09 17:25 Mark Brown
  2013-08-12 16:33 ` Lee Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2013-08-09 17:25 UTC (permalink / raw)
  To: Samuel Ortiz, Lee Jones; +Cc: linux-kernel, linaro-kernel, Mark Brown

From: Mark Brown <broonie@linaro.org>

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>
---
 drivers/mfd/tps65010.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c
index 4d67692..8114567 100644
--- a/drivers/mfd/tps65010.c
+++ b/drivers/mfd/tps65010.c
@@ -242,8 +242,8 @@ static int dbg_show(struct seq_file *s, void *_)
 	seq_printf(s, "mask2     %s\n", buf);
 	/* ignore ackint2 */
 
-	schedule_delayed_work(&tps->work, POWER_POLL_DELAY);
-
+	queue_delayed_work(system_power_efficient_wq, &tps->work,
+			   POWER_POLL_DELAY);
 
 	/* VMAIN voltage, enable lowpower, etc */
 	value = i2c_smbus_read_byte_data(tps->client, TPS_VDCDC1);
@@ -400,7 +400,8 @@ static void tps65010_interrupt(struct tps65010 *tps)
 			&& (tps->chgstatus & (TPS_CHG_USB|TPS_CHG_AC)))
 		poll = 1;
 	if (poll)
-		schedule_delayed_work(&tps->work, POWER_POLL_DELAY);
+		queue_delayed_work(system_power_efficient_wq, &tps->work,
+				   POWER_POLL_DELAY);
 
 	/* also potentially gpio-in rise or fall */
 }
@@ -448,7 +449,7 @@ static irqreturn_t tps65010_irq(int irq, void *_tps)
 
 	disable_irq_nosync(irq);
 	set_bit(FLAG_IRQ_ENABLE, &tps->flags);
-	schedule_delayed_work(&tps->work, 0);
+	queue_delayed_work(system_power_efficient_wq, &tps->work, 0);
 	return IRQ_HANDLED;
 }
 
@@ -718,7 +719,8 @@ int tps65010_set_vbus_draw(unsigned mA)
 			&& test_and_set_bit(
 				FLAG_VBUS_CHANGED, &the_tps->flags)) {
 		/* gadget drivers call this in_irq() */
-		schedule_delayed_work(&the_tps->work, 0);
+		queue_delayed_work(system_power_efficient_wq, &the_tps->work,
+				   0);
 	}
 	local_irq_restore(flags);
 
-- 
1.8.4.rc1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd: tps65010: Use power efficient workqueue for power polling
  2013-08-09 17:25 [PATCH] mfd: tps65010: Use power efficient workqueue for power polling Mark Brown
@ 2013-08-12 16:33 ` Lee Jones
  2013-08-12 17:05   ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Lee Jones @ 2013-08-12 16:33 UTC (permalink / raw)
  To: Mark Brown; +Cc: Samuel Ortiz, linux-kernel, linaro-kernel, Mark Brown

On Fri, 09 Aug 2013, Mark Brown wrote:

> From: Mark Brown <broonie@linaro.org>
> 
> 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>
> ---
>  drivers/mfd/tps65010.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

I'm going to apply the patch and ...

> -		schedule_delayed_work(&the_tps->work, 0);
> +		queue_delayed_work(system_power_efficient_wq, &the_tps->work,
> +				   0);

... move this back up onto the line above, if it's all the same to you?

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd: tps65010: Use power efficient workqueue for power polling
  2013-08-12 16:33 ` Lee Jones
@ 2013-08-12 17:05   ` Mark Brown
       [not found]     ` <CAF2Aj3i3ZCt4Eimp5-4tGnFEAL6gruf+MuH7qEbWezTnfugiqg@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2013-08-12 17:05 UTC (permalink / raw)
  To: Lee Jones; +Cc: Samuel Ortiz, linux-kernel, linaro-kernel

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

On Mon, Aug 12, 2013 at 05:33:24PM +0100, Lee Jones wrote:
> On Fri, 09 Aug 2013, Mark Brown wrote:

> > -		schedule_delayed_work(&the_tps->work, 0);
> > +		queue_delayed_work(system_power_efficient_wq, &the_tps->work,
> > +				   0);

> ... move this back up onto the line above, if it's all the same to you?

If you do that it'll go over 80 columns, the ',' is the 78th character
already.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd: tps65010: Use power efficient workqueue for power polling
       [not found]     ` <CAF2Aj3i3ZCt4Eimp5-4tGnFEAL6gruf+MuH7qEbWezTnfugiqg@mail.gmail.com>
@ 2013-08-12 20:43       ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-08-12 20:43 UTC (permalink / raw)
  To: Lee Jones; +Cc: linaro-kernel, linux-kernel, Samuel Ortiz

[-- Attachment #1: Type: text/plain, Size: 603 bytes --]

On Mon, Aug 12, 2013 at 08:57:54PM +0100, Lee Jones wrote:
> Right, I know checkpatch.pl will complain, but one must exercise some
> common sense in situations such at these. To bring down a single zero for
> the sake of the (in my opinion, slightly out of date) 80 char rule seems a
> little rigid.
> 
> If you feel strongly enough I'll keep your patch in tact however.

Please do.  Lots of people do continue to use 80 column editors and mail
clients and as you say the tooling complains.  It's one thing if it's
hard to find a place to break the line but that's really not the case
here.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-12 20:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-09 17:25 [PATCH] mfd: tps65010: Use power efficient workqueue for power polling Mark Brown
2013-08-12 16:33 ` Lee Jones
2013-08-12 17:05   ` Mark Brown
     [not found]     ` <CAF2Aj3i3ZCt4Eimp5-4tGnFEAL6gruf+MuH7qEbWezTnfugiqg@mail.gmail.com>
2013-08-12 20:43       ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.