aboutsummaryrefslogtreecommitdiffstats
path: root/i2c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-11-30 23:38:05 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-11-30 23:38:05 -0800
commitba7b60dbf1b49c0777e2ac9b7305ae95d7e24c5d (patch)
tree9c3f187f30b606d9eb240d38248be25b924e840a /i2c
parentf72486aeeb282ba3eabd5ddb686bc18243e0f8a0 (diff)
downloadpatches-ba7b60dbf1b49c0777e2ac9b7305ae95d7e24c5d.tar.gz
2.6.15-rc4 sync
Diffstat (limited to 'i2c')
-rw-r--r--i2c/hwmon-w83792d-fan-pins-fixes.patch76
1 files changed, 0 insertions, 76 deletions
diff --git a/i2c/hwmon-w83792d-fan-pins-fixes.patch b/i2c/hwmon-w83792d-fan-pins-fixes.patch
deleted file mode 100644
index 38f1adeeed192..0000000000000
--- a/i2c/hwmon-w83792d-fan-pins-fixes.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From khali@linux-fr.org Tue Nov 29 13:26:51 2005
-Date: Tue, 29 Nov 2005 22:27:14 +0100
-From: Jean Delvare <khali@linux-fr.org>
-To: Greg KH <greg@kroah.com>
-Cc: Yuan Mu <ymu@winbond.com.tw>
-Subject: [PATCH] hwmon: w83792d fix unused fan pins
-Message-Id: <20051129222714.0b53543e.khali@linux-fr.org>
-Content-Disposition: inline; filename=hwmon-w83792d-fan-pins-fixes.patch
-
-1. This patch add check for fan4,5,6,7 and do not create device file
- if their pins are not configured as fan.
-2. Fix the issue that can not set fan divisor to 128.
-3. Fix the index out of bounds bug in w83792d_detect function.
-
-Signed-off-by: Yuan Mu <ymu@winbond.com.tw>
-Signed-off-by: Jean Delvare <khali@linux-fr.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
----
- drivers/hwmon/w83792d.c | 25 ++++++++++++++++++-------
- 1 file changed, 18 insertions(+), 7 deletions(-)
-
---- gregkh-2.6.orig/drivers/hwmon/w83792d.c
-+++ gregkh-2.6/drivers/hwmon/w83792d.c
-@@ -193,6 +193,7 @@ static const u8 W83792D_REG_LEVELS[3][4]
- 0xE2 } /* (bit3-0) SmartFanII: Fan3 Level 3 */
- };
-
-+#define W83792D_REG_GPIO_EN 0x1A
- #define W83792D_REG_CONFIG 0x40
- #define W83792D_REG_VID_FANDIV 0x47
- #define W83792D_REG_CHIPID 0x49
-@@ -257,7 +258,7 @@ DIV_TO_REG(long val)
- {
- int i;
- val = SENSORS_LIMIT(val, 1, 128) >> 1;
-- for (i = 0; i < 6; i++) {
-+ for (i = 0; i < 7; i++) {
- if (val == 0)
- break;
- val >>= 1;
-@@ -1282,8 +1283,8 @@ w83792d_detect(struct i2c_adapter *adapt
- w83792d_init_client(new_client);
-
- /* A few vars need to be filled upon startup */
-- for (i = 1; i <= 7; i++) {
-- data->fan_min[i - 1] = w83792d_read_value(new_client,
-+ for (i = 0; i < 7; i++) {
-+ data->fan_min[i] = w83792d_read_value(new_client,
- W83792D_REG_FAN_MIN[i]);
- }
-
-@@ -1306,10 +1307,20 @@ w83792d_detect(struct i2c_adapter *adapt
- device_create_file_fan(new_client, 1);
- device_create_file_fan(new_client, 2);
- device_create_file_fan(new_client, 3);
-- device_create_file_fan(new_client, 4);
-- device_create_file_fan(new_client, 5);
-- device_create_file_fan(new_client, 6);
-- device_create_file_fan(new_client, 7);
-+
-+ /* Read GPIO enable register to check if pins for fan 4,5 are used as
-+ GPIO */
-+ val1 = w83792d_read_value(new_client, W83792D_REG_GPIO_EN);
-+ if (!(val1 & 0x40))
-+ device_create_file_fan(new_client, 4);
-+ if (!(val1 & 0x20))
-+ device_create_file_fan(new_client, 5);
-+
-+ val1 = w83792d_read_value(new_client, W83792D_REG_PIN);
-+ if (val1 & 0x40)
-+ device_create_file_fan(new_client, 6);
-+ if (val1 & 0x04)
-+ device_create_file_fan(new_client, 7);
-
- device_create_file_temp1(new_client); /* Temp1 */
- device_create_file_temp_add(new_client, 2); /* Temp2 */