aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_i2c.c')
-rw-r--r--drivers/gpu/drm/i915/intel_i2c.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index c2c6dbc0971c..3ef5af15b812 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -432,7 +432,7 @@ timeout:
432 I915_WRITE(GMBUS0 + reg_offset, 0); 432 I915_WRITE(GMBUS0 + reg_offset, 0);
433 433
434 /* Hardware may not support GMBUS over these pins? Try GPIO bitbanging instead. */ 434 /* Hardware may not support GMBUS over these pins? Try GPIO bitbanging instead. */
435 bus->force_bit = true; 435 bus->force_bit = 1;
436 ret = i2c_bit_algo.master_xfer(adapter, msgs, num); 436 ret = i2c_bit_algo.master_xfer(adapter, msgs, num);
437 437
438out: 438out:
@@ -491,7 +491,7 @@ int intel_setup_gmbus(struct drm_device *dev)
491 491
492 /* gmbus seems to be broken on i830 */ 492 /* gmbus seems to be broken on i830 */
493 if (IS_I830(dev)) 493 if (IS_I830(dev))
494 bus->force_bit = true; 494 bus->force_bit = 1;
495 495
496 intel_gpio_setup(bus, port); 496 intel_gpio_setup(bus, port);
497 497
@@ -532,7 +532,10 @@ void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit)
532{ 532{
533 struct intel_gmbus *bus = to_intel_gmbus(adapter); 533 struct intel_gmbus *bus = to_intel_gmbus(adapter);
534 534
535 bus->force_bit = force_bit; 535 bus->force_bit += force_bit ? 1 : -1;
536 DRM_DEBUG_KMS("%sabling bit-banging on %s. force bit now %d\n",
537 force_bit ? "en" : "dis", adapter->name,
538 bus->force_bit);
536} 539}
537 540
538void intel_teardown_gmbus(struct drm_device *dev) 541void intel_teardown_gmbus(struct drm_device *dev)