From patchwork Tue May 3 17:32:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 750822 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p43HXRCl024310 for ; Tue, 3 May 2011 17:33:47 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1007F9F031 for ; Tue, 3 May 2011 10:33:27 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=TE7M9QFV1l+prYX6CVIwzP2cKa2yXghoX2JB+yZd60U=; b=p6vbMHNzHx2xhWYcy8pgA9U+2OcSRCcEIbmSmc0oecqwpOXUbbBZj+Rz/CWscJ+8UC xHu5yJOA/TYAPZTqpp/pj9CpxX2Sn+d3ixUUVLVgGogydjWbAt5aPc3FowTF+EpLiYtN e+4Vlar8/3aA09xlFReNhdhGWu/rGGkEbQMiY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=n2fCCxIuqkFz6YAJfqfP8Y1ytNqW6vJOg9ZdVaNdu7fj6BS501llR88jyMlwfdCwq5 xrDqa8Vy8nq/tXHR72P8qGuzFLBpkLRBt3NCzVFzXkLwUF3vBd9JefM8eKnBdHlZYjAJ ZW5MBfsftO9vtgMLFX+xvvuVDy9Pr5BmQmrwM= Received: by 10.224.125.209 with SMTP id z17mr110949qar.223.1304443969317; Tue, 03 May 2011 10:32:49 -0700 (PDT) Received: from localhost.localdomain (static-74-96-105-7.washdc.fios.verizon.net [74.96.105.7]) by mx.google.com with ESMTPS id k2sm178371qcu.43.2011.05.03.10.32.48 (version=SSLv3 cipher=OTHER); Tue, 03 May 2011 10:32:48 -0700 (PDT) From: Alex Deucher To: airlied@gmail.com, dri-devel@lists.freedesktop.org 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> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: <1304443957-15667-1-git-send-email-alexdeucher@gmail.com> References: <1304443957-15667-1-git-send-email-alexdeucher@gmail.com> Cc: Jean Delvare X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 03 May 2011 17:33:47 +0000 (UTC) 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 ||