Skip to content

Commit

Permalink
drm/i915/intel_i2c: cleanup error messages and comments
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Kurtz authored and Daniel Vetter committed Mar 28, 2012
1 parent 924a93e commit 874e3cc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/gpu/drm/i915/intel_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,17 +333,20 @@ gmbus_xfer(struct i2c_adapter *adapter,
* till then let it sleep.
*/
if (wait_for((I915_READ(GMBUS2 + reg_offset) & GMBUS_ACTIVE) == 0, 10))
DRM_INFO("GMBUS timed out waiting for idle\n");
DRM_INFO("GMBUS [%s] timed out waiting for idle\n",
bus->adapter.name);
I915_WRITE(GMBUS0 + reg_offset, 0);
ret = i;
goto out;

timeout:
DRM_INFO("GMBUS timed out, falling back to bit banging on pin %d [%s]\n",
bus->reg0 & 0xff, bus->adapter.name);
DRM_INFO("GMBUS [%s] timed out, falling back to bit banging on pin %d\n",
bus->adapter.name, bus->reg0 & 0xff);
I915_WRITE(GMBUS0 + reg_offset, 0);

/* Hardware may not support GMBUS over these pins? Try GPIO bitbanging instead. */
/* Hardware may not support GMBUS over these pins?
* Try GPIO bitbanging instead.
*/
if (!bus->has_gpio) {
ret = -EIO;
} else {
Expand Down

0 comments on commit 874e3cc

Please sign in to comment.