diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-10 15:38:47 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-10 15:38:47 -0800 |
commit | 1b558141db8b06c61edebaaf5e3394ed98540ac7 (patch) | |
tree | 2f54608989ab6b2af3e6c1f74f956090485baf63 /i2c | |
parent | 65d0e6259152a94a0bf4c43c860b45826a3d11f9 (diff) | |
download | patches-1b558141db8b06c61edebaaf5e3394ed98540ac7.tar.gz |
i2c and pci patches added
Diffstat (limited to 'i2c')
-rw-r--r-- | i2c/hwmon-add-required-idr-locking.patch | 91 | ||||
-rw-r--r-- | i2c/hwmon-rename-register-parameters.patch | 139 | ||||
-rw-r--r-- | i2c/i2c-ali1535-drop-redundant-mutex.patch | 51 | ||||
-rw-r--r-- | i2c/i2c-amd756-s4882-mutex-init.patch | 35 | ||||
-rw-r--r-- | i2c/i2c-drop-unneeded-i2c-dev-h-includes.patch | 185 | ||||
-rw-r--r-- | i2c/i2c-ixp4xx-hwmon-class.patch | 30 | ||||
-rw-r--r-- | i2c/i2c-piix4-add-ht1000-support.patch | 84 |
7 files changed, 615 insertions, 0 deletions
diff --git a/i2c/hwmon-add-required-idr-locking.patch b/i2c/hwmon-add-required-idr-locking.patch new file mode 100644 index 0000000000000..c02ba677b67bb --- /dev/null +++ b/i2c/hwmon-add-required-idr-locking.patch @@ -0,0 +1,91 @@ +From khali@linux-fr.org Sun Mar 5 14:12:35 2006 +Date: Sun, 5 Mar 2006 23:13:47 +0100 +From: Jean Delvare <khali@linux-fr.org> +To: Greg KH <greg@kroah.com>, L +Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> +Subject: [PATCH] hwmon: add required idr locking +Message-Id: <20060305231347.b3893bd9.khali@linux-fr.org> + +From: "Mark M. Hoffman" <mhoffman@lightlink.com> + +Add required locking around idr_ routines, retry the idr_pre_get/idr_get_new +pair properly, and sprinkle in some likely/unlikely for good measure. + +(Lack of idr locking didn't hurt when all callers were I2C clients, as the +i2c-core serialized for us anyway. Now that we have non I2C hwmon drivers, +this is truly necessary.) + +Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> +Signed-off-by: Jean Delvare <khali@linux-fr.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/hwmon/hwmon.c | 26 ++++++++++++++++++++------ + 1 file changed, 20 insertions(+), 6 deletions(-) + +--- gregkh-2.6.orig/drivers/hwmon/hwmon.c ++++ gregkh-2.6/drivers/hwmon/hwmon.c +@@ -17,6 +17,7 @@ + #include <linux/idr.h> + #include <linux/hwmon.h> + #include <linux/gfp.h> ++#include <linux/spinlock.h> + + #define HWMON_ID_PREFIX "hwmon" + #define HWMON_ID_FORMAT HWMON_ID_PREFIX "%d" +@@ -24,6 +25,7 @@ + static struct class *hwmon_class; + + static DEFINE_IDR(hwmon_idr); ++static DEFINE_SPINLOCK(idr_lock); + + /** + * hwmon_device_register - register w/ hwmon sysfs class +@@ -37,20 +39,30 @@ static DEFINE_IDR(hwmon_idr); + struct class_device *hwmon_device_register(struct device *dev) + { + struct class_device *cdev; +- int id; ++ int id, err; + +- if (idr_pre_get(&hwmon_idr, GFP_KERNEL) == 0) ++again: ++ if (unlikely(idr_pre_get(&hwmon_idr, GFP_KERNEL) == 0)) + return ERR_PTR(-ENOMEM); + +- if (idr_get_new(&hwmon_idr, NULL, &id) < 0) +- return ERR_PTR(-ENOMEM); ++ spin_lock(&idr_lock); ++ err = idr_get_new(&hwmon_idr, NULL, &id); ++ spin_unlock(&idr_lock); ++ ++ if (unlikely(err == -EAGAIN)) ++ goto again; ++ else if (unlikely(err)) ++ return ERR_PTR(err); + + id = id & MAX_ID_MASK; + cdev = class_device_create(hwmon_class, NULL, MKDEV(0,0), dev, + HWMON_ID_FORMAT, id); + +- if (IS_ERR(cdev)) ++ if (IS_ERR(cdev)) { ++ spin_lock(&idr_lock); + idr_remove(&hwmon_idr, id); ++ spin_unlock(&idr_lock); ++ } + + return cdev; + } +@@ -64,9 +76,11 @@ void hwmon_device_unregister(struct clas + { + int id; + +- if (sscanf(cdev->class_id, HWMON_ID_FORMAT, &id) == 1) { ++ if (likely(sscanf(cdev->class_id, HWMON_ID_FORMAT, &id) == 1)) { + class_device_unregister(cdev); ++ spin_lock(&idr_lock); + idr_remove(&hwmon_idr, id); ++ spin_unlock(&idr_lock); + } else + dev_dbg(cdev->dev, + "hwmon_device_unregister() failed: bad class ID!\n"); diff --git a/i2c/hwmon-rename-register-parameters.patch b/i2c/hwmon-rename-register-parameters.patch new file mode 100644 index 0000000000000..aa3eb78e494dd --- /dev/null +++ b/i2c/hwmon-rename-register-parameters.patch @@ -0,0 +1,139 @@ +From khali@linux-fr.org Mon Feb 27 14:14:04 2006 +Date: Mon, 27 Feb 2006 23:14:58 +0100 +From: Darren Jenkins <darrenrjenkins@gmail.com> +To: Greg KH <greg@kroah.com> +Cc: Darren Jenkins <darrenrjenkins@gmail.com> +Subject: I2C: hwmon: Rename register parameters +Message-Id: <20060227231458.1870d756.khali@linux-fr.org> +Content-Disposition: inline; filename=hwmon-rename-register-parameters.patch + +From: Darren Jenkins <darrenrjenkins@gmail.com> + +"register" is a reserved keyword so using it as a parameter name +can confuse some compilers, most notably ICC. + +The patch below just renames all occurences to reg which fits the actual +function declarations. + +Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> +Signed-off-by: Jean Delvare <khali@linux-fr.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/hwmon/adm1026.c | 5 ++--- + drivers/hwmon/fscpos.c | 4 ++-- + drivers/hwmon/it87.c | 5 ++--- + drivers/hwmon/lm78.c | 4 ++-- + drivers/hwmon/lm85.c | 4 ++-- + drivers/hwmon/sis5595.c | 4 ++-- + drivers/hwmon/w83627hf.c | 5 ++--- + drivers/hwmon/w83781d.c | 5 ++--- + 8 files changed, 16 insertions(+), 20 deletions(-) + +--- gregkh-2.6.orig/drivers/hwmon/adm1026.c ++++ gregkh-2.6/drivers/hwmon/adm1026.c +@@ -299,9 +299,8 @@ static int adm1026_attach_adapter(struct + static int adm1026_detect(struct i2c_adapter *adapter, int address, + int kind); + static int adm1026_detach_client(struct i2c_client *client); +-static int adm1026_read_value(struct i2c_client *client, u8 register); +-static int adm1026_write_value(struct i2c_client *client, u8 register, +- int value); ++static int adm1026_read_value(struct i2c_client *client, u8 reg); ++static int adm1026_write_value(struct i2c_client *client, u8 reg, int value); + static void adm1026_print_gpio(struct i2c_client *client); + static void adm1026_fixup_gpio(struct i2c_client *client); + static struct adm1026_data *adm1026_update_device(struct device *dev); +--- gregkh-2.6.orig/drivers/hwmon/fscpos.c ++++ gregkh-2.6/drivers/hwmon/fscpos.c +@@ -90,8 +90,8 @@ static int fscpos_attach_adapter(struct + static int fscpos_detect(struct i2c_adapter *adapter, int address, int kind); + static int fscpos_detach_client(struct i2c_client *client); + +-static int fscpos_read_value(struct i2c_client *client, u8 register); +-static int fscpos_write_value(struct i2c_client *client, u8 register, u8 value); ++static int fscpos_read_value(struct i2c_client *client, u8 reg); ++static int fscpos_write_value(struct i2c_client *client, u8 reg, u8 value); + static struct fscpos_data *fscpos_update_device(struct device *dev); + static void fscpos_init_client(struct i2c_client *client); + +--- gregkh-2.6.orig/drivers/hwmon/it87.c ++++ gregkh-2.6/drivers/hwmon/it87.c +@@ -225,9 +225,8 @@ static int it87_isa_attach_adapter(struc + static int it87_detect(struct i2c_adapter *adapter, int address, int kind); + static int it87_detach_client(struct i2c_client *client); + +-static int it87_read_value(struct i2c_client *client, u8 register); +-static int it87_write_value(struct i2c_client *client, u8 register, +- u8 value); ++static int it87_read_value(struct i2c_client *client, u8 reg); ++static int it87_write_value(struct i2c_client *client, u8 reg, u8 value); + static struct it87_data *it87_update_device(struct device *dev); + static int it87_check_pwm(struct i2c_client *client); + static void it87_init_client(struct i2c_client *client, struct it87_data *data); +--- gregkh-2.6.orig/drivers/hwmon/lm78.c ++++ gregkh-2.6/drivers/hwmon/lm78.c +@@ -158,8 +158,8 @@ static int lm78_isa_attach_adapter(struc + static int lm78_detect(struct i2c_adapter *adapter, int address, int kind); + static int lm78_detach_client(struct i2c_client *client); + +-static int lm78_read_value(struct i2c_client *client, u8 register); +-static int lm78_write_value(struct i2c_client *client, u8 register, u8 value); ++static int lm78_read_value(struct i2c_client *client, u8 reg); ++static int lm78_write_value(struct i2c_client *client, u8 reg, u8 value); + static struct lm78_data *lm78_update_device(struct device *dev); + static void lm78_init_client(struct i2c_client *client); + +--- gregkh-2.6.orig/drivers/hwmon/lm85.c ++++ gregkh-2.6/drivers/hwmon/lm85.c +@@ -374,8 +374,8 @@ static int lm85_detect(struct i2c_adapte + int kind); + static int lm85_detach_client(struct i2c_client *client); + +-static int lm85_read_value(struct i2c_client *client, u8 register); +-static int lm85_write_value(struct i2c_client *client, u8 register, int value); ++static int lm85_read_value(struct i2c_client *client, u8 reg); ++static int lm85_write_value(struct i2c_client *client, u8 reg, int value); + static struct lm85_data *lm85_update_device(struct device *dev); + static void lm85_init_client(struct i2c_client *client); + +--- gregkh-2.6.orig/drivers/hwmon/sis5595.c ++++ gregkh-2.6/drivers/hwmon/sis5595.c +@@ -193,8 +193,8 @@ static struct pci_dev *s_bridge; /* poin + static int sis5595_detect(struct i2c_adapter *adapter); + static int sis5595_detach_client(struct i2c_client *client); + +-static int sis5595_read_value(struct i2c_client *client, u8 register); +-static int sis5595_write_value(struct i2c_client *client, u8 register, u8 value); ++static int sis5595_read_value(struct i2c_client *client, u8 reg); ++static int sis5595_write_value(struct i2c_client *client, u8 reg, u8 value); + static struct sis5595_data *sis5595_update_device(struct device *dev); + static void sis5595_init_client(struct i2c_client *client); + +--- gregkh-2.6.orig/drivers/hwmon/w83627hf.c ++++ gregkh-2.6/drivers/hwmon/w83627hf.c +@@ -332,9 +332,8 @@ struct w83627hf_data { + static int w83627hf_detect(struct i2c_adapter *adapter); + static int w83627hf_detach_client(struct i2c_client *client); + +-static int w83627hf_read_value(struct i2c_client *client, u16 register); +-static int w83627hf_write_value(struct i2c_client *client, u16 register, +- u16 value); ++static int w83627hf_read_value(struct i2c_client *client, u16 reg); ++static int w83627hf_write_value(struct i2c_client *client, u16 reg, u16 value); + static struct w83627hf_data *w83627hf_update_device(struct device *dev); + static void w83627hf_init_client(struct i2c_client *client); + +--- gregkh-2.6.orig/drivers/hwmon/w83781d.c ++++ gregkh-2.6/drivers/hwmon/w83781d.c +@@ -272,9 +272,8 @@ static int w83781d_isa_attach_adapter(st + static int w83781d_detect(struct i2c_adapter *adapter, int address, int kind); + static int w83781d_detach_client(struct i2c_client *client); + +-static int w83781d_read_value(struct i2c_client *client, u16 register); +-static int w83781d_write_value(struct i2c_client *client, u16 register, +- u16 value); ++static int w83781d_read_value(struct i2c_client *client, u16 reg); ++static int w83781d_write_value(struct i2c_client *client, u16 reg, u16 value); + static struct w83781d_data *w83781d_update_device(struct device *dev); + static void w83781d_init_client(struct i2c_client *client); + diff --git a/i2c/i2c-ali1535-drop-redundant-mutex.patch b/i2c/i2c-ali1535-drop-redundant-mutex.patch new file mode 100644 index 0000000000000..60e10cb29b200 --- /dev/null +++ b/i2c/i2c-ali1535-drop-redundant-mutex.patch @@ -0,0 +1,51 @@ +From khali@linux-fr.org Mon Feb 27 14:07:24 2006 +Date: Mon, 27 Feb 2006 23:08:18 +0100 +From: Jean Delvare <khali@linux-fr.org> +To: Greg KH <greg@kroah.com> +Subject: I2C: i2c-ali1535: Drop redundant mutex +Message-Id: <20060227230818.468ef991.khali@linux-fr.org> +Content-Disposition: inline; filename=i2c-ali1535-drop-redundant-mutex.patch + +Drop a redundant mutex in driver i2c-ali1535. The struct i2c_adapter +includes a mutex for the same purpose, operated by i2c-core. + +Signed-off-by: Jean Delvare <khali@linux-fr.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/i2c/busses/i2c-ali1535.c | 4 ---- + 1 file changed, 4 deletions(-) + +--- gregkh-2.6.orig/drivers/i2c/busses/i2c-ali1535.c ++++ gregkh-2.6/drivers/i2c/busses/i2c-ali1535.c +@@ -62,7 +62,6 @@ + #include <linux/ioport.h> + #include <linux/i2c.h> + #include <linux/init.h> +-#include <linux/mutex.h> + #include <asm/io.h> + + +@@ -136,7 +135,6 @@ + + static struct pci_driver ali1535_driver; + static unsigned short ali1535_smba; +-static DEFINE_MUTEX(i2c_ali1535_mutex); + + /* Detect whether a ALI1535 can be found, and initialize it, where necessary. + Note the differences between kernels with the old PCI BIOS interface and +@@ -345,7 +343,6 @@ static s32 ali1535_access(struct i2c_ada + int timeout; + s32 result = 0; + +- mutex_lock(&i2c_ali1535_mutex); + /* make sure SMBus is idle */ + temp = inb_p(SMBHSTSTS); + for (timeout = 0; +@@ -460,7 +457,6 @@ static s32 ali1535_access(struct i2c_ada + break; + } + EXIT: +- mutex_unlock(&i2c_ali1535_mutex); + return result; + } + diff --git a/i2c/i2c-amd756-s4882-mutex-init.patch b/i2c/i2c-amd756-s4882-mutex-init.patch new file mode 100644 index 0000000000000..29a2c1b04bd64 --- /dev/null +++ b/i2c/i2c-amd756-s4882-mutex-init.patch @@ -0,0 +1,35 @@ +From khali@linux-fr.org Mon Feb 27 14:08:27 2006 +Date: Mon, 27 Feb 2006 23:09:22 +0100 +From: Jean Delvare <khali@linux-fr.org> +To: Greg KH <greg@kroah.com> +Subject: I2C: i2c-amd756-s4882: Improve static mutex initialization +Message-Id: <20060227230922.e540201d.khali@linux-fr.org> +Content-Disposition: inline; filename=i2c-amd756-s4882-mutex-init.patch + +Static mutexes can be initialized at declaration time. + +Signed-off-by: Jean Delvare <khali@linux-fr.org> +--- + drivers/i2c/busses/i2c-amd756-s4882.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- gregkh-2.6.orig/drivers/i2c/busses/i2c-amd756-s4882.c ++++ gregkh-2.6/drivers/i2c/busses/i2c-amd756-s4882.c +@@ -46,7 +46,7 @@ static struct i2c_adapter *s4882_adapter + static struct i2c_algorithm *s4882_algo; + + /* Wrapper access functions for multiplexed SMBus */ +-static struct mutex amd756_lock; ++static DEFINE_MUTEX(amd756_lock); + + static s32 amd756_access_virt0(struct i2c_adapter * adap, u16 addr, + unsigned short flags, char read_write, +@@ -167,8 +167,6 @@ static int __init amd756_s4882_init(void + } + + printk(KERN_INFO "Enabling SMBus multiplexing for Tyan S4882\n"); +- mutex_init(&amd756_lock); +- + /* Define the 5 virtual adapters and algorithms structures */ + if (!(s4882_adapter = kzalloc(5 * sizeof(struct i2c_adapter), + GFP_KERNEL))) { diff --git a/i2c/i2c-drop-unneeded-i2c-dev-h-includes.patch b/i2c/i2c-drop-unneeded-i2c-dev-h-includes.patch new file mode 100644 index 0000000000000..c75c5a5b2e1d1 --- /dev/null +++ b/i2c/i2c-drop-unneeded-i2c-dev-h-includes.patch @@ -0,0 +1,185 @@ +From khali@linux-fr.org Mon Feb 27 14:13:02 2006 +Date: Mon, 27 Feb 2006 23:13:53 +0100 +From: Jean Delvare <khali@linux-fr.org> +To: Greg KH <greg@kroah.com> +Subject: I2C: Drop unneeded i2c-dev.h includes +Message-Id: <20060227231353.9e7f6cc9.khali@linux-fr.org> +Content-Disposition: inline; filename=i2c-drop-unneeded-i2c-dev-h-includes.patch + +Several media/video and sound drivers include i2c-dev.h while they +don't need it at all. Clean it up. + +This header file is really only needed by i2c-dev.c and +compat_ioctl.c, other drivers should never need it. + +Signed-off-by: Jean Delvare <khali@linux-fr.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/media/video/adv7170.c | 1 - + drivers/media/video/adv7175.c | 1 - + drivers/media/video/bt819.c | 1 - + drivers/media/video/bt856.c | 1 - + drivers/media/video/saa7110.c | 1 - + drivers/media/video/saa7111.c | 1 - + drivers/media/video/saa7114.c | 1 - + drivers/media/video/saa711x.c | 1 - + drivers/media/video/saa7185.c | 1 - + drivers/media/video/vpx3220.c | 1 - + sound/oss/dmasound/dmasound_awacs.c | 2 -- + sound/ppc/daca.c | 1 - + sound/ppc/keywest.c | 1 - + sound/ppc/toonie.c | 1 - + sound/ppc/tumbler.c | 1 - + 15 files changed, 16 deletions(-) + +--- gregkh-2.6.orig/drivers/media/video/adv7170.c ++++ gregkh-2.6/drivers/media/video/adv7170.c +@@ -53,7 +53,6 @@ MODULE_AUTHOR("Maxim Yevtyushkin"); + MODULE_LICENSE("GPL"); + + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + + #define I2C_NAME(x) (x)->name + +--- gregkh-2.6.orig/drivers/media/video/adv7175.c ++++ gregkh-2.6/drivers/media/video/adv7175.c +@@ -49,7 +49,6 @@ MODULE_AUTHOR("Dave Perks"); + MODULE_LICENSE("GPL"); + + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + + #define I2C_NAME(s) (s)->name + +--- gregkh-2.6.orig/drivers/media/video/bt819.c ++++ gregkh-2.6/drivers/media/video/bt819.c +@@ -53,7 +53,6 @@ MODULE_AUTHOR("Mike Bernson & Dave Perks + MODULE_LICENSE("GPL"); + + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + + #define I2C_NAME(s) (s)->name + +--- gregkh-2.6.orig/drivers/media/video/bt856.c ++++ gregkh-2.6/drivers/media/video/bt856.c +@@ -53,7 +53,6 @@ MODULE_AUTHOR("Mike Bernson & Dave Perks + MODULE_LICENSE("GPL"); + + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + + #define I2C_NAME(s) (s)->name + +--- gregkh-2.6.orig/drivers/media/video/saa7110.c ++++ gregkh-2.6/drivers/media/video/saa7110.c +@@ -39,7 +39,6 @@ MODULE_AUTHOR("Pauline Middelink"); + MODULE_LICENSE("GPL"); + + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + + #define I2C_NAME(s) (s)->name + +--- gregkh-2.6.orig/drivers/media/video/saa7111.c ++++ gregkh-2.6/drivers/media/video/saa7111.c +@@ -52,7 +52,6 @@ MODULE_AUTHOR("Dave Perks"); + MODULE_LICENSE("GPL"); + + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + + #define I2C_NAME(s) (s)->name + +--- gregkh-2.6.orig/drivers/media/video/saa7114.c ++++ gregkh-2.6/drivers/media/video/saa7114.c +@@ -55,7 +55,6 @@ MODULE_AUTHOR("Maxim Yevtyushkin"); + MODULE_LICENSE("GPL"); + + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + + #define I2C_NAME(x) (x)->name + +--- gregkh-2.6.orig/drivers/media/video/saa711x.c ++++ gregkh-2.6/drivers/media/video/saa711x.c +@@ -45,7 +45,6 @@ MODULE_AUTHOR("Dave Perks, Jose Ignacio + MODULE_LICENSE("GPL"); + + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + + #define I2C_NAME(s) (s)->name + +--- gregkh-2.6.orig/drivers/media/video/saa7185.c ++++ gregkh-2.6/drivers/media/video/saa7185.c +@@ -49,7 +49,6 @@ MODULE_AUTHOR("Dave Perks"); + MODULE_LICENSE("GPL"); + + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + + #define I2C_NAME(s) (s)->name + +--- gregkh-2.6.orig/drivers/media/video/vpx3220.c ++++ gregkh-2.6/drivers/media/video/vpx3220.c +@@ -30,7 +30,6 @@ + #include <asm/uaccess.h> + + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + + #define I2C_NAME(x) (x)->name + +--- gregkh-2.6.orig/sound/oss/dmasound/dmasound_awacs.c ++++ gregkh-2.6/sound/oss/dmasound/dmasound_awacs.c +@@ -88,8 +88,6 @@ + #include <linux/pmu.h> + #endif + +-#include <linux/i2c-dev.h> +- + #include <asm/uaccess.h> + #include <asm/prom.h> + #include <asm/machdep.h> +--- gregkh-2.6.orig/sound/ppc/daca.c ++++ gregkh-2.6/sound/ppc/daca.c +@@ -22,7 +22,6 @@ + #include <sound/driver.h> + #include <linux/init.h> + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + #include <linux/kmod.h> + #include <linux/slab.h> + #include <sound/core.h> +--- gregkh-2.6.orig/sound/ppc/keywest.c ++++ gregkh-2.6/sound/ppc/keywest.c +@@ -23,7 +23,6 @@ + #include <linux/init.h> + #include <linux/i2c.h> + #include <linux/delay.h> +-#include <linux/i2c-dev.h> + #include <linux/slab.h> + #include <sound/core.h> + #include "pmac.h" +--- gregkh-2.6.orig/sound/ppc/toonie.c ++++ gregkh-2.6/sound/ppc/toonie.c +@@ -22,7 +22,6 @@ + #include <linux/init.h> + #include <linux/delay.h> + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + #include <linux/kmod.h> + #include <linux/slab.h> + #include <linux/interrupt.h> +--- gregkh-2.6.orig/sound/ppc/tumbler.c ++++ gregkh-2.6/sound/ppc/tumbler.c +@@ -28,7 +28,6 @@ + #include <linux/init.h> + #include <linux/delay.h> + #include <linux/i2c.h> +-#include <linux/i2c-dev.h> + #include <linux/kmod.h> + #include <linux/slab.h> + #include <linux/interrupt.h> diff --git a/i2c/i2c-ixp4xx-hwmon-class.patch b/i2c/i2c-ixp4xx-hwmon-class.patch new file mode 100644 index 0000000000000..17ffc0e2dcee1 --- /dev/null +++ b/i2c/i2c-ixp4xx-hwmon-class.patch @@ -0,0 +1,30 @@ +From khali@linux-fr.org Mon Feb 27 14:12:07 2006 +Date: Mon, 27 Feb 2006 23:12:58 +0100 +From: Alessandro Zummo <a.zummo@towertech.it> +To: Greg KH <greg@kroah.com> +Cc: Alessandro Zummo <a.zummo@towertech.it> +Subject: I2C: i2c-ixp4xx: Add hwmon class +Message-Id: <20060227231258.cebdda2f.khali@linux-fr.org> +Content-Disposition: inline; filename=i2c-ixp4xx-hwmon-class.patch + +From: Alessandro Zummo <a.zummo@towertech.it> + +This patch adds I2C_CLASS_HWMON to the ixp4xx bus driver. + +Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> +Signed-off-by: Jean Delvare <khali@linux-fr.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/i2c/busses/i2c-ixp4xx.c | 1 + + 1 file changed, 1 insertion(+) + +--- gregkh-2.6.orig/drivers/i2c/busses/i2c-ixp4xx.c ++++ gregkh-2.6/drivers/i2c/busses/i2c-ixp4xx.c +@@ -126,6 +126,7 @@ static int ixp4xx_i2c_probe(struct platf + drv_data->algo_data.timeout = 100; + + drv_data->adapter.id = I2C_HW_B_IXP4XX; ++ drv_data->adapter.class = I2C_CLASS_HWMON; + strlcpy(drv_data->adapter.name, plat_dev->dev.driver->name, + I2C_NAME_SIZE); + drv_data->adapter.algo_data = &drv_data->algo_data; diff --git a/i2c/i2c-piix4-add-ht1000-support.patch b/i2c/i2c-piix4-add-ht1000-support.patch new file mode 100644 index 0000000000000..e62367992cfc8 --- /dev/null +++ b/i2c/i2c-piix4-add-ht1000-support.patch @@ -0,0 +1,84 @@ +From khali@linux-fr.org Mon Feb 27 14:10:55 2006 +Date: Mon, 27 Feb 2006 23:11:45 +0100 +From: Martin Devera <devik@cdi.cz> +To: Greg KH <greg@kroah.com> +Cc: Martin Devera <devik@cdi.cz> +Subject: I2C: i2c-piix4: Add Broadcom HT-1000 support +Message-Id: <20060227231145.6e298d84.khali@linux-fr.org> +Content-Disposition: inline; filename=i2c-piix4-add-ht1000-support.patch + +From: Martin Devera <devik@cdi.cz> + +Add Broadcom HT-1000 south bridge's PCI ID to i2c-piix driver. Note +that at least on Supermicro H8SSL it uses non-standard SMBHSTCFG = 3 +and standard values like 0 or 9 causes hangup. + +Signed-off-by: Martin Devera <devik@cdi.cz> +Signed-off-by: Jean Delvare <khali@linux-fr.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + Documentation/i2c/busses/i2c-piix4 | 2 +- + drivers/i2c/busses/Kconfig | 4 +++- + drivers/i2c/busses/i2c-piix4.c | 4 +++- + include/linux/pci_ids.h | 1 + + 4 files changed, 8 insertions(+), 3 deletions(-) + +--- gregkh-2.6.orig/Documentation/i2c/busses/i2c-piix4 ++++ gregkh-2.6/Documentation/i2c/busses/i2c-piix4 +@@ -4,7 +4,7 @@ Supported adapters: + * Intel 82371AB PIIX4 and PIIX4E + * Intel 82443MX (440MX) + Datasheet: Publicly available at the Intel website +- * ServerWorks OSB4, CSB5 and CSB6 southbridges ++ * ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges + Datasheet: Only available via NDA from ServerWorks + * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge + Datasheet: Publicly available at the SMSC website http://www.smsc.com +--- gregkh-2.6.orig/drivers/i2c/busses/Kconfig ++++ gregkh-2.6/drivers/i2c/busses/Kconfig +@@ -168,12 +168,14 @@ config I2C_PIIX4 + help + If you say yes to this option, support will be included for the Intel + PIIX4 family of mainboard I2C interfaces. Specifically, the following +- versions of the chipset are supported: ++ versions of the chipset are supported (note that Serverworks is part ++ of Broadcom): + Intel PIIX4 + Intel 440MX + Serverworks OSB4 + Serverworks CSB5 + Serverworks CSB6 ++ Serverworks HT-1000 + SMSC Victory66 + + This driver can also be built as a module. If so, the module +--- gregkh-2.6.orig/drivers/i2c/busses/i2c-piix4.c ++++ gregkh-2.6/drivers/i2c/busses/i2c-piix4.c +@@ -22,7 +22,7 @@ + /* + Supports: + Intel PIIX4, 440MX +- Serverworks OSB4, CSB5, CSB6 ++ Serverworks OSB4, CSB5, CSB6, HT-1000 + SMSC Victory66 + + Note: we assume there can only be one device, with one SMBus interface. +@@ -419,6 +419,8 @@ static struct pci_device_id piix4_ids[] + .driver_data = 0 }, + { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6), + .driver_data = 0 }, ++ { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000SB), ++ .driver_data = 0 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3), + .driver_data = 3 }, + { PCI_DEVICE(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_3), +--- gregkh-2.6.orig/include/linux/pci_ids.h ++++ gregkh-2.6/include/linux/pci_ids.h +@@ -1368,6 +1368,7 @@ + #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 + #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 + #define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203 ++#define PCI_DEVICE_ID_SERVERWORKS_HT1000SB 0x0205 + #define PCI_DEVICE_ID_SERVERWORKS_OSB4IDE 0x0211 + #define PCI_DEVICE_ID_SERVERWORKS_CSB5IDE 0x0212 + #define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE 0x0213 |