Re: [PATCH] i2c-i801: Consolidate polling

2012-07-04 Thread Jean Delvare
On Wed, 4 Jul 2012 16:08:25 +0800, Daniel Kurtz wrote: > On Wed, Jul 4, 2012 at 3:49 PM, Jean Delvare wrote: > > On Wed, 4 Jul 2012 14:12:26 +0800, Daniel Kurtz wrote: > >> On Tue, Jul 3, 2012 at 9:39 PM, Jean Delvare wrote: > >> > @@ -272,7 +272,7 @@ static int i801_wait_intr(struct i801_pr > >>

Re: [PATCH] i2c-i801: Consolidate polling

2012-07-04 Thread Daniel Kurtz
On Wed, Jul 4, 2012 at 3:49 PM, Jean Delvare wrote: > Hi Daniel, > > Thanks again for the continued feedback. > > On Wed, 4 Jul 2012 14:12:26 +0800, Daniel Kurtz wrote: >> On Tue, Jul 3, 2012 at 9:39 PM, Jean Delvare wrote: >> > On Tue, 3 Jul 2012 17:50:13 +0800, Daniel Kurtz wrote: >> > > On Tue

Re: [PATCH] i2c-i801: Consolidate polling

2012-07-04 Thread Jean Delvare
Hi Daniel, Thanks again for the continued feedback. On Wed, 4 Jul 2012 14:12:26 +0800, Daniel Kurtz wrote: > On Tue, Jul 3, 2012 at 9:39 PM, Jean Delvare wrote: > > On Tue, 3 Jul 2012 17:50:13 +0800, Daniel Kurtz wrote: > > > On Tue, Jul 3, 2012 at 4:19 PM, Jean Delvare wrote: > > > > -/* wait

Re: [PATCH] i2c-i801: Consolidate polling

2012-07-03 Thread Daniel Kurtz
On Tue, Jul 3, 2012 at 9:39 PM, Jean Delvare wrote: > > Hi Daniel, > > Thanks for the feedback. > > On Tue, 3 Jul 2012 17:50:13 +0800, Daniel Kurtz wrote: > > On Tue, Jul 3, 2012 at 4:19 PM, Jean Delvare wrote: > > > > > > Come up with a consistent, driver-wide strategy for event polling. For > >

Re: [PATCH] i2c-i801: Consolidate polling

2012-07-03 Thread Jean Delvare
Hi Daniel, Thanks for the feedback. On Tue, 3 Jul 2012 17:50:13 +0800, Daniel Kurtz wrote: > On Tue, Jul 3, 2012 at 4:19 PM, Jean Delvare wrote: > > > > Come up with a consistent, driver-wide strategy for event polling. For > > intermediate steps of byte-by-byte block transactions, check for > >

Re: [PATCH] i2c-i801: Consolidate polling

2012-07-03 Thread Jean Delvare
On Tue, 3 Jul 2012 10:19:27 +0200, Jean Delvare wrote: > It may be possible to combine i801_wait_intr() and > i801_wait_byte_done() into a single function, as they do pretty much > the same, but I'll only do that if it doesn't hurt readability. My > first attempt was horrible. This could look as f

Re: [PATCH] i2c-i801: Consolidate polling

2012-07-03 Thread Daniel Kurtz
On Tue, Jul 3, 2012 at 4:19 PM, Jean Delvare wrote: > > Come up with a consistent, driver-wide strategy for event polling. For > intermediate steps of byte-by-byte block transactions, check for > BYTE_DONE or any error flag being set. At the end of every transaction, > check for both BUSY being cl

[PATCH] i2c-i801: Consolidate polling

2012-07-03 Thread Jean Delvare
Come up with a consistent, driver-wide strategy for event polling. For intermediate steps of byte-by-byte block transactions, check for BYTE_DONE or any error flag being set. At the end of every transaction, check for both BUSY being cleared and INTR or any error flag being set. This avoids having