UPSTREAM: drm/i915/intel_i2c: use INDEX cycles for i2c read transactions
authorDaniel Kurtz <djkurtz@chromium.org>
Fri, 30 Mar 2012 11:46:40 +0000 (19:46 +0800)
committerGrant Grundler <grundler@google.com>
Thu, 24 May 2012 22:13:19 +0000 (15:13 -0700)
commit2957eec42d3cbdbcfd8707c9a04e19f42b7a75cf
tree1d10ccc7f2281501e6282217da329a9a4c6cd36d
parent957bd4d8154eaabb440f9d33da4ea71014a15393
UPSTREAM: drm/i915/intel_i2c: use INDEX cycles for i2c read transactions

It is very common for an i2c device to require a small 1 or 2 byte write
followed by a read.  For example, when reading from an i2c EEPROM it is
common to write and address, offset or index followed by a reading some
values.

The i915 gmbus controller provides a special "INDEX" cycle for performing
such a small write followed by a read.  The INDEX can be either one or two
bytes long.  The advantage of using such a cycle is that the CPU has
slightly less work to do once the read with INDEX cycle is started.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 56f9eac05489912ac0165ffc0ebff0f8588f77d2)

Change-Id: I43c50952ac3660a68c8298816fee24eade4535eb
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
drivers/gpu/drm/i915/intel_i2c.c