aboutsummaryrefslogtreecommitdiffstats
path: root/i2c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-11-07 21:13:11 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-11-07 21:13:11 -0800
commit0d535b224a411112bf2b5f225f3d58258f2c6bc6 (patch)
treed7669b3bfe3f1f8afe9722f8beaa3f9e7a0bd84c /i2c
parent32e87123541e8abdbd57f9341000c0adb3c48100 (diff)
downloadpatches-0d535b224a411112bf2b5f225f3d58258f2c6bc6.tar.gz
2.6.14-git10 update and new i2c patches
Diffstat (limited to 'i2c')
-rw-r--r--i2c/hwmon-adm1025-adm1026-remove-deprecated-symbols.patch82
-rw-r--r--i2c/i2c-ds1337-init.patch69
-rw-r--r--i2c/i2c-i801-explicitly-set-smbauxctl.patch43
3 files changed, 194 insertions, 0 deletions
diff --git a/i2c/hwmon-adm1025-adm1026-remove-deprecated-symbols.patch b/i2c/hwmon-adm1025-adm1026-remove-deprecated-symbols.patch
new file mode 100644
index 0000000000000..0cefa59e4d825
--- /dev/null
+++ b/i2c/hwmon-adm1025-adm1026-remove-deprecated-symbols.patch
@@ -0,0 +1,82 @@
+From khali@linux-fr.org Sun Nov 6 14:17:08 2005
+Date: Sun, 6 Nov 2005 23:13:06 +0100
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Cc: Grant Coady <gcoady@gmail.com>
+Subject: [PATCH] hwmon: remove deprecated sysfs names of adm1025 and adm1026
+Message-Id: <20051106231306.0c069951.khali@linux-fr.org>
+Content-Disposition: inline; filename=hwmon-adm1025-adm1026-remove-deprecated-symbols.patch
+
+From: Grant Coady <gcoady@gmail.com>
+
+drivers, hwmon, adm1025 and adm1026: remove deprecated sysfs names.
+
+these names have been listed for removal for six months, time for them to go
+
+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>
+---
+ Documentation/feature-removal-schedule.txt | 9 ---------
+ drivers/hwmon/adm1025.c | 4 ----
+ drivers/hwmon/adm1026.c | 4 ----
+ 3 files changed, 17 deletions(-)
+
+--- gregkh-2.6.orig/Documentation/feature-removal-schedule.txt
++++ gregkh-2.6/Documentation/feature-removal-schedule.txt
+@@ -60,15 +60,6 @@ Who: Jody McIntyre <scjody@steamballoon.
+
+ ---------------------------
+
+-What: i2c sysfs name change: in1_ref, vid deprecated in favour of cpu0_vid
+-When: November 2005
+-Files: drivers/i2c/chips/adm1025.c, drivers/i2c/chips/adm1026.c
+-Why: Match the other drivers' name for the same function, duplicate names
+- will be available until removal of old names.
+-Who: Grant Coady <gcoady@gmail.com>
+-
+----------------------------
+-
+ What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
+ When: November 2005
+ Files: drivers/pcmcia/: pcmcia_ioctl.c
+--- gregkh-2.6.orig/drivers/hwmon/adm1025.c
++++ gregkh-2.6/drivers/hwmon/adm1025.c
+@@ -287,8 +287,6 @@ static ssize_t show_vid(struct device *d
+ struct adm1025_data *data = adm1025_update_device(dev);
+ return sprintf(buf, "%u\n", vid_from_reg(data->vid, data->vrm));
+ }
+-/* in1_ref is deprecated in favour of cpu0_vid, remove after 2005-11-11 */
+-static DEVICE_ATTR(in1_ref, S_IRUGO, show_vid, NULL);
+ static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
+
+ static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
+@@ -444,8 +442,6 @@ static int adm1025_detect(struct i2c_ada
+ device_create_file(&new_client->dev, &dev_attr_temp1_max);
+ device_create_file(&new_client->dev, &dev_attr_temp2_max);
+ device_create_file(&new_client->dev, &dev_attr_alarms);
+- /* in1_ref is deprecated, remove after 2005-11-11 */
+- device_create_file(&new_client->dev, &dev_attr_in1_ref);
+ device_create_file(&new_client->dev, &dev_attr_cpu0_vid);
+ device_create_file(&new_client->dev, &dev_attr_vrm);
+
+--- gregkh-2.6.orig/drivers/hwmon/adm1026.c
++++ gregkh-2.6/drivers/hwmon/adm1026.c
+@@ -1227,8 +1227,6 @@ static ssize_t show_vid_reg(struct devic
+ struct adm1026_data *data = adm1026_update_device(dev);
+ return sprintf(buf,"%d\n", vid_from_reg(data->vid & 0x3f, data->vrm));
+ }
+-/* vid deprecated in favour of cpu0_vid, remove after 2005-11-11 */
+-static DEVICE_ATTR(vid, S_IRUGO, show_vid_reg, NULL);
+ static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL);
+
+ static ssize_t show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
+@@ -1673,8 +1671,6 @@ static int adm1026_detect(struct i2c_ada
+ device_create_file(&new_client->dev, &dev_attr_temp1_crit_enable);
+ device_create_file(&new_client->dev, &dev_attr_temp2_crit_enable);
+ device_create_file(&new_client->dev, &dev_attr_temp3_crit_enable);
+- /* vid deprecated in favour of cpu0_vid, remove after 2005-11-11 */
+- device_create_file(&new_client->dev, &dev_attr_vid);
+ device_create_file(&new_client->dev, &dev_attr_cpu0_vid);
+ device_create_file(&new_client->dev, &dev_attr_vrm);
+ device_create_file(&new_client->dev, &dev_attr_alarms);
diff --git a/i2c/i2c-ds1337-init.patch b/i2c/i2c-ds1337-init.patch
new file mode 100644
index 0000000000000..51744e163d1b8
--- /dev/null
+++ b/i2c/i2c-ds1337-init.patch
@@ -0,0 +1,69 @@
+From khali@linux-fr.org Mon Nov 7 13:30:27 2005
+Date: Mon, 7 Nov 2005 22:30:14 +0100
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Cc: Michael Burian <dynmail1@gassner-waagen.at>, James Chapman
+ <jchapman@katalix.com>
+Subject: [PATCH] i2c: Extend ds1337 initialization
+Message-Id: <20051107223014.1af97872.khali@linux-fr.org>
+Content-Disposition: inline; filename=i2c-ds1337-init.patch
+
+From: Michael Burian <dynmail1@gassner-waagen.at>
+
+Add code to handle case where board firmware does not start the
+RTC.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+CC: James Chapman <jchapman@katalix.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ drivers/i2c/chips/ds1337.c | 37 +++++++++++++++++++++++++++++++------
+ 1 file changed, 31 insertions(+), 6 deletions(-)
+
+--- gregkh-2.6.orig/drivers/i2c/chips/ds1337.c
++++ gregkh-2.6/drivers/i2c/chips/ds1337.c
+@@ -337,13 +337,38 @@ exit:
+
+ static void ds1337_init_client(struct i2c_client *client)
+ {
+- s32 val;
++ u8 status, control;
+
+- /* Ensure that device is set in 24-hour mode */
+- val = i2c_smbus_read_byte_data(client, DS1337_REG_HOUR);
+- if ((val >= 0) && (val & (1 << 6)))
+- i2c_smbus_write_byte_data(client, DS1337_REG_HOUR,
+- val & 0x3f);
++ /* On some boards, the RTC isn't configured by boot firmware.
++ * Handle that case by starting/configuring the RTC now.
++ */
++ status = i2c_smbus_read_byte_data(client, DS1337_REG_STATUS);
++ control = i2c_smbus_read_byte_data(client, DS1337_REG_CONTROL);
++
++ if ((status & 0x80) || (control & 0x80)) {
++ /* RTC not running */
++ u8 buf[16];
++ struct i2c_msg msg[1];
++
++ dev_dbg(&client->dev, "%s: RTC not running!\n", __FUNCTION__);
++
++ /* Initialize all, including STATUS and CONTROL to zero */
++ memset(buf, 0, sizeof(buf));
++ msg[0].addr = client->addr;
++ msg[0].flags = 0;
++ msg[0].len = sizeof(buf);
++ msg[0].buf = &buf[0];
++
++ i2c_transfer(client->adapter, msg, 1);
++ } else {
++ /* Running: ensure that device is set in 24-hour mode */
++ s32 val;
++
++ val = i2c_smbus_read_byte_data(client, DS1337_REG_HOUR);
++ if ((val >= 0) && (val & (1 << 6)))
++ i2c_smbus_write_byte_data(client, DS1337_REG_HOUR,
++ val & 0x3f);
++ }
+ }
+
+ static int ds1337_detach_client(struct i2c_client *client)
diff --git a/i2c/i2c-i801-explicitly-set-smbauxctl.patch b/i2c/i2c-i801-explicitly-set-smbauxctl.patch
new file mode 100644
index 0000000000000..c368393923e14
--- /dev/null
+++ b/i2c/i2c-i801-explicitly-set-smbauxctl.patch
@@ -0,0 +1,43 @@
+From khali@linux-fr.org Sun Nov 6 14:05:23 2005
+Date: Sun, 6 Nov 2005 23:04:51 +0100
+From: Jean Delvare <khali@linux-fr.org>
+To: Greg KH <greg@kroah.com>
+Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
+Subject: [PATCH] i2c: i2c-i801 explicitly enables/disables PEC
+Message-Id: <20051106230451.0e41fdc6.khali@linux-fr.org>
+Content-Disposition: inline; filename=i2c-i801-explicitly-set-smbauxctl.patch
+
+From: "Mark M. Hoffman" <mhoffman@lightlink.com>
+
+This patch tweaks i2c-i801.c so that the driver always sets the SMBAUXCTL
+register (which enables/disables PEC) explicitly before each transaction.
+
+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/i2c/busses/i2c-i801.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+--- gregkh-2.6.orig/drivers/i2c/busses/i2c-i801.c
++++ gregkh-2.6/drivers/i2c/busses/i2c-i801.c
+@@ -468,8 +468,7 @@ static s32 i801_access(struct i2c_adapte
+ return -1;
+ }
+
+- if (hwpec)
+- outb_p(1, SMBAUXCTL); /* enable hardware PEC */
++ outb_p(hwpec, SMBAUXCTL); /* enable/disable hardware PEC */
+
+ if(block)
+ ret = i801_block_transaction(data, read_write, size, hwpec);
+@@ -478,9 +477,6 @@ static s32 i801_access(struct i2c_adapte
+ ret = i801_transaction();
+ }
+
+- if (hwpec)
+- outb_p(0, SMBAUXCTL); /* disable hardware PEC */
+-
+ if(block)
+ return ret;
+ if(ret)