Shubhrajyoti D 47dcd0161a i2c: omap: Fix the revision register read
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 previous to OMAP4 the offset 0x04 is IE register whose
bit-14 reset value is 0, the code uses the same to its advantage.

Also since the omap_i2c_read_reg uses reg_map_ip_* a raw_readw is done
to fetch the revision register.

The dev->regs is populated after reading the rev_hi. A NULL check
has been added in the resume handler to prevent the access before
the setting of the regs.

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-11-14 17:44:38 +01:00
..
2012-07-24 14:13:56 +02:00
2012-11-14 10:28:28 +01:00
2012-07-24 14:13:56 +02:00
2011-03-31 11:26:23 -03:00
2012-07-24 14:13:56 +02:00
2012-10-28 21:37:01 +01:00
2011-01-04 00:53:37 +00:00
2011-05-24 20:58:49 +02:00
2012-07-24 14:13:56 +02:00
2012-10-05 22:23:55 +02:00
2012-11-13 11:24:15 +01:00
2012-07-24 14:13:56 +02:00
2012-07-24 14:13:56 +02:00
2011-06-29 11:36:10 +02:00
2012-07-24 14:13:56 +02:00
2012-05-12 14:28:18 +02:00
2012-10-28 21:37:00 +01:00