[PATCH] i2c: omap: Move the remove constraint

Subsystems: i2c subsystem, i2c subsystem host drivers, omap i2c driver, omap1 support, omap2+ support, the rest

STALE5010d

5 messages, 3 authors, 2012-11-14 · open the first message on its own page

[PATCH] i2c: omap: Move the remove constraint

From: Shubhrajyoti D <hidden>
Date: 2012-11-06 09:54:33

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 <redacted>
---
 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

[PATCH] i2c: omap: Move the remove constraint

From: Jean Pihet <hidden>
Date: 2012-11-06 16:24:34

Hi Shubhrajyoti,

On Tue, Nov 6, 2012 at 10:54 AM, Shubhrajyoti D [off-list ref] 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 <redacted>
Good catch, the change definitely makes sense. Feel free to add:

Acked-by: Jean Pihet <redacted>

Thanks,
Jean.
quoted hunk
---
 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

[PATCH] i2c: omap: Move the remove constraint

From: Wolfram Sang <hidden>
Date: 2012-11-14 10:57:34

quoted
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 <redacted>
Good catch, the change definitely makes sense. Feel free to add:

Acked-by: Jean Pihet <redacted>
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>

[PATCH] i2c: omap: Move the remove constraint

From: Jean Pihet <hidden>
Date: 2012-11-14 11:03:35

Hi Wolfram, Shubhrajyoti,

On Wed, Nov 14, 2012 at 11:57 AM, Wolfram Sang [off-list ref] wrote:
quoted
quoted
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 <redacted>
Good catch, the change definitely makes sense. Feel free to add:

Acked-by: Jean Pihet <redacted>
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/  |

[PATCH] i2c: omap: Move the remove constraint

From: Shubhrajyoti <hidden>
Date: 2012-11-14 11:25:34

On Wednesday 14 November 2012 04:33 PM, Jean Pihet wrote:
quoted
quoted
Acked-by: Jean Pihet <redacted>

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help