summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_i2c.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-03-17 09:07:37 +0300
committerDave Airlie <airlied@redhat.com>2010-03-31 08:55:52 +0400
commite2b0a8e1e697dbcd62574a32f4f96151d21bdd36 (patch)
treef01af37a48144020bcdd9fdc0cbf6c381c5b316b /drivers/gpu/drm/radeon/radeon_i2c.c
parentac1aade6876465060ebf9a71675dcb7305f0bafa (diff)
downloadlinux-e2b0a8e1e697dbcd62574a32f4f96151d21bdd36.tar.xz
drm/radeon/kms: add hw_i2c module option
Turn off hw i2c by default except for mm i2c which is hw only until we sort out the remaining prescale issues on older chips. hw i2c can be enabled with hw_i2c=1. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_i2c.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_i2c.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c
index 352110fd68f6..5def6f5dff38 100644
--- a/drivers/gpu/drm/radeon/radeon_i2c.c
+++ b/drivers/gpu/drm/radeon/radeon_i2c.c
@@ -879,9 +879,11 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
i2c->adapter.owner = THIS_MODULE;
i2c->dev = dev;
i2c_set_adapdata(&i2c->adapter, i2c);
- if (rec->hw_capable &&
- ((rdev->family <= CHIP_RS480) ||
- ((rdev->family >= CHIP_RV515) && (rdev->family <= CHIP_R580)))) {
+ if (rec->mm_i2c ||
+ (rec->hw_capable &&
+ radeon_hw_i2c &&
+ ((rdev->family <= CHIP_RS480) ||
+ ((rdev->family >= CHIP_RV515) && (rdev->family <= CHIP_R580))))) {
/* set the radeon hw i2c adapter */
sprintf(i2c->adapter.name, "Radeon i2c hw bus %s", name);
i2c->adapter.algo = &radeon_i2c_algo;