drm/i915: abstract i2c bit banging fallback in gmbus xfer
authorJani Nikula <jani.nikula@intel.com>
Tue, 1 Dec 2015 14:29:26 +0000 (16:29 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 2 Dec 2015 11:29:41 +0000 (13:29 +0200)
commitbffce907d64042b5683ed3076e839d0249606264
tree6bda4975b36467d0f4460f824ff201751e9eb7b2
parent0aeb904888f52f48ca0cc7dfec2c2f540d2a762a
drm/i915: abstract i2c bit banging fallback in gmbus xfer

Choose between i2c bit banging and gmbus in a new higher level function,
and let the i2c core retry the first time we fall back to bit banging.

The i2c core imposes a timeout on -EAGAIN, but it defaults to 1 second,
and shouldn't be a problem for us.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1448980166-23055-2-git-send-email-jani.nikula@intel.com
drivers/gpu/drm/i915/intel_i2c.c