From: Alex Deucher Subject: [PATCH 2/2] drm/radeon/kms: add I2C_CLASS_HWMON to radeon i2c adapater classes Date: Tue, 3 May 2011 13:32:37 -0400 Message-ID: <1304443957-15667-2-git-send-email-alexdeucher@gmail.com> References: <1304443957-15667-1-git-send-email-alexdeucher@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-qw0-f49.google.com (mail-qw0-f49.google.com [209.85.216.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 88B0F9EC2F for ; Tue, 3 May 2011 10:32:49 -0700 (PDT) Received: by mail-qw0-f49.google.com with SMTP id 2so206873qwi.36 for ; Tue, 03 May 2011 10:32:49 -0700 (PDT) In-Reply-To: <1304443957-15667-1-git-send-email-alexdeucher@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: airlied@gmail.com, dri-devel@lists.freedesktop.org Cc: Jean Delvare List-Id: dri-devel@lists.freedesktop.org I'm not sure this is necessary. In most cases the driver will add the hwmon device itself based on information from the vbios tables. However, there are some boards without a proper vbios entry for the the hwmon chips and non-x86 (Mac/Sun) cards do not have a standard vbios. This allows the hwmon drivers to detect devices on the radeon i2c buses. Signed-off-by: Alex Deucher Cc: Jean Delvare --- drivers/gpu/drm/radeon/radeon_i2c.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c index 781196d..65d8744 100644 --- a/drivers/gpu/drm/radeon/radeon_i2c.c +++ b/drivers/gpu/drm/radeon/radeon_i2c.c @@ -888,7 +888,7 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, i2c->rec = *rec; i2c->adapter.owner = THIS_MODULE; - i2c->adapter.class = I2C_CLASS_DDC; + i2c->adapter.class = I2C_CLASS_DDC | I2C_CLASS_HWMON; i2c->dev = dev; i2c_set_adapdata(&i2c->adapter, i2c); if (rec->mm_i2c || -- 1.7.1.1