Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-10-17 Thread Matthijs van Duin
On 14 October 2016 at 09:56, Ravikumar wrote: > Dynamic switching on OMAP I2C IP could be a difficult task. In fact I wouldn't even bother trying. The thread I linked to received some follow-up by someone wrestling with this and it actually resulted in the suggestion to use

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-10-17 Thread Matthijs van Duin
On 14 October 2016 at 09:56, Ravikumar wrote: > Dynamic switching on OMAP I2C IP could be a difficult task. In fact I wouldn't even bother trying. The thread I linked to received some follow-up by someone wrestling with this and it actually resulted in the suggestion to use separate master-only

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-10-14 Thread Ravikumar
On Monday 29 August 2016 09:13 AM, Matthijs van Duin wrote: On 28 August 2016 at 07:35, Wolfram Sang wrote: Well, I2C is simple, what could go wrong? :/ Actually I2C is elegant and *seems* simple, but in all its asynchronicity there are actually a surprising number of

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-10-14 Thread Ravikumar
On Monday 29 August 2016 09:13 AM, Matthijs van Duin wrote: On 28 August 2016 at 07:35, Wolfram Sang wrote: Well, I2C is simple, what could go wrong? :/ Actually I2C is elegant and *seems* simple, but in all its asynchronicity there are actually a surprising number of fine details you can

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-10-14 Thread Ravikumar
On Saturday 27 August 2016 07:29 PM, Matthijs van Duin wrote: Greetings, unfortunate souls trying to use the omap-i2c peripheral in slave mode! :-) That would be me :( and greetings to you too :) I recently posted some stuff about exactly that topic on TI's E2E forum, you may want to read

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-10-14 Thread Ravikumar
On Saturday 27 August 2016 07:29 PM, Matthijs van Duin wrote: Greetings, unfortunate souls trying to use the omap-i2c peripheral in slave mode! :-) That would be me :( and greetings to you too :) I recently posted some stuff about exactly that topic on TI's E2E forum, you may want to read

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-10-14 Thread Ravikumar
On Thursday 25 August 2016 10:44 PM, Wolfram Sang wrote: Hi, The omap i2c controller (at least on dra7x devices) doesn't have start/stop (STT/STP) support for slave mode so event #5 is not implemented in the driver. I think you can deduce that. If a new {READ|WRITE}_REQUESTED slave event

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-10-14 Thread Ravikumar
On Thursday 25 August 2016 10:44 PM, Wolfram Sang wrote: Hi, The omap i2c controller (at least on dra7x devices) doesn't have start/stop (STT/STP) support for slave mode so event #5 is not implemented in the driver. I think you can deduce that. If a new {READ|WRITE}_REQUESTED slave event

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-08-28 Thread Matthijs van Duin
On 28 August 2016 at 07:35, Wolfram Sang wrote: > Well, I2C is simple, what could go wrong? :/ Actually I2C is elegant and *seems* simple, but in all its asynchronicity there are actually a surprising number of fine details you can trip over. Maybe that's why so many i2c

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-08-28 Thread Matthijs van Duin
On 28 August 2016 at 07:35, Wolfram Sang wrote: > Well, I2C is simple, what could go wrong? :/ Actually I2C is elegant and *seems* simple, but in all its asynchronicity there are actually a surprising number of fine details you can trip over. Maybe that's why so many i2c controllers suck: since

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-08-27 Thread Wolfram Sang
> Making a mess of I2C controllers seems to be a popular hobby among > chip designers :P Well, I2C is simple, what could go wrong? :/ > A lot of the details (including the completely bizarre behaviour of > its innocuous-looking irq registers) would be quite non-trivial to > figure out without

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-08-27 Thread Wolfram Sang
> Making a mess of I2C controllers seems to be a popular hobby among > chip designers :P Well, I2C is simple, what could go wrong? :/ > A lot of the details (including the completely bizarre behaviour of > its innocuous-looking irq registers) would be quite non-trivial to > figure out without

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-08-27 Thread Matthijs van Duin
On 27 August 2016 at 19:22, Wolfram Sang wrote: > Uh, that sounds like bad HW... Making a mess of I2C controllers seems to be a popular hobby among chip designers :P ( I also really like how the RPi handles clock stretching... *cough* ) > While it surely is nice to have

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-08-27 Thread Matthijs van Duin
On 27 August 2016 at 19:22, Wolfram Sang wrote: > Uh, that sounds like bad HW... Making a mess of I2C controllers seems to be a popular hobby among chip designers :P ( I also really like how the RPi handles clock stretching... *cough* ) > While it surely is nice to have super detailed

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-08-27 Thread Wolfram Sang
> Greetings, unfortunate souls trying to use the omap-i2c peripheral in > slave mode! :-) Uh, that sounds like bad HW... > I recently posted some stuff about exactly that topic on TI's E2E > forum, you may want to read this warning: >

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-08-27 Thread Wolfram Sang
> Greetings, unfortunate souls trying to use the omap-i2c peripheral in > slave mode! :-) Uh, that sounds like bad HW... > I recently posted some stuff about exactly that topic on TI's E2E > forum, you may want to read this warning: >

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-08-27 Thread Matthijs van Duin
Greetings, unfortunate souls trying to use the omap-i2c peripheral in slave mode! :-) I recently posted some stuff about exactly that topic on TI's E2E forum, you may want to read this warning: http://e2e.ti.com/support/arm/sitara_arm/f/791/p/514961/1955843#1955843 and post contains suggestions

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-08-27 Thread Matthijs van Duin
Greetings, unfortunate souls trying to use the omap-i2c peripheral in slave mode! :-) I recently posted some stuff about exactly that topic on TI's E2E forum, you may want to read this warning: http://e2e.ti.com/support/arm/sitara_arm/f/791/p/514961/1955843#1955843 and post contains suggestions

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-08-25 Thread Wolfram Sang
Hi, > The omap i2c controller (at least on dra7x devices) > doesn't have start/stop (STT/STP) support for slave mode > so event #5 is not implemented in the driver. I think you can deduce that. If a new {READ|WRITE}_REQUESTED slave event comes in when you had *_PROCESSED events before, there

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-08-25 Thread Wolfram Sang
Hi, > The omap i2c controller (at least on dra7x devices) > doesn't have start/stop (STT/STP) support for slave mode > so event #5 is not implemented in the driver. I think you can deduce that. If a new {READ|WRITE}_REQUESTED slave event comes in when you had *_PROCESSED events before, there

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-05-26 Thread Manish Badarkhe
Hi Ravikumar Some sanity comments, just good to have. > +#ifdef CONFIG_I2C_SLAVE > +static int omap_i2c_slave_irq(struct omap_i2c_dev *omap) > +{ > + u16 stat_raw; > + u16 stat; > + u16 bits; > + u8 value; > + > + stat_raw = omap_i2c_read_reg(omap,

Re: [RFC 1/1] drivers: i2c: omap: Add slave support

2016-05-26 Thread Manish Badarkhe
Hi Ravikumar Some sanity comments, just good to have. > +#ifdef CONFIG_I2C_SLAVE > +static int omap_i2c_slave_irq(struct omap_i2c_dev *omap) > +{ > + u16 stat_raw; > + u16 stat; > + u16 bits; > + u8 value; > + > + stat_raw = omap_i2c_read_reg(omap,