All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: omap: Move the remove constraint
@ 2012-11-06  9:54 ` Shubhrajyoti D
  0 siblings, 0 replies; 10+ messages in thread
From: Shubhrajyoti D @ 2012-11-06  9:54 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-i2c, linux-arm-kernel, ben-linux, tony, b-cousson, w.sang,
	Shubhrajyoti D

Currently we just queue the transfer and release the
qos constraints, however we donot wait for the transfer
to complete to release the constraint. Move the remove
constraint after the bus busy as we are sure that the
transfers are completed by then.

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
 drivers/i2c/busses/i2c-omap.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 94ff685..8b079d7 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -655,13 +655,13 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 			break;
 	}
 
-	if (dev->latency)
-		pm_qos_remove_request(&dev->pm_qos_request);
-
 	if (r == 0)
 		r = num;
 
 	omap_i2c_wait_for_bb(dev);
+
+	if (dev->latency)
+		pm_qos_remove_request(&dev->pm_qos_request);
 out:
 	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
-- 
1.7.5.4


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

* [PATCH] i2c: omap: Move the remove constraint
@ 2012-11-06  9:54 ` Shubhrajyoti D
  0 siblings, 0 replies; 10+ messages in thread
From: Shubhrajyoti D @ 2012-11-06  9:54 UTC (permalink / raw)
  To: linux-arm-kernel

Currently we just queue the transfer and release the
qos constraints, however we donot wait for the transfer
to complete to release the constraint. Move the remove
constraint after the bus busy as we are sure that the
transfers are completed by then.

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
 drivers/i2c/busses/i2c-omap.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 94ff685..8b079d7 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -655,13 +655,13 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 			break;
 	}
 
-	if (dev->latency)
-		pm_qos_remove_request(&dev->pm_qos_request);
-
 	if (r == 0)
 		r = num;
 
 	omap_i2c_wait_for_bb(dev);
+
+	if (dev->latency)
+		pm_qos_remove_request(&dev->pm_qos_request);
 out:
 	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
-- 
1.7.5.4

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

* Re: [PATCH] i2c: omap: Move the remove constraint
  2012-11-06  9:54 ` Shubhrajyoti D
@ 2012-11-06 16:24     ` Jean Pihet
  -1 siblings, 0 replies; 10+ messages in thread
From: Jean Pihet @ 2012-11-06 16:24 UTC (permalink / raw)
  To: Shubhrajyoti D
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	b-cousson-l0cyMroinI0, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ

Hi Shubhrajyoti,

On Tue, Nov 6, 2012 at 10:54 AM, Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org> wrote:
> Currently we just queue the transfer and release the
> qos constraints, however we donot wait for the transfer
> to complete to release the constraint. Move the remove
> constraint after the bus busy as we are sure that the
> transfers are completed by then.
>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>

Good catch, the change definitely makes sense. Feel free to add:

Acked-by: Jean Pihet <j-pihet-l0cyMroinI0@public.gmane.org>

Thanks,
Jean.

> ---
>  drivers/i2c/busses/i2c-omap.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 94ff685..8b079d7 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -655,13 +655,13 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
>                         break;
>         }
>
> -       if (dev->latency)
> -               pm_qos_remove_request(&dev->pm_qos_request);
> -
>         if (r == 0)
>                 r = num;
>
>         omap_i2c_wait_for_bb(dev);
> +
> +       if (dev->latency)
> +               pm_qos_remove_request(&dev->pm_qos_request);
>  out:
>         pm_runtime_mark_last_busy(dev->dev);
>         pm_runtime_put_autosuspend(dev->dev);
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] i2c: omap: Move the remove constraint
@ 2012-11-06 16:24     ` Jean Pihet
  0 siblings, 0 replies; 10+ messages in thread
From: Jean Pihet @ 2012-11-06 16:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Shubhrajyoti,

On Tue, Nov 6, 2012 at 10:54 AM, Shubhrajyoti D <shubhrajyoti@ti.com> wrote:
> Currently we just queue the transfer and release the
> qos constraints, however we donot wait for the transfer
> to complete to release the constraint. Move the remove
> constraint after the bus busy as we are sure that the
> transfers are completed by then.
>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>

Good catch, the change definitely makes sense. Feel free to add:

Acked-by: Jean Pihet <j-pihet@ti.com>

Thanks,
Jean.

> ---
>  drivers/i2c/busses/i2c-omap.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 94ff685..8b079d7 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -655,13 +655,13 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
>                         break;
>         }
>
> -       if (dev->latency)
> -               pm_qos_remove_request(&dev->pm_qos_request);
> -
>         if (r == 0)
>                 r = num;
>
>         omap_i2c_wait_for_bb(dev);
> +
> +       if (dev->latency)
> +               pm_qos_remove_request(&dev->pm_qos_request);
>  out:
>         pm_runtime_mark_last_busy(dev->dev);
>         pm_runtime_put_autosuspend(dev->dev);
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] i2c: omap: Move the remove constraint
  2012-11-06 16:24     ` Jean Pihet
@ 2012-11-14 10:57       ` Wolfram Sang
  -1 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2012-11-14 10:57 UTC (permalink / raw)
  To: Jean Pihet
  Cc: Shubhrajyoti D, linux-omap, linux-i2c, linux-arm-kernel,
	ben-linux, tony, b-cousson

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


> > Currently we just queue the transfer and release the
> > qos constraints, however we donot wait for the transfer
> > to complete to release the constraint. Move the remove
> > constraint after the bus busy as we are sure that the
> > transfers are completed by then.
> >
> > Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
> 
> Good catch, the change definitely makes sense. Feel free to add:
> 
> Acked-by: Jean Pihet <j-pihet@ti.com>

Since I just reverted the QoS patch, I suppose this gets merged into the
original patch when resent?

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

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

* [PATCH] i2c: omap: Move the remove constraint
@ 2012-11-14 10:57       ` Wolfram Sang
  0 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2012-11-14 10:57 UTC (permalink / raw)
  To: linux-arm-kernel


> > Currently we just queue the transfer and release the
> > qos constraints, however we donot wait for the transfer
> > to complete to release the constraint. Move the remove
> > constraint after the bus busy as we are sure that the
> > transfers are completed by then.
> >
> > Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
> 
> Good catch, the change definitely makes sense. Feel free to add:
> 
> Acked-by: Jean Pihet <j-pihet@ti.com>

Since I just reverted the QoS patch, I suppose this gets merged into the
original patch when resent?

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121114/8507c2cb/attachment-0001.sig>

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

* Re: [PATCH] i2c: omap: Move the remove constraint
  2012-11-14 10:57       ` Wolfram Sang
@ 2012-11-14 11:03           ` Jean Pihet
  -1 siblings, 0 replies; 10+ messages in thread
From: Jean Pihet @ 2012-11-14 11:03 UTC (permalink / raw)
  To: Wolfram Sang, Shubhrajyoti D
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	b-cousson-l0cyMroinI0

Hi Wolfram, Shubhrajyoti,

On Wed, Nov 14, 2012 at 11:57 AM, Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote:
>
>> > Currently we just queue the transfer and release the
>> > qos constraints, however we donot wait for the transfer
>> > to complete to release the constraint. Move the remove
>> > constraint after the bus busy as we are sure that the
>> > transfers are completed by then.
>> >
>> > Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
>>
>> Good catch, the change definitely makes sense. Feel free to add:
>>
>> Acked-by: Jean Pihet <j-pihet-l0cyMroinI0@public.gmane.org>
>
> Since I just reverted the QoS patch, I suppose this gets merged into the
> original patch when resent?
The best for now is to re-submit a new patch that moves the constraint
release in the original code. Later the PM QoS patch will be applied
on the new code base.

What do you think? I can provide a patch if needed.

Regards,
Jean

>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* [PATCH] i2c: omap: Move the remove constraint
@ 2012-11-14 11:03           ` Jean Pihet
  0 siblings, 0 replies; 10+ messages in thread
From: Jean Pihet @ 2012-11-14 11:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Wolfram, Shubhrajyoti,

On Wed, Nov 14, 2012 at 11:57 AM, Wolfram Sang <w.sang@pengutronix.de> wrote:
>
>> > Currently we just queue the transfer and release the
>> > qos constraints, however we donot wait for the transfer
>> > to complete to release the constraint. Move the remove
>> > constraint after the bus busy as we are sure that the
>> > transfers are completed by then.
>> >
>> > Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
>>
>> Good catch, the change definitely makes sense. Feel free to add:
>>
>> Acked-by: Jean Pihet <j-pihet@ti.com>
>
> Since I just reverted the QoS patch, I suppose this gets merged into the
> original patch when resent?
The best for now is to re-submit a new patch that moves the constraint
release in the original code. Later the PM QoS patch will be applied
on the new code base.

What do you think? I can provide a patch if needed.

Regards,
Jean

>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* Re: [PATCH] i2c: omap: Move the remove constraint
  2012-11-14 11:03           ` Jean Pihet
@ 2012-11-14 11:25               ` Shubhrajyoti
  -1 siblings, 0 replies; 10+ messages in thread
From: Shubhrajyoti @ 2012-11-14 11:25 UTC (permalink / raw)
  To: Jean Pihet
  Cc: Wolfram Sang, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	b-cousson-l0cyMroinI0

On Wednesday 14 November 2012 04:33 PM, Jean Pihet wrote:
>>> Acked-by: Jean Pihet <j-pihet-l0cyMroinI0@public.gmane.org>
>> >
>> > Since I just reverted the QoS patch, I suppose this gets merged into the
>> > original patch when resent?
> The best for now is to re-submit a new patch that moves the constraint
> release in the original code. Later the PM QoS patch will be applied
> on the new code base.
>
> What do you think? I can provide a patch if needed.
Will resubmit this.

> Regards,
> Jean
>

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

* [PATCH] i2c: omap: Move the remove constraint
@ 2012-11-14 11:25               ` Shubhrajyoti
  0 siblings, 0 replies; 10+ messages in thread
From: Shubhrajyoti @ 2012-11-14 11:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 14 November 2012 04:33 PM, Jean Pihet wrote:
>>> Acked-by: Jean Pihet <j-pihet@ti.com>
>> >
>> > Since I just reverted the QoS patch, I suppose this gets merged into the
>> > original patch when resent?
> The best for now is to re-submit a new patch that moves the constraint
> release in the original code. Later the PM QoS patch will be applied
> on the new code base.
>
> What do you think? I can provide a patch if needed.
Will resubmit this.

> Regards,
> Jean
>

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

end of thread, other threads:[~2012-11-14 11:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-06  9:54 [PATCH] i2c: omap: Move the remove constraint Shubhrajyoti D
2012-11-06  9:54 ` Shubhrajyoti D
     [not found] ` <1352195673-31559-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-11-06 16:24   ` Jean Pihet
2012-11-06 16:24     ` Jean Pihet
2012-11-14 10:57     ` Wolfram Sang
2012-11-14 10:57       ` Wolfram Sang
     [not found]       ` <20121114105734.GE5954-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-11-14 11:03         ` Jean Pihet
2012-11-14 11:03           ` Jean Pihet
     [not found]           ` <CAORVsuUxA=AhPowWqTWx5AfzU6R2Ny6OEhvDmtwUh8poh=UnGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-14 11:25             ` Shubhrajyoti
2012-11-14 11:25               ` Shubhrajyoti

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.