dect
/
linux-2.6
Archived
13
0
Fork 0

drm/i915: Disable LVDS i2c probing when using GPIO bit banging

This check only appears to succeed when using GMBUS, so we need to skip
it if we have fallen back to using GPIO bit banging.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2010-09-28 16:41:32 +01:00
parent e0e41598b4
commit b8232e9063
2 changed files with 7 additions and 0 deletions

View File

@ -1108,6 +1108,10 @@ extern int intel_setup_gmbus(struct drm_device *dev);
extern void intel_teardown_gmbus(struct drm_device *dev);
extern void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed);
extern void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit);
extern inline bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter)
{
return container_of(adapter, struct intel_gmbus, adapter)->force_bit;
}
extern void intel_i2c_reset(struct drm_device *dev);
/* intel_opregion.c */

View File

@ -827,6 +827,9 @@ static bool intel_lvds_ddc_probe(struct drm_device *dev, u8 pin)
},
};
struct i2c_adapter *i2c = &dev_priv->gmbus[pin].adapter;
/* XXX this only appears to work when using GMBUS */
if (intel_gmbus_is_forced_bit(i2c))
return true;
return i2c_transfer(i2c, msgs, 1) == 1;
}