[PATCH RFC] i2c: omap: Fix the revision register read

2012-10-31 Thread Shubhrajyoti D
The revision register on OMAP4 is a 16-bit lo and a 16-bit hi. Currently the driver reads only the lower 8-bits. Fix the same by preventing the truncating of the rev register for OMAP4. Also use the scheme bit ie bit-14 of the hi register to know if it is OMAP_I2C_IP_VERSION_2. On platforms

Re: [PATCH RFC] i2c: omap: Fix the revision register read

2012-10-31 Thread Shubhrajyoti Datta
On Wed, Oct 31, 2012 at 2:29 PM, Shubhrajyoti D shubhrajy...@ti.com wrote: The revision register on OMAP4 is a 16-bit lo and a 16-bit hi. Currently the driver reads only the lower 8-bits. Fix the same by preventing the truncating of the rev register for OMAP4. Also use the scheme bit ie

Re: [PATCH RFC] i2c: omap: Fix the revision register read

2012-10-31 Thread Felipe Balbi
Hi, On Wed, Oct 31, 2012 at 02:29:19PM +0530, Shubhrajyoti D wrote: The revision register on OMAP4 is a 16-bit lo and a 16-bit hi. Currently the driver reads only the lower 8-bits. Fix the same by preventing the truncating of the rev register for OMAP4. very good, but you need to test this

Re: [PATCH RFC] i2c: omap: Fix the revision register read

2012-10-31 Thread Felipe Balbi
Hi, On Wed, Oct 31, 2012 at 03:02:57PM +0530, Shubhrajyoti Datta wrote: On Wed, Oct 31, 2012 at 2:29 PM, Shubhrajyoti D shubhrajy...@ti.com wrote: The revision register on OMAP4 is a 16-bit lo and a 16-bit hi. Currently the driver reads only the lower 8-bits. Fix the same by preventing the

Re: [PATCH RFC] i2c: omap: Fix the revision register read

2012-10-31 Thread Shubhrajyoti
On Wednesday 31 October 2012 03:42 PM, Felipe Balbi wrote: Hi, On Wed, Oct 31, 2012 at 02:29:19PM +0530, Shubhrajyoti D wrote: The revision register on OMAP4 is a 16-bit lo and a 16-bit hi. Currently the driver reads only the lower 8-bits. Fix the same by preventing the truncating of the rev

Re: [PATCH RFC] i2c: omap: Fix the revision register read

2012-10-31 Thread Shubhrajyoti
On Wednesday 31 October 2012 03:42 PM, Felipe Balbi wrote: + if (!_dev-regs) + return 0; this is wrong, you need to make sure dev-regs is set early enough. to set the dev-regs I use the value read from revision register. to read the revision register I do a get_sync first.

Re: [PATCH RFC] i2c: omap: Fix the revision register read

2012-10-31 Thread Felipe Balbi
Hi, On Wed, Oct 31, 2012 at 04:18:15PM +0530, Shubhrajyoti wrote: On Wednesday 31 October 2012 03:42 PM, Felipe Balbi wrote: Hi, On Wed, Oct 31, 2012 at 02:29:19PM +0530, Shubhrajyoti D wrote: The revision register on OMAP4 is a 16-bit lo and a 16-bit hi. Currently the driver reads

Re: [PATCH RFC] i2c: omap: Fix the revision register read

2012-10-31 Thread Felipe Balbi
Hi, On Wed, Oct 31, 2012 at 04:28:38PM +0530, Shubhrajyoti wrote: On Wednesday 31 October 2012 03:42 PM, Felipe Balbi wrote: +if (!_dev-regs) +return 0; this is wrong, you need to make sure dev-regs is set early enough. to set the dev-regs I use the value