All of lore.kernel.org
 help / color / mirror / Atom feed
From: mort@bork.org (Martin Hicks)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] lm75 on a ppc405
Date: Wed, 07 Dec 2005 21:09:19 +0000	[thread overview]
Message-ID: <20051207210919.GF3085@bork.org> (raw)


hi,

I've got a board with an lm75 connected to the iic of a ppc405.
Inserting the i2c-ibm_iic and lm75 (and dependent) modules doesn't find
the device.  I poked around a bit and applying the following patch
seemed to make things better (against 2.6.11.x):

Index: kernel/drivers/i2c/chips/lm75.c
=================================RCS file: /opt/targa/src/e-dtu/kernel/drivers/i2c/chips/lm75.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 lm75.c
--- kernel/drivers/i2c/chips/lm75.c	13 May 2005 17:59:52 -0000	1.1.1.1
+++ kernel/drivers/i2c/chips/lm75.c	7 Dec 2005 20:28:13 -0000
@@ -104,8 +104,6 @@ static DEVICE_ATTR(temp1_input, S_IRUGO,
 
 static int lm75_attach_adapter(struct i2c_adapter *adapter)
 {
-	if (!(adapter->class & I2C_CLASS_HWMON))
-		return 0;
 	return i2c_detect(adapter, &addr_data, lm75_detect);
 }


This may be wrong, but why do we care if the *adapter* (i.e., the ppc's
iic) is a HWMON device?  We want the i2c adapters to scan their busses
for lm75 devices.

Any insight or is this a correct patch?  With this patch I see the lm75
at 0x48 and the temperature it reports is reasonable.

mh

-- 
Martin Hicks || mort at bork.org || PGP/GnuPG: 0x4C7F2BEE


             reply	other threads:[~2005-12-07 21:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-07 21:09 Martin Hicks [this message]
2005-12-07 22:14 ` [lm-sensors] lm75 on a ppc405 Jean Delvare
2005-12-08 15:25 ` Martin Hicks
2005-12-08 20:13 ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051207210919.GF3085@bork.org \
    --to=mort@bork.org \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.