Re: I2C retries

2018-08-31 Thread will sanfilippo
I do not think a driver requires an os device personally. You could write a driver that does not have os dev functionality in it. I do agree that it seems most people implement drivers with os dev functionality but I do not think it is a requirement. > On Aug 31, 2018, at 9:51 AM, Christopher

Re: I2C retries

2018-08-30 Thread Christopher Collins
On Thu, Aug 30, 2018 at 11:35:44AM -0700, Vipul Rahane wrote: > Hey, > > I think that’s a really great idea. One thing I would add is that we > definitely should honor timeouts in any of the retries. Also, a way to > disable the retries should be a good idea. Probably making it a syscfg > which

Re: I2C retries

2018-08-30 Thread Vipul Rahane
Sorry, just read Will’s comment. Did not want to repeat it. - Vipul > On Aug 30, 2018, at 11:35 AM, Vipul Rahane wrote: > > Hey, > > I think that’s a really great idea. One thing I would add is that we > definitely should honor timeouts in any of the retries. Also, a way to > disable the

Re: I2C retries

2018-08-30 Thread Vipul Rahane
Hey, I think that’s a really great idea. One thing I would add is that we definitely should honor timeouts in any of the retries. Also, a way to disable the retries should be a good idea. Probably making it a syscfg which when set to 0 does not do any retries. I am assuming the errors codes

Re: I2C retries

2018-08-30 Thread Christopher Collins
On Thu, Aug 30, 2018 at 09:48:32AM -0700, will sanfilippo wrote: > I think my only comment is tries vs retries. You always want to make > at least one try so you would have to set that to 1 every time right? > I like retries personally but that is just me. Mainly because you > would never allow

Re: I2C retries

2018-08-30 Thread Christopher Collins
On Thu, Aug 30, 2018 at 07:47:34PM +0300, marko kiiskila wrote: > > On Aug 30, 2018, at 7:21 PM, Christopher Collins wrote: > > [1] We should do the same for the other HAL APIs (i.e., non-I2C), but > > that can come later. > > Not sure this makes sense for other ones, as i2c is the only one with

Re: I2C retries

2018-08-30 Thread marko kiiskila
> On Aug 30, 2018, at 7:21 PM, Christopher Collins wrote: > > On Wed, Aug 29, 2018 at 10:06:37PM -0500, Greg Stein wrote: >> On Wed, Aug 29, 2018 at 8:59 PM Christopher Collins >> wrote: >> >>> Hello all, >>> >>> I noticed the HAL master I2C API does not include any retry logic. As >>>

Re: I2C retries

2018-08-29 Thread Greg Stein
On Wed, Aug 29, 2018 at 8:59 PM Christopher Collins wrote: > Hello all, > > I noticed the HAL master I2C API does not include any retry logic. As > you probably know, in I2C, the default state of the SCL line is NACK. > Euh... ACK/NACK is on SDA while the master cycles SCL. > This means an

Re: I2C retries

2018-08-29 Thread Jacob Rosenthal
Just a note most of the sensors and drivers have clumsy repeat attempts and timeouts in their init usually on whoami query that could be cleaned up with something like this On Wed, Aug 29, 2018, 6:59 PM Christopher Collins wrote: > Hello all, > > I noticed the HAL master I2C API does not