linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3] i2c: omap: Move the remove constraint
@ 2012-11-15  8:49 Shubhrajyoti D
  2012-11-16 14:20 ` Wolfram Sang
  0 siblings, 1 reply; 3+ messages in thread
From: Shubhrajyoti D @ 2012-11-15  8:49 UTC (permalink / raw)
  To: linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg, balbi-l0cyMroinI0,
	w.sang-bIcnvbaLZ9MEGnE8C9+IrQ, Shubhrajyoti D

Currently we just queue the transfer and release the
qos constraints, however we do not 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.

Acked-by: Jean Pihet <j-pihet-l0cyMroinI0@public.gmane.org>
Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
---
v2: rebase to the for-next branch
v3: Fix a typo

 drivers/i2c/busses/i2c-omap.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 482c63d..fabcbe1 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -654,13 +654,14 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 			break;
 	}
 
-	if (dev->set_mpu_wkup_lat != NULL)
-		dev->set_mpu_wkup_lat(dev->dev, -1);
-
 	if (r == 0)
 		r = num;
 
 	omap_i2c_wait_for_bb(dev);
+
+	if (dev->set_mpu_wkup_lat != NULL)
+		dev->set_mpu_wkup_lat(dev->dev, -1);
+
 out:
 	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
-- 
1.7.5.4

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

* Re: [PATCHv3] i2c: omap: Move the remove constraint
  2012-11-15  8:49 [PATCHv3] i2c: omap: Move the remove constraint Shubhrajyoti D
@ 2012-11-16 14:20 ` Wolfram Sang
       [not found]   ` <20121116142006.GG7313-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2012-11-16 14:20 UTC (permalink / raw)
  To: Shubhrajyoti D; +Cc: linux-omap, linux-i2c, linux-arm-kernel, ben-linux, balbi

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

On Thu, Nov 15, 2012 at 02:19:21PM +0530, Shubhrajyoti D wrote:
> Currently we just queue the transfer and release the
> qos constraints, however we do not 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.
> 
> Acked-by: Jean Pihet <j-pihet@ti.com>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>

Applied to for-next. Please let me know if it should go to for-current.

-- 
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] 3+ messages in thread

* Re: [PATCHv3] i2c: omap: Move the remove constraint
       [not found]   ` <20121116142006.GG7313-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2012-11-17 17:45     ` Shubhrajyoti Datta
  0 siblings, 0 replies; 3+ messages in thread
From: Shubhrajyoti Datta @ 2012-11-17 17:45 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Shubhrajyoti D, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg, balbi-l0cyMroinI0

On Fri, Nov 16, 2012 at 7:50 PM, Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote:
> On Thu, Nov 15, 2012 at 02:19:21PM +0530, Shubhrajyoti D wrote:
>> Currently we just queue the transfer and release the
>> qos constraints, however we do not 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.
>>
>> Acked-by: Jean Pihet <j-pihet-l0cyMroinI0@public.gmane.org>
>> Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
>
> Applied to for-next. Please let me know if it should go to for-current.

I feel for-next should be fine.

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

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-15  8:49 [PATCHv3] i2c: omap: Move the remove constraint Shubhrajyoti D
2012-11-16 14:20 ` Wolfram Sang
     [not found]   ` <20121116142006.GG7313-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-11-17 17:45     ` Shubhrajyoti Datta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).