aboutsummaryrefslogtreecommitdiffstats
path: root/i2c
diff options
context:
space:
mode:
author <greg@echidna.(none)>2005-09-26 14:59:22 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-26 14:59:22 -0700
commitd523f5141ecee9847a6aaac07484ead26ae166cb (patch)
tree5e57f8f66cf0fbcdfb7c5ef4708fc977760a45bb /i2c
parent91a58b314302947ce21404c0c7e803661a0bf2db (diff)
downloadpatches-d523f5141ecee9847a6aaac07484ead26ae166cb.tar.gz
added hwmon and ub patch
Diffstat (limited to 'i2c')
-rw-r--r--i2c/hwmon-01.patch122
-rw-r--r--i2c/hwmon-02.patch93
-rw-r--r--i2c/hwmon-03.patch169
-rw-r--r--i2c/hwmon-04.patch38
-rw-r--r--i2c/hwmon-05.patch72
-rw-r--r--i2c/hwmon-06.patch352
-rw-r--r--i2c/hwmon-07.patch101
-rw-r--r--i2c/hwmon-08.patch38
-rw-r--r--i2c/hwmon-09.patch50
-rw-r--r--i2c/hwmon-10.patch36
-rw-r--r--i2c/hwmon-11.patch35
-rw-r--r--i2c/hwmon-12.patch28
-rw-r--r--i2c/hwmon-13.patch54
13 files changed, 1188 insertions, 0 deletions
diff --git a/i2c/hwmon-01.patch b/i2c/hwmon-01.patch
new file mode 100644
index 0000000000000..1f060a7abdb4d
--- /dev/null
+++ b/i2c/hwmon-01.patch
@@ -0,0 +1,122 @@
+From khali@linux-fr.org Mon Sep 26 02:13:47 2005
+Date: Sun, 25 Sep 2005 16:14:18 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Cc: Grant Coady <grant_lkml@dodo.com.au>
+Subject: hwmon: adm9240 whitespace cleanups
+Message-Id: <20050925161418.34c03db7.khali@linux-fr.org>
+
+This whitespace cleanup patch removes one trailing space and breaks
+lines longer than 80 characters.
+
+Signed-off-by: Grant Coady <gcoady@gmail.com>
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+ drivers/hwmon/adm9240.c | 33 +++++++++++++++++++++------------
+ 1 file changed, 21 insertions(+), 12 deletions(-)
+
+--- gregkh-2.6.orig/drivers/hwmon/adm9240.c 2005-09-26 14:47:18.000000000 -0700
++++ gregkh-2.6/drivers/hwmon/adm9240.c 2005-09-26 14:47:29.000000000 -0700
+@@ -219,8 +219,8 @@
+ attr->index));
+ }
+
+-static ssize_t show_in_min(struct device *dev, struct device_attribute *devattr,
+- char *buf)
++static ssize_t show_in_min(struct device *dev,
++ struct device_attribute *devattr, char *buf)
+ {
+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+ struct adm9240_data *data = adm9240_update_device(dev);
+@@ -228,8 +228,8 @@
+ attr->index));
+ }
+
+-static ssize_t show_in_max(struct device *dev, struct device_attribute *devattr,
+- char *buf)
++static ssize_t show_in_max(struct device *dev,
++ struct device_attribute *devattr, char *buf)
+ {
+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+ struct adm9240_data *data = adm9240_update_device(dev);
+@@ -237,7 +237,8 @@
+ attr->index));
+ }
+
+-static ssize_t set_in_min(struct device *dev, struct device_attribute *devattr,
++static ssize_t set_in_min(struct device *dev,
++ struct device_attribute *devattr,
+ const char *buf, size_t count)
+ {
+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+@@ -253,7 +254,8 @@
+ return count;
+ }
+
+-static ssize_t set_in_max(struct device *dev, struct device_attribute *devattr,
++static ssize_t set_in_max(struct device *dev,
++ struct device_attribute *devattr,
+ const char *buf, size_t count)
+ {
+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+@@ -326,7 +328,7 @@
+ "to %u\n", nr + 1, 1 << old, 1 << fan_div);
+ }
+
+-/*
++/*
+ * set fan speed low limit:
+ *
+ * - value is zero: disable fan speed low limit alarm
+@@ -404,7 +406,8 @@
+ fan(2);
+
+ /* alarms */
+-static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t show_alarms(struct device *dev,
++ struct device_attribute *attr, char *buf)
+ {
+ struct adm9240_data *data = adm9240_update_device(dev);
+ return sprintf(buf, "%u\n", data->alarms);
+@@ -412,7 +415,8 @@
+ static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL);
+
+ /* vid */
+-static ssize_t show_vid(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t show_vid(struct device *dev,
++ struct device_attribute *attr, char *buf)
+ {
+ struct adm9240_data *data = adm9240_update_device(dev);
+ return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm));
+@@ -420,13 +424,16 @@
+ static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
+
+ /* analog output */
+-static ssize_t show_aout(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t show_aout(struct device *dev,
++ struct device_attribute *attr, char *buf)
+ {
+ struct adm9240_data *data = adm9240_update_device(dev);
+ return sprintf(buf, "%d\n", AOUT_FROM_REG(data->aout));
+ }
+
+-static ssize_t set_aout(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
++static ssize_t set_aout(struct device *dev,
++ struct device_attribute *attr,
++ const char *buf, size_t count)
+ {
+ struct i2c_client *client = to_i2c_client(dev);
+ struct adm9240_data *data = i2c_get_clientdata(client);
+@@ -441,7 +448,9 @@
+ static DEVICE_ATTR(aout_output, S_IRUGO | S_IWUSR, show_aout, set_aout);
+
+ /* chassis_clear */
+-static ssize_t chassis_clear(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
++static ssize_t chassis_clear(struct device *dev,
++ struct device_attribute *attr,
++ const char *buf, size_t count)
+ {
+ struct i2c_client *client = to_i2c_client(dev);
+ unsigned long val = simple_strtol(buf, NULL, 10);
diff --git a/i2c/hwmon-02.patch b/i2c/hwmon-02.patch
new file mode 100644
index 0000000000000..2ecc7f772911e
--- /dev/null
+++ b/i2c/hwmon-02.patch
@@ -0,0 +1,93 @@
+From khali@linux-fr.org Mon Sep 26 02:13:54 2005
+Date: Sun, 25 Sep 2005 16:18:49 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Subject: hwmon: Do not forcibly enable via686a by default
+Message-Id: <20050925161849.28cc5caf.khali@linux-fr.org>
+
+Do not enable the VIA VT82C686A/B integrated sensors by default, as
+disabled sensors usually means that this feature is not used so the
+values won't make any sense. This has been confusing many users in the
+past:
+
+ http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket=1786
+ http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket=1811
+ http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket=2052
+
+It is still possible to forcibly enable the sensors by using the
+force_addr module parameter.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+ Documentation/hwmon/via686a | 17 +++++++++++++++--
+ drivers/hwmon/via686a.c | 18 +++++++++++-------
+ 2 files changed, 26 insertions(+), 9 deletions(-)
+
+--- gregkh-2.6.orig/drivers/hwmon/via686a.c 2005-09-26 14:45:49.000000000 -0700
++++ gregkh-2.6/drivers/hwmon/via686a.c 2005-09-26 14:47:43.000000000 -0700
+@@ -589,10 +589,8 @@
+ u16 val;
+
+ /* 8231 requires multiple of 256, we enforce that on 686 as well */
+- if (force_addr)
+- address = force_addr & 0xFF00;
+-
+ if (force_addr) {
++ address = force_addr & 0xFF00;
+ dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n",
+ address);
+ if (PCIBIOS_SUCCESSFUL !=
+@@ -603,11 +601,17 @@
+ pci_read_config_word(s_bridge, VIA686A_ENABLE_REG, &val))
+ return -ENODEV;
+ if (!(val & 0x0001)) {
+- dev_warn(&adapter->dev, "enabling sensors\n");
+- if (PCIBIOS_SUCCESSFUL !=
+- pci_write_config_word(s_bridge, VIA686A_ENABLE_REG,
+- val | 0x0001))
++ if (force_addr) {
++ dev_info(&adapter->dev, "enabling sensors\n");
++ if (PCIBIOS_SUCCESSFUL !=
++ pci_write_config_word(s_bridge, VIA686A_ENABLE_REG,
++ val | 0x0001))
++ return -ENODEV;
++ } else {
++ dev_warn(&adapter->dev, "sensors disabled - enable "
++ "with force_addr=0x%x\n", address);
+ return -ENODEV;
++ }
+ }
+
+ /* Reserve the ISA region */
+--- gregkh-2.6.orig/Documentation/hwmon/via686a 2005-08-28 16:41:01.000000000 -0700
++++ gregkh-2.6/Documentation/hwmon/via686a 2005-09-26 14:47:44.000000000 -0700
+@@ -18,8 +18,9 @@
+ Module Parameters
+ -----------------
+
+-force_addr=0xaddr Set the I/O base address. Useful for Asus A7V boards
+- that don't set the address in the BIOS. Does not do a
++force_addr=0xaddr Set the I/O base address. Useful for boards that
++ don't set the address in the BIOS. Look for a BIOS
++ upgrade before resorting to this. Does not do a
+ PCI force; the via686a must still be present in lspci.
+ Don't use this unless the driver complains that the
+ base address is not set.
+@@ -63,3 +64,15 @@
+
+ The driver only updates its values each 1.5 seconds; reading it more often
+ will do no harm, but will return 'old' values.
++
++Known Issues
++------------
++
++This driver handles sensors integrated in some VIA south bridges. It is
++possible that a motherboard maker used a VT82C686A/B chip as part of a
++product design but was not interested in its hardware monitoring features,
++in which case the sensor inputs will not be wired. This is the case of
++the Asus K7V, A7V and A7V133 motherboards, to name only a few of them.
++So, if you need the force_addr parameter, and end up with values which
++don't seem to make any sense, don't look any further: your chip is simply
++not wired for hardware monitoring.
diff --git a/i2c/hwmon-03.patch b/i2c/hwmon-03.patch
new file mode 100644
index 0000000000000..44d48763a6eda
--- /dev/null
+++ b/i2c/hwmon-03.patch
@@ -0,0 +1,169 @@
+From khali@linux-fr.org Mon Sep 26 02:14:01 2005
+Date: Sun, 25 Sep 2005 16:23:07 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Subject: i2c: Discard explicit static initializations to 0
+Message-Id: <20050925162307.0957c197.khali@linux-fr.org>
+
+Kill explicit static initializations to 0 in 10 i2c drivers.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+ drivers/i2c/algos/i2c-algo-pca.c | 2 +-
+ drivers/i2c/algos/i2c-algo-sibyte.c | 2 +-
+ drivers/i2c/busses/i2c-ali15x3.c | 4 ++--
+ drivers/i2c/busses/i2c-amd756.c | 2 +-
+ drivers/i2c/busses/i2c-iop3xx.c | 2 +-
+ drivers/i2c/busses/i2c-piix4.c | 8 ++++----
+ drivers/i2c/busses/i2c-sis5595.c | 4 ++--
+ drivers/i2c/busses/i2c-sis630.c | 2 +-
+ drivers/i2c/busses/i2c-sis96x.c | 2 +-
+ drivers/i2c/busses/i2c-via.c | 2 +-
+ 10 files changed, 15 insertions(+), 15 deletions(-)
+
+--- gregkh-2.6.orig/drivers/i2c/algos/i2c-algo-pca.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/algos/i2c-algo-pca.c 2005-09-26 14:47:46.000000000 -0700
+@@ -34,7 +34,7 @@
+ #define DEB2(fmt, args...) do { if (i2c_debug>=2) printk(fmt, ## args); } while(0)
+ #define DEB3(fmt, args...) do { if (i2c_debug>=3) printk(fmt, ## args); } while(0)
+
+-static int i2c_debug=0;
++static int i2c_debug;
+
+ #define pca_outw(adap, reg, val) adap->write_byte(adap, reg, val)
+ #define pca_inw(adap, reg) adap->read_byte(adap, reg)
+--- gregkh-2.6.orig/drivers/i2c/algos/i2c-algo-sibyte.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/algos/i2c-algo-sibyte.c 2005-09-26 14:47:46.000000000 -0700
+@@ -42,7 +42,7 @@
+
+ /* module parameters:
+ */
+-static int bit_scan=0; /* have a look at what's hanging 'round */
++static int bit_scan; /* have a look at what's hanging 'round */
+
+
+ static int smbus_xfer(struct i2c_adapter *i2c_adap, u16 addr,
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-ali15x3.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-ali15x3.c 2005-09-26 14:47:46.000000000 -0700
+@@ -125,12 +125,12 @@
+
+ /* If force_addr is set to anything different from 0, we forcibly enable
+ the device at the given address. */
+-static u16 force_addr = 0;
++static u16 force_addr;
+ module_param(force_addr, ushort, 0);
+ MODULE_PARM_DESC(force_addr,
+ "Initialize the base address of the i2c controller");
+
+-static unsigned short ali15x3_smba = 0;
++static unsigned short ali15x3_smba;
+
+ static int ali15x3_setup(struct pci_dev *ALI15X3_dev)
+ {
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-amd756.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-amd756.c 2005-09-26 14:47:46.000000000 -0700
+@@ -86,7 +86,7 @@
+ #define AMD756_BLOCK_DATA 0x05
+
+
+-static unsigned short amd756_ioport = 0;
++static unsigned short amd756_ioport;
+
+ /*
+ SMBUS event = I/O 28-29 bit 11
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-iop3xx.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-iop3xx.c 2005-09-26 14:47:46.000000000 -0700
+@@ -43,7 +43,7 @@
+ #include "i2c-iop3xx.h"
+
+ /* global unit counter */
+-static int i2c_id = 0;
++static int i2c_id;
+
+ static inline unsigned char
+ iic_cook_addr(struct i2c_msg *msg)
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-piix4.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-piix4.c 2005-09-26 14:47:46.000000000 -0700
+@@ -90,13 +90,13 @@
+
+ /* If force is set to anything different from 0, we forcibly enable the
+ PIIX4. DANGEROUS! */
+-static int force = 0;
++static int force;
+ module_param (force, int, 0);
+ MODULE_PARM_DESC(force, "Forcibly enable the PIIX4. DANGEROUS!");
+
+ /* If force_addr is set to anything different from 0, we forcibly enable
+ the PIIX4 at the given address. VERY DANGEROUS! */
+-static int force_addr = 0;
++static int force_addr;
+ module_param (force_addr, int, 0);
+ MODULE_PARM_DESC(force_addr,
+ "Forcibly enable the PIIX4 at the given address. "
+@@ -104,14 +104,14 @@
+
+ /* If fix_hstcfg is set to anything different from 0, we reset one of the
+ registers to be a valid value. */
+-static int fix_hstcfg = 0;
++static int fix_hstcfg;
+ module_param (fix_hstcfg, int, 0);
+ MODULE_PARM_DESC(fix_hstcfg,
+ "Fix config register. Needed on some boards (Force CPCI735).");
+
+ static int piix4_transaction(void);
+
+-static unsigned short piix4_smba = 0;
++static unsigned short piix4_smba;
+ static struct i2c_adapter piix4_adapter;
+
+ static struct dmi_system_id __devinitdata piix4_dmi_table[] = {
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-sis5595.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-sis5595.c 2005-09-26 14:47:46.000000000 -0700
+@@ -123,11 +123,11 @@
+
+ /* If force_addr is set to anything different from 0, we forcibly enable
+ the device at the given address. */
+-static u16 force_addr = 0;
++static u16 force_addr;
+ module_param(force_addr, ushort, 0);
+ MODULE_PARM_DESC(force_addr, "Initialize the base address of the i2c controller");
+
+-static unsigned short sis5595_base = 0;
++static unsigned short sis5595_base;
+
+ static u8 sis5595_read(u8 reg)
+ {
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-sis630.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-sis630.c 2005-09-26 14:47:46.000000000 -0700
+@@ -101,7 +101,7 @@
+ MODULE_PARM_DESC(force, "Forcibly enable the SIS630. DANGEROUS!");
+
+ /* acpi base address */
+-static unsigned short acpi_base = 0;
++static unsigned short acpi_base;
+
+ /* supported chips */
+ static int supported[] = {
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-sis96x.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-sis96x.c 2005-09-26 14:47:46.000000000 -0700
+@@ -83,7 +83,7 @@
+ #define SIS96x_BLOCK_DATA 0x05
+
+ static struct i2c_adapter sis96x_adapter;
+-static u16 sis96x_smbus_base = 0;
++static u16 sis96x_smbus_base;
+
+ static inline u8 sis96x_read(u8 reg)
+ {
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-via.c 2005-08-28 16:41:01.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-via.c 2005-09-26 14:47:46.000000000 -0700
+@@ -45,7 +45,7 @@
+ #define IOSPACE 0x06
+ #define IOTEXT "via-i2c"
+
+-static u16 pm_io_base = 0;
++static u16 pm_io_base;
+
+ /*
+ It does not appear from the datasheet that the GPIO pins are
diff --git a/i2c/hwmon-04.patch b/i2c/hwmon-04.patch
new file mode 100644
index 0000000000000..d781ee3adf924
--- /dev/null
+++ b/i2c/hwmon-04.patch
@@ -0,0 +1,38 @@
+From khali@linux-fr.org Mon Sep 26 02:14:05 2005
+Date: Sun, 25 Sep 2005 16:26:44 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Subject: hwmon: Discard explicit static initializations to 0
+Message-Id: <20050925162644.73ca1f94.khali@linux-fr.org>
+
+Kill explicit static initializations to 0 in 2 hwmon drivers.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+ drivers/hwmon/adm1021.c | 2 +-
+ drivers/hwmon/via686a.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- gregkh-2.6.orig/drivers/hwmon/adm1021.c 2005-09-20 08:14:18.000000000 -0700
++++ gregkh-2.6/drivers/hwmon/adm1021.c 2005-09-26 14:47:49.000000000 -0700
+@@ -121,7 +121,7 @@
+ static struct adm1021_data *adm1021_update_device(struct device *dev);
+
+ /* (amalysh) read only mode, otherwise any limit's writing confuse BIOS */
+-static int read_only = 0;
++static int read_only;
+
+
+ /* This is the driver that will be inserted */
+--- gregkh-2.6.orig/drivers/hwmon/via686a.c 2005-09-26 14:47:45.000000000 -0700
++++ gregkh-2.6/drivers/hwmon/via686a.c 2005-09-26 14:47:49.000000000 -0700
+@@ -44,7 +44,7 @@
+
+ /* If force_addr is set to anything different from 0, we forcibly enable
+ the device at the given address. */
+-static unsigned short force_addr = 0;
++static unsigned short force_addr;
+ module_param(force_addr, ushort, 0);
+ MODULE_PARM_DESC(force_addr,
+ "Initialize the base address of the sensors");
diff --git a/i2c/hwmon-05.patch b/i2c/hwmon-05.patch
new file mode 100644
index 0000000000000..e0061d33366f3
--- /dev/null
+++ b/i2c/hwmon-05.patch
@@ -0,0 +1,72 @@
+From khali@linux-fr.org Mon Sep 26 02:14:10 2005
+Date: Sun, 25 Sep 2005 16:29:38 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Subject: hwmon: Discard bogus comment about init setting limits
+Message-Id: <20050925162938.71c87823.khali@linux-fr.org>
+
+Discard a common out-of-date comment in 5 hardware monitoring drivers.
+The hardware monitoring chip drivers are no more setting sensor limits
+at initialization time, for quite some time already.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+ drivers/hwmon/lm78.c | 1 -
+ drivers/hwmon/via686a.c | 1 -
+ drivers/hwmon/w83627hf.c | 1 -
+ drivers/hwmon/w83781d.c | 1 -
+ drivers/hwmon/w83792d.c | 1 -
+ 5 files changed, 5 deletions(-)
+
+--- gregkh-2.6.orig/drivers/hwmon/lm78.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/hwmon/lm78.c 2005-09-26 14:47:51.000000000 -0700
+@@ -726,7 +726,6 @@
+ return i2c_smbus_write_byte_data(client, reg, value);
+ }
+
+-/* Called when we have found a new LM78. It should set limits, etc. */
+ static void lm78_init_client(struct i2c_client *client)
+ {
+ u8 config = lm78_read_value(client, LM78_REG_CONFIG);
+--- gregkh-2.6.orig/drivers/hwmon/via686a.c 2005-09-26 14:47:51.000000000 -0700
++++ gregkh-2.6/drivers/hwmon/via686a.c 2005-09-26 14:47:51.000000000 -0700
+@@ -712,7 +712,6 @@
+ return 0;
+ }
+
+-/* Called when we have found a new VIA686A. Set limits, etc. */
+ static void via686a_init_client(struct i2c_client *client)
+ {
+ u8 reg;
+--- gregkh-2.6.orig/drivers/hwmon/w83627hf.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/hwmon/w83627hf.c 2005-09-26 14:47:51.000000000 -0700
+@@ -1275,7 +1275,6 @@
+ return 0;
+ }
+
+-/* Called when we have found a new W83781D. It should set limits, etc. */
+ static void w83627hf_init_client(struct i2c_client *client)
+ {
+ struct w83627hf_data *data = i2c_get_clientdata(client);
+--- gregkh-2.6.orig/drivers/hwmon/w83781d.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/hwmon/w83781d.c 2005-09-26 14:47:51.000000000 -0700
+@@ -1451,7 +1451,6 @@
+ return 0;
+ }
+
+-/* Called when we have found a new W83781D. It should set limits, etc. */
+ static void
+ w83781d_init_client(struct i2c_client *client)
+ {
+--- gregkh-2.6.orig/drivers/hwmon/w83792d.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/hwmon/w83792d.c 2005-09-26 14:47:51.000000000 -0700
+@@ -1429,7 +1429,6 @@
+ return 0;
+ }
+
+-/* Called when we have found a new W83792D. It should set limits, etc. */
+ static void
+ w83792d_init_client(struct i2c_client *client)
+ {
diff --git a/i2c/hwmon-06.patch b/i2c/hwmon-06.patch
new file mode 100644
index 0000000000000..007f9f504c59d
--- /dev/null
+++ b/i2c/hwmon-06.patch
@@ -0,0 +1,352 @@
+From khali@linux-fr.org Mon Sep 26 02:14:13 2005
+Date: Sun, 25 Sep 2005 16:37:04 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Subject: i2c: Reuse name strings in i2c bus drivers
+Message-Id: <20050925163704.7468caa2.khali@linux-fr.org>
+
+Clean up name string usage in 12 i2c bus drivers:
+* Use the i2c_adapter name for requesting the I/O region rather than
+ redefining a new string.
+* Do not initialize the i2c_adapter name to "unset".
+This should save a few data bytes here and there.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+ drivers/i2c/busses/i2c-ali1535.c | 6 +++---
+ drivers/i2c/busses/i2c-ali1563.c | 6 ++++--
+ drivers/i2c/busses/i2c-ali15x3.c | 5 +++--
+ drivers/i2c/busses/i2c-amd756.c | 5 ++---
+ drivers/i2c/busses/i2c-amd8111.c | 4 +++-
+ drivers/i2c/busses/i2c-i801.c | 4 ++--
+ drivers/i2c/busses/i2c-nforce2.c | 4 ++--
+ drivers/i2c/busses/i2c-piix4.c | 4 ++--
+ drivers/i2c/busses/i2c-sis5595.c | 5 +++--
+ drivers/i2c/busses/i2c-sis630.c | 6 ++++--
+ drivers/i2c/busses/i2c-sis96x.c | 5 +++--
+ drivers/i2c/busses/i2c-via.c | 4 ++--
+ 12 files changed, 33 insertions(+), 25 deletions(-)
+
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-ali1535.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-ali1535.c 2005-09-26 14:48:02.000000000 -0700
+@@ -134,7 +134,7 @@
+ /* -> Read = 1 */
+ #define ALI1535_SMBIO_EN 0x04 /* SMB I/O Space enable */
+
+-
++static struct pci_driver ali1535_driver;
+ static unsigned short ali1535_smba;
+ static DECLARE_MUTEX(i2c_ali1535_sem);
+
+@@ -162,7 +162,8 @@
+ goto exit;
+ }
+
+- if (!request_region(ali1535_smba, ALI1535_SMB_IOSIZE, "ali1535-smb")) {
++ if (!request_region(ali1535_smba, ALI1535_SMB_IOSIZE,
++ ali1535_driver.name)) {
+ dev_err(&dev->dev, "ALI1535_smb region 0x%x already in use!\n",
+ ali1535_smba);
+ goto exit;
+@@ -480,7 +481,6 @@
+ .owner = THIS_MODULE,
+ .class = I2C_CLASS_HWMON,
+ .algo = &smbus_algorithm,
+- .name = "unset",
+ };
+
+ static struct pci_device_id ali1535_ids[] = {
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-ali15x3.c 2005-09-26 14:47:48.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-ali15x3.c 2005-09-26 14:48:02.000000000 -0700
+@@ -130,6 +130,7 @@
+ MODULE_PARM_DESC(force_addr,
+ "Initialize the base address of the i2c controller");
+
++static struct pci_driver ali15x3_driver;
+ static unsigned short ali15x3_smba;
+
+ static int ali15x3_setup(struct pci_dev *ALI15X3_dev)
+@@ -166,7 +167,8 @@
+ if(force_addr)
+ ali15x3_smba = force_addr & ~(ALI15X3_SMB_IOSIZE - 1);
+
+- if (!request_region(ali15x3_smba, ALI15X3_SMB_IOSIZE, "ali15x3-smb")) {
++ if (!request_region(ali15x3_smba, ALI15X3_SMB_IOSIZE,
++ ali15x3_driver.name)) {
+ dev_err(&ALI15X3_dev->dev,
+ "ALI15X3_smb region 0x%x already in use!\n",
+ ali15x3_smba);
+@@ -470,7 +472,6 @@
+ .owner = THIS_MODULE,
+ .class = I2C_CLASS_HWMON,
+ .algo = &smbus_algorithm,
+- .name = "unset",
+ };
+
+ static struct pci_device_id ali15x3_ids[] = {
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-amd756.c 2005-09-26 14:47:48.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-amd756.c 2005-09-26 14:48:02.000000000 -0700
+@@ -85,7 +85,7 @@
+ #define AMD756_PROCESS_CALL 0x04
+ #define AMD756_BLOCK_DATA 0x05
+
+-
++static struct pci_driver amd756_driver;
+ static unsigned short amd756_ioport;
+
+ /*
+@@ -303,7 +303,6 @@
+ .owner = THIS_MODULE,
+ .class = I2C_CLASS_HWMON,
+ .algo = &smbus_algorithm,
+- .name = "unset",
+ };
+
+ enum chiptype { AMD756, AMD766, AMD768, NFORCE, AMD8111 };
+@@ -365,7 +364,7 @@
+ amd756_ioport += SMB_ADDR_OFFSET;
+ }
+
+- if (!request_region(amd756_ioport, SMB_IOSIZE, "amd756-smbus")) {
++ if (!request_region(amd756_ioport, SMB_IOSIZE, amd756_driver.name)) {
+ dev_err(&pdev->dev, "SMB region 0x%x already in use!\n",
+ amd756_ioport);
+ return -ENODEV;
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-i801.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-i801.c 2005-09-26 14:48:02.000000000 -0700
+@@ -110,6 +110,7 @@
+ char read_write, int command);
+
+ static unsigned short i801_smba;
++static struct pci_driver i801_driver;
+ static struct pci_dev *I801_dev;
+ static int isich4;
+
+@@ -143,7 +144,7 @@
+ }
+ }
+
+- if (!request_region(i801_smba, (isich4 ? 16 : 8), "i801-smbus")) {
++ if (!request_region(i801_smba, (isich4 ? 16 : 8), i801_driver.name)) {
+ dev_err(&dev->dev, "I801_smb region 0x%x already in use!\n",
+ i801_smba);
+ error_return = -EBUSY;
+@@ -543,7 +544,6 @@
+ .owner = THIS_MODULE,
+ .class = I2C_CLASS_HWMON,
+ .algo = &smbus_algorithm,
+- .name = "unset",
+ };
+
+ static struct pci_device_id i801_ids[] = {
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-nforce2.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-nforce2.c 2005-09-26 14:48:02.000000000 -0700
+@@ -97,6 +97,7 @@
+ #define NVIDIA_SMB_PRTCL_I2C_BLOCK_DATA 0x4a
+ #define NVIDIA_SMB_PRTCL_PEC 0x80
+
++static struct pci_driver nforce2_driver;
+
+ static s32 nforce2_access(struct i2c_adapter *adap, u16 addr,
+ unsigned short flags, char read_write,
+@@ -113,7 +114,6 @@
+ .owner = THIS_MODULE,
+ .class = I2C_CLASS_HWMON,
+ .algo = &smbus_algorithm,
+- .name = "unset",
+ };
+
+ /* Return -1 on error. See smbus.h for more information */
+@@ -285,7 +285,7 @@
+ smbus->base = iobase & 0xfffc;
+ smbus->size = 8;
+
+- if (!request_region(smbus->base, smbus->size, "nForce2 SMBus")) {
++ if (!request_region(smbus->base, smbus->size, nforce2_driver.name)) {
+ dev_err(&smbus->adapter.dev, "Error requesting region %02x .. %02X for %s\n",
+ smbus->base, smbus->base+smbus->size-1, name);
+ return -1;
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-piix4.c 2005-09-26 14:47:48.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-piix4.c 2005-09-26 14:48:02.000000000 -0700
+@@ -112,6 +112,7 @@
+ static int piix4_transaction(void);
+
+ static unsigned short piix4_smba;
++static struct pci_driver piix4_driver;
+ static struct i2c_adapter piix4_adapter;
+
+ static struct dmi_system_id __devinitdata piix4_dmi_table[] = {
+@@ -157,7 +158,7 @@
+ }
+ }
+
+- if (!request_region(piix4_smba, SMBIOSIZE, "piix4-smbus")) {
++ if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) {
+ dev_err(&PIIX4_dev->dev, "SMB region 0x%x already in use!\n",
+ piix4_smba);
+ return -ENODEV;
+@@ -407,7 +408,6 @@
+ .owner = THIS_MODULE,
+ .class = I2C_CLASS_HWMON,
+ .algo = &smbus_algorithm,
+- .name = "unset",
+ };
+
+ static struct pci_device_id piix4_ids[] = {
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-sis5595.c 2005-09-26 14:47:48.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-sis5595.c 2005-09-26 14:48:02.000000000 -0700
+@@ -127,6 +127,7 @@
+ module_param(force_addr, ushort, 0);
+ MODULE_PARM_DESC(force_addr, "Initialize the base address of the i2c controller");
+
++static struct pci_driver sis5595_driver;
+ static unsigned short sis5595_base;
+
+ static u8 sis5595_read(u8 reg)
+@@ -172,7 +173,8 @@
+
+ /* NB: We grab just the two SMBus registers here, but this may still
+ * interfere with ACPI :-( */
+- if (!request_region(sis5595_base + SMB_INDEX, 2, "sis5595-smbus")) {
++ if (!request_region(sis5595_base + SMB_INDEX, 2,
++ sis5595_driver.name)) {
+ dev_err(&SIS5595_dev->dev, "SMBus registers 0x%04x-0x%04x already in use!\n",
+ sis5595_base + SMB_INDEX, sis5595_base + SMB_INDEX + 1);
+ return -ENODEV;
+@@ -364,7 +366,6 @@
+ static struct i2c_adapter sis5595_adapter = {
+ .owner = THIS_MODULE,
+ .class = I2C_CLASS_HWMON,
+- .name = "unset",
+ .algo = &smbus_algorithm,
+ };
+
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-sis630.c 2005-09-26 14:47:48.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-sis630.c 2005-09-26 14:48:02.000000000 -0700
+@@ -92,6 +92,8 @@
+ #define SIS630_PCALL 0x04
+ #define SIS630_BLOCK_DATA 0x05
+
++static struct pci_driver sis630_driver;
++
+ /* insmod parameters */
+ static int high_clock;
+ static int force;
+@@ -432,7 +434,8 @@
+ dev_dbg(&sis630_dev->dev, "ACPI base at 0x%04x\n", acpi_base);
+
+ /* Everything is happy, let's grab the memory and set things up. */
+- if (!request_region(acpi_base + SMB_STS, SIS630_SMB_IOREGION, "sis630-smbus")) {
++ if (!request_region(acpi_base + SMB_STS, SIS630_SMB_IOREGION,
++ sis630_driver.name)) {
+ dev_err(&sis630_dev->dev, "SMBus registers 0x%04x-0x%04x already "
+ "in use!\n", acpi_base + SMB_STS, acpi_base + SMB_SAA);
+ goto exit;
+@@ -455,7 +458,6 @@
+ static struct i2c_adapter sis630_adapter = {
+ .owner = THIS_MODULE,
+ .class = I2C_CLASS_HWMON,
+- .name = "unset",
+ .algo = &smbus_algorithm,
+ };
+
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-sis96x.c 2005-09-26 14:47:48.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-sis96x.c 2005-09-26 14:48:02.000000000 -0700
+@@ -82,6 +82,7 @@
+ #define SIS96x_PROC_CALL 0x04
+ #define SIS96x_BLOCK_DATA 0x05
+
++static struct pci_driver sis96x_driver;
+ static struct i2c_adapter sis96x_adapter;
+ static u16 sis96x_smbus_base;
+
+@@ -257,7 +258,6 @@
+ .owner = THIS_MODULE,
+ .class = I2C_CLASS_HWMON,
+ .algo = &smbus_algorithm,
+- .name = "unset",
+ };
+
+ static struct pci_device_id sis96x_ids[] = {
+@@ -294,7 +294,8 @@
+ sis96x_smbus_base);
+
+ /* Everything is happy, let's grab the memory and set things up. */
+- if (!request_region(sis96x_smbus_base, SMB_IOSIZE, "sis96x-smbus")) {
++ if (!request_region(sis96x_smbus_base, SMB_IOSIZE,
++ sis96x_driver.name)) {
+ dev_err(&dev->dev, "SMBus registers 0x%04x-0x%04x "
+ "already in use!\n", sis96x_smbus_base,
+ sis96x_smbus_base + SMB_IOSIZE - 1);
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-via.c 2005-09-26 14:47:48.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-via.c 2005-09-26 14:48:02.000000000 -0700
+@@ -43,8 +43,8 @@
+
+ /* io-region reservation */
+ #define IOSPACE 0x06
+-#define IOTEXT "via-i2c"
+
++static struct pci_driver vt586b_driver;
+ static u16 pm_io_base;
+
+ /*
+@@ -130,7 +130,7 @@
+ pci_read_config_word(dev, base, &pm_io_base);
+ pm_io_base &= (0xff << 8);
+
+- if (!request_region(I2C_DIR, IOSPACE, IOTEXT)) {
++ if (!request_region(I2C_DIR, IOSPACE, vt586b_driver.name)) {
+ dev_err(&dev->dev, "IO 0x%x-0x%x already in use\n", I2C_DIR, I2C_DIR + IOSPACE);
+ return -ENODEV;
+ }
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-ali1563.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-ali1563.c 2005-09-26 14:48:02.000000000 -0700
+@@ -60,6 +60,7 @@
+
+ #define HST_CNTL2_SIZEMASK 0x38
+
++static struct pci_driver ali1563_pci_driver;
+ static unsigned short ali1563_smba;
+
+ static int ali1563_transaction(struct i2c_adapter * a, int size)
+@@ -350,7 +351,8 @@
+ dev_warn(&dev->dev,"ali1563_smba Uninitialized\n");
+ goto Err;
+ }
+- if (!request_region(ali1563_smba,ALI1563_SMB_IOSIZE,"i2c-ali1563")) {
++ if (!request_region(ali1563_smba, ALI1563_SMB_IOSIZE,
++ ali1563_pci_driver.name)) {
+ dev_warn(&dev->dev,"Could not allocate I/O space");
+ goto Err;
+ }
+@@ -406,7 +408,7 @@
+ MODULE_DEVICE_TABLE (pci, ali1563_id_table);
+
+ static struct pci_driver ali1563_pci_driver = {
+- .name = "ali1563_i2c",
++ .name = "ali1563_smbus",
+ .id_table = ali1563_id_table,
+ .probe = ali1563_probe,
+ .remove = __devexit_p(ali1563_remove),
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-amd8111.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-amd8111.c 2005-09-26 14:48:02.000000000 -0700
+@@ -30,6 +30,8 @@
+ int size;
+ };
+
++static struct pci_driver amd8111_driver;
++
+ /*
+ * AMD PCI control registers definitions.
+ */
+@@ -352,7 +354,7 @@
+ smbus->base = pci_resource_start(dev, 0);
+ smbus->size = pci_resource_len(dev, 0);
+
+- if (!request_region(smbus->base, smbus->size, "amd8111 SMBus 2.0"))
++ if (!request_region(smbus->base, smbus->size, amd8111_driver.name))
+ goto out_kfree;
+
+ smbus->adapter.owner = THIS_MODULE;
diff --git a/i2c/hwmon-07.patch b/i2c/hwmon-07.patch
new file mode 100644
index 0000000000000..3ca2cf3846b66
--- /dev/null
+++ b/i2c/hwmon-07.patch
@@ -0,0 +1,101 @@
+From khali@linux-fr.org Mon Sep 26 02:14:20 2005
+Date: Sun, 25 Sep 2005 16:41:18 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Cc: Yani Ioannou <yani.ioannou@gmail.com>
+Subject: hwmon: w83l785ts converted to dynamic sysfs callbacks
+Message-Id: <20050925164118.3f059cee.khali@linux-fr.org>
+
+Convert the w83l785ts driver to use dynamic sysfs callbacks. This is a
+small driver so the benefit is thin, but still worth it.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+ drivers/hwmon/w83l785ts.c | 36 ++++++++++++++++++------------------
+ 1 file changed, 18 insertions(+), 18 deletions(-)
+
+--- gregkh-2.6.orig/drivers/hwmon/w83l785ts.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/hwmon/w83l785ts.c 2005-09-26 14:48:05.000000000 -0700
+@@ -37,6 +37,7 @@
+ #include <linux/jiffies.h>
+ #include <linux/i2c.h>
+ #include <linux/hwmon.h>
++#include <linux/hwmon-sysfs.h>
+ #include <linux/err.h>
+
+ /* How many retries on register read error */
+@@ -111,27 +112,24 @@
+ unsigned long last_updated; /* in jiffies */
+
+ /* registers values */
+- u8 temp, temp_over;
++ u8 temp[2]; /* 0: input
++ 1: critical limit */
+ };
+
+ /*
+ * Sysfs stuff
+ */
+
+-static ssize_t show_temp(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
++ char *buf)
+ {
++ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+ struct w83l785ts_data *data = w83l785ts_update_device(dev);
+- return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp));
++ return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[attr->index]));
+ }
+
+-static ssize_t show_temp_over(struct device *dev, struct device_attribute *attr, char *buf)
+-{
+- struct w83l785ts_data *data = w83l785ts_update_device(dev);
+- return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_over));
+-}
+-
+-static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL);
+-static DEVICE_ATTR(temp1_max, S_IRUGO, show_temp_over, NULL);
++static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL, 0);
++static SENSOR_DEVICE_ATTR(temp1_max, S_IRUGO, show_temp, NULL, 1);
+
+ /*
+ * Real code
+@@ -228,7 +226,7 @@
+ init_MUTEX(&data->update_lock);
+
+ /* Default values in case the first read fails (unlikely). */
+- data->temp_over = data->temp = 0;
++ data->temp[1] = data->temp[0] = 0;
+
+ /* Tell the I2C layer a new client has arrived. */
+ if ((err = i2c_attach_client(new_client)))
+@@ -246,8 +244,10 @@
+ goto exit_detach;
+ }
+
+- device_create_file(&new_client->dev, &dev_attr_temp1_input);
+- device_create_file(&new_client->dev, &dev_attr_temp1_max);
++ device_create_file(&new_client->dev,
++ &sensor_dev_attr_temp1_input.dev_attr);
++ device_create_file(&new_client->dev,
++ &sensor_dev_attr_temp1_max.dev_attr);
+
+ return 0;
+
+@@ -305,10 +305,10 @@
+
+ if (!data->valid || time_after(jiffies, data->last_updated + HZ * 2)) {
+ dev_dbg(&client->dev, "Updating w83l785ts data.\n");
+- data->temp = w83l785ts_read_value(client,
+- W83L785TS_REG_TEMP, data->temp);
+- data->temp_over = w83l785ts_read_value(client,
+- W83L785TS_REG_TEMP_OVER, data->temp_over);
++ data->temp[0] = w83l785ts_read_value(client,
++ W83L785TS_REG_TEMP, data->temp[0]);
++ data->temp[1] = w83l785ts_read_value(client,
++ W83L785TS_REG_TEMP_OVER, data->temp[1]);
+
+ data->last_updated = jiffies;
+ data->valid = 1;
diff --git a/i2c/hwmon-08.patch b/i2c/hwmon-08.patch
new file mode 100644
index 0000000000000..45ced249fc74f
--- /dev/null
+++ b/i2c/hwmon-08.patch
@@ -0,0 +1,38 @@
+From khali@linux-fr.org Mon Sep 26 02:14:26 2005
+Date: Sun, 25 Sep 2005 16:45:03 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Subject: hwmon: Minor w83l785ts optimization
+Message-Id: <20050925164503.47b7f438.khali@linux-fr.org>
+
+Using s8 instead of u8 to store temperature register values saves a
+few instructions on sysfs file read. The very same was done for
+several other drivers a while ago (lm63, lm83, lm90...)
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+ drivers/hwmon/w83l785ts.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- gregkh-2.6.orig/drivers/hwmon/w83l785ts.c 2005-09-26 14:48:07.000000000 -0700
++++ gregkh-2.6/drivers/hwmon/w83l785ts.c 2005-09-26 14:48:12.000000000 -0700
+@@ -74,7 +74,7 @@
+ * The W83L785TS-S uses signed 8-bit values.
+ */
+
+-#define TEMP_FROM_REG(val) ((val & 0x80 ? val-0x100 : val) * 1000)
++#define TEMP_FROM_REG(val) ((val) * 1000)
+
+ /*
+ * Functions declaration
+@@ -112,7 +112,7 @@
+ unsigned long last_updated; /* in jiffies */
+
+ /* registers values */
+- u8 temp[2]; /* 0: input
++ s8 temp[2]; /* 0: input
+ 1: critical limit */
+ };
+
diff --git a/i2c/hwmon-09.patch b/i2c/hwmon-09.patch
new file mode 100644
index 0000000000000..ed59228bc8e84
--- /dev/null
+++ b/i2c/hwmon-09.patch
@@ -0,0 +1,50 @@
+From khali@linux-fr.org Mon Sep 26 02:14:29 2005
+Date: Sun, 25 Sep 2005 16:50:06 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Subject: i2c: Adjust i2c_probe() for busses without SMBUS_QUICK
+Message-Id: <20050925165006.53b182e7.khali@linux-fr.org>
+
+Move the check for SMBUS_QUICK in i2c_probe() after the forced
+addresses have been handled. This makes it possible for a driver to
+leave the probed address lists empty, only providing forced addresses,
+and get i2c_probe to work even if the bus doesn't support SMBUS_QUICK.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+ drivers/i2c/i2c-core.c | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+--- gregkh-2.6.orig/drivers/i2c/i2c-core.c 2005-09-20 08:14:19.000000000 -0700
++++ gregkh-2.6/drivers/i2c/i2c-core.c 2005-09-26 14:48:15.000000000 -0700
+@@ -706,10 +706,6 @@
+ int i, err;
+ int adap_id = i2c_adapter_id(adapter);
+
+- /* Forget it if we can't probe using SMBUS_QUICK */
+- if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_QUICK))
+- return -1;
+-
+ /* Force entries are done first, and are not affected by ignore
+ entries */
+ if (address_data->forces) {
+@@ -736,6 +732,17 @@
+ }
+ }
+
++ /* Stop here if we can't use SMBUS_QUICK */
++ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) {
++ if (address_data->probe[0] == I2C_CLIENT_END
++ && address_data->normal_i2c[0] == I2C_CLIENT_END)
++ return 0;
++
++ dev_warn(&adapter->dev, "SMBus Quick command not supported, "
++ "can't probe for chips\n");
++ return -1;
++ }
++
+ /* Probe entries are done second, and are not affected by ignore
+ entries either */
+ for (i = 0; address_data->probe[i] != I2C_CLIENT_END; i += 2) {
diff --git a/i2c/hwmon-10.patch b/i2c/hwmon-10.patch
new file mode 100644
index 0000000000000..db33a437d6da7
--- /dev/null
+++ b/i2c/hwmon-10.patch
@@ -0,0 +1,36 @@
+From khali@linux-fr.org Mon Sep 26 02:14:41 2005
+Date: Sun, 25 Sep 2005 16:53:04 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Cc: Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
+Subject: i2c: Fix I2C_FUNC_PROTOCOL_MANGLING documentation
+Message-Id: <20050925165304.159076c8.khali@linux-fr.org>
+
+From: Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
+
+Fix the description of I2C_FUNC_PROTOCOL_MANGLING.
+
+From: Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+ Documentation/i2c/functionality | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- gregkh-2.6.orig/Documentation/i2c/functionality 2005-09-20 08:14:06.000000000 -0700
++++ gregkh-2.6/Documentation/i2c/functionality 2005-09-26 14:48:18.000000000 -0700
+@@ -17,9 +17,10 @@
+ I2C_FUNC_I2C Plain i2c-level commands (Pure SMBus
+ adapters typically can not do these)
+ I2C_FUNC_10BIT_ADDR Handles the 10-bit address extensions
+- I2C_FUNC_PROTOCOL_MANGLING Knows about the I2C_M_REV_DIR_ADDR,
+- I2C_M_REV_DIR_ADDR and I2C_M_REV_DIR_NOSTART
+- flags (which modify the i2c protocol!)
++ I2C_FUNC_PROTOCOL_MANGLING Knows about the I2C_M_IGNORE_NAK,
++ I2C_M_REV_DIR_ADDR, I2C_M_NOSTART and
++ I2C_M_NO_RD_ACK flags (which modify the
++ I2C protocol!)
+ I2C_FUNC_SMBUS_QUICK Handles the SMBus write_quick command
+ I2C_FUNC_SMBUS_READ_BYTE Handles the SMBus read_byte command
+ I2C_FUNC_SMBUS_WRITE_BYTE Handles the SMBus write_byte command
diff --git a/i2c/hwmon-11.patch b/i2c/hwmon-11.patch
new file mode 100644
index 0000000000000..7df6b8bbfe31b
--- /dev/null
+++ b/i2c/hwmon-11.patch
@@ -0,0 +1,35 @@
+From khali@linux-fr.org Mon Sep 26 02:14:46 2005
+Date: Sun, 25 Sep 2005 16:56:43 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Cc: Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
+Subject: i2c: Fix union i2c_smbus_data definition
+Message-Id: <20050925165643.151d5da1.khali@linux-fr.org>
+
+From: Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
+
+The i2c_smbus_data union block member has a comment stating that an
+extra byte is required for SMBus Block Process Call transactions. This
+has been true for three weeks around June 2002, but no more since, so
+it is about time that we drop this comment and fix the definition.
+
+From: Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+ include/linux/i2c.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- gregkh-2.6.orig/include/linux/i2c.h 2005-09-26 14:26:26.000000000 -0700
++++ gregkh-2.6/include/linux/i2c.h 2005-09-26 14:48:20.000000000 -0700
+@@ -454,8 +454,7 @@
+ union i2c_smbus_data {
+ __u8 byte;
+ __u16 word;
+- __u8 block[I2C_SMBUS_BLOCK_MAX + 3]; /* block[0] is used for length */
+- /* one more for read length in block process call */
++ __u8 block[I2C_SMBUS_BLOCK_MAX + 2]; /* block[0] is used for length */
+ /* and one more for PEC */
+ };
+
diff --git a/i2c/hwmon-12.patch b/i2c/hwmon-12.patch
new file mode 100644
index 0000000000000..20402804c1347
--- /dev/null
+++ b/i2c/hwmon-12.patch
@@ -0,0 +1,28 @@
+From khali@linux-fr.org Mon Sep 26 02:14:51 2005
+Date: Sun, 25 Sep 2005 16:58:22 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Cc: Vojtech Pavlik <vojtech@suse.cz>
+Subject: i2c: Minor i2c-amd8111 cleanup
+Message-Id: <20050925165822.3421429b.khali@linux-fr.org>
+
+I noticed a useless instruction in the i2c-amd8111 driver.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+CC: Vojtech Pavlik <vojtech@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+ drivers/i2c/busses/i2c-amd8111.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-amd8111.c 2005-09-26 14:48:04.000000000 -0700
++++ gregkh-2.6/drivers/i2c/busses/i2c-amd8111.c 2005-09-26 14:48:22.000000000 -0700
+@@ -244,7 +244,6 @@
+ break;
+
+ case I2C_SMBUS_BLOCK_PROC_CALL:
+- protocol |= pec;
+ len = min_t(u8, data->block[0], 31);
+ amd_ec_write(smbus, AMD_SMB_CMD, command);
+ amd_ec_write(smbus, AMD_SMB_BCNT, len);
diff --git a/i2c/hwmon-13.patch b/i2c/hwmon-13.patch
new file mode 100644
index 0000000000000..587cdf419bb13
--- /dev/null
+++ b/i2c/hwmon-13.patch
@@ -0,0 +1,54 @@
+From khali@linux-fr.org Mon Sep 26 02:14:58 2005
+Date: Sun, 25 Sep 2005 17:01:11 +0200
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Cc: Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
+Subject: i2c: Several PEC-related fixes in software SMBus emulation
+Message-Id: <20050925170111.6a3d2ce7.khali@linux-fr.org>
+
+From: Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
+
+Fix several errors in I2C SMBus emulation when PEC is used:
+* Weird logic error in SMBus Write Word transactions.
+* Wrong buffer size, affecting SMBus Block Write transactions.
+* Potential buffer overrun in SMBus Block Write transactions.
+
+From: Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+ drivers/i2c/i2c-core.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- gregkh-2.6.orig/drivers/i2c/i2c-core.c 2005-09-26 14:48:17.000000000 -0700
++++ gregkh-2.6/drivers/i2c/i2c-core.c 2005-09-26 14:48:28.000000000 -0700
+@@ -864,7 +864,7 @@
+ break;
+ case I2C_SMBUS_BYTE_DATA:
+ buf[2] = data->byte;
+- data->word = buf[2] ||
++ data->word = buf[2] |
+ (i2c_smbus_pec(3, buf, NULL) << 8);
+ size = I2C_SMBUS_WORD_DATA;
+ break;
+@@ -1033,8 +1033,8 @@
+ need to use only one message; when reading, we need two. We initialize
+ most things with sane defaults, to keep the code below somewhat
+ simpler. */
+- unsigned char msgbuf0[34];
+- unsigned char msgbuf1[34];
++ unsigned char msgbuf0[I2C_SMBUS_BLOCK_MAX+3];
++ unsigned char msgbuf1[I2C_SMBUS_BLOCK_MAX+2];
+ int num = read_write == I2C_SMBUS_READ?2:1;
+ struct i2c_msg msg[2] = { { addr, flags, 1, msgbuf0 },
+ { addr, flags | I2C_M_RD, 0, msgbuf1 }
+@@ -1097,7 +1097,7 @@
+ }
+ if(size == I2C_SMBUS_BLOCK_DATA_PEC)
+ (msg[0].len)++;
+- for (i = 1; i <= msg[0].len; i++)
++ for (i = 1; i < msg[0].len; i++)
+ msgbuf0[i] = data->block[i-1];
+ }
+ break;