public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* scx200_i2c driver fails to detect any i2c devices in 2.6.26
@ 2008-10-23 16:54 Lennart Sorensen
  2008-10-23 17:20 ` Jean Delvare
  2008-10-23 17:35 ` Jean Delvare
  0 siblings, 2 replies; 7+ messages in thread
From: Lennart Sorensen @ 2008-10-23 16:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: ben-linux, khali, Len Sorensen

In 2.6.18, the scx200_i2c driver was working just fine.  Now while
moving to 2.6.26 I find that the bus no longer locates any devices when
drivers are loaded, even though i2cdetect has no problem locating
devices on the bus.

After some searching, I discovered that the scx200_i2c driver doesn't
have a .class parameter filled in, even though every other i2c driver
does.  A small patch adding the .class parameter fixes the problem.

Not sure if it should be I2C_CLASS_ALL or I2C_CLASS_HWMON, or even
I2C_CLASS_HWMON | I2C_CLASS_SPD (in current git tree).  Using
I2C_CLASS_ALL works for me and works with my lm75, m41t81 and spd
eeprom in 2.6.26.

--- a/drivers/i2c/busses/scx200_i2c.c	2008-07-13 17:51:29.000000000 -0400
+++ b/drivers/i2c/busses/scx200_i2c.c	2008-10-23 12:41:02.000000000 -0400
@@ -81,6 +81,7 @@
 
 static struct i2c_adapter scx200_i2c_ops = {
 	.owner		   = THIS_MODULE,
+	.class             = I2C_CLASS_ALL,
 	.id		   = I2C_HW_B_SCX200,
 	.algo_data	   = &scx200_i2c_data,
 	.name	= "NatSemi SCx200 I2C",

-- 
Len Sorensen

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-23 18:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-23 16:54 scx200_i2c driver fails to detect any i2c devices in 2.6.26 Lennart Sorensen
2008-10-23 17:20 ` Jean Delvare
2008-10-23 17:25   ` Lennart Sorensen
2008-10-23 17:35 ` Jean Delvare
2008-10-23 17:53   ` Lennart Sorensen
2008-10-23 17:55     ` scx200_i2c driver fails to detect any i2c devices in 2.6.26 (new patch) Lennart Sorensen
2008-10-23 18:03       ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox