diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-07 21:16:55 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-07 21:16:55 -0800 |
commit | 033190f87bc93cc1b702cbea760f7409525ece1f (patch) | |
tree | 922fe6d5255e333668a443ea62fc625243eaba7b /i2c | |
parent | 0d535b224a411112bf2b5f225f3d58258f2c6bc6 (diff) | |
download | patches-033190f87bc93cc1b702cbea760f7409525ece1f.tar.gz |
more i2c patches
Diffstat (limited to 'i2c')
-rw-r--r-- | i2c/hwmon-w83627hf-bugfixes.patch | 60 | ||||
-rw-r--r-- | i2c/i2c-ds1337-bcd.patch | 38 |
2 files changed, 98 insertions, 0 deletions
diff --git a/i2c/hwmon-w83627hf-bugfixes.patch b/i2c/hwmon-w83627hf-bugfixes.patch new file mode 100644 index 0000000000000..4c0f4317d9e1e --- /dev/null +++ b/i2c/hwmon-w83627hf-bugfixes.patch @@ -0,0 +1,60 @@ +From khali@linux-fr.org Mon Nov 7 13:19:11 2005 +Date: Mon, 7 Nov 2005 22:19:04 +0100 +From: Jean Delvare <khali@linux-fr.org> +To: Greg KH <greg@kroah.com> +Cc: Yuan Mu <Ymu@winbond.com.tw> +Subject: [PATCH] hwmon: Fix two w83627hf bugs +Message-Id: <20051107221904.1744d07d.khali@linux-fr.org> +Content-Disposition: inline; filename=hwmon-w83627hf-bugfixes.patch + +From: Yuan Mu <Ymu@winbond.com.tw> + +* Fix in4 reads for W83627THF and W83637HF chips. +* Use the correct register for alarm flags. + +Signed-off-by: Jean Delvare <khali@linux-fr.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/hwmon/w83627hf.c | 16 ++++------------ + 1 file changed, 4 insertions(+), 12 deletions(-) + +--- gregkh-2.6.orig/drivers/hwmon/w83627hf.c ++++ gregkh-2.6/drivers/hwmon/w83627hf.c +@@ -180,11 +180,10 @@ superio_exit(void) + #define W83781D_REG_BANK 0x4E + + #define W83781D_REG_CONFIG 0x40 +-#define W83781D_REG_ALARM1 0x41 +-#define W83781D_REG_ALARM2 0x42 +-#define W83781D_REG_ALARM3 0x450 ++#define W83781D_REG_ALARM1 0x459 ++#define W83781D_REG_ALARM2 0x45A ++#define W83781D_REG_ALARM3 0x45B + +-#define W83781D_REG_IRQ 0x4C + #define W83781D_REG_BEEP_CONFIG 0x4D + #define W83781D_REG_BEEP_INTS1 0x56 + #define W83781D_REG_BEEP_INTS2 0x57 +@@ -1370,13 +1369,6 @@ static void w83627hf_init_client(struct + W83781D_REG_TEMP3_CONFIG, tmp & 0xfe); + } + } +- +- /* enable comparator mode for temp2 and temp3 so +- alarm indication will work correctly */ +- i = w83627hf_read_value(client, W83781D_REG_IRQ); +- if (!(i & 0x40)) +- w83627hf_write_value(client, W83781D_REG_IRQ, +- i | 0x40); + } + + /* Start monitoring */ +@@ -1400,7 +1392,7 @@ static struct w83627hf_data *w83627hf_up + /* skip missing sensors */ + if (((data->type == w83697hf) && (i == 1)) || + ((data->type == w83627thf || data->type == w83637hf) +- && (i == 4 || i == 5))) ++ && (i == 5 || i == 6))) + continue; + data->in[i] = + w83627hf_read_value(client, W83781D_REG_IN(i)); diff --git a/i2c/i2c-ds1337-bcd.patch b/i2c/i2c-ds1337-bcd.patch new file mode 100644 index 0000000000000..b78aef3a7931f --- /dev/null +++ b/i2c/i2c-ds1337-bcd.patch @@ -0,0 +1,38 @@ +From khali@linux-fr.org Sun Nov 6 14:11:57 2005 +Date: Sun, 6 Nov 2005 23:07:38 +0100 +From: Jean Delvare <khali@linux-fr.org> +To: Greg KH <greg@kroah.com> +Cc: James Chapman <jchapman@katalix.com>, Michael Burian <dynmail1@gassner-waagen.at> +Subject: [PATCH] i2c: ds1337 BCD conversion fix +Message-Id: <20051106230738.261fbaa2.khali@linux-fr.org> +Content-Disposition: inline; filename=i2c-ds1337-bcd.patch + +From: James Chapman <jchapman@katalix.com> + +Fix BCD value errors when month=9, moving the increment inside the +BIN2BCD macro. +Fix similar code for the weekday value, just for consistency. + +This bug was reported by Michael Burian <dynmail1@gassner-waagen.at>. + +Signed-off-by: James Chapman <jchapman@katalix.com> +Signed-off-by: Jean Delvare <khali@linux-fr.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/i2c/chips/ds1337.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/i2c/chips/ds1337.c ++++ gregkh-2.6/drivers/i2c/chips/ds1337.c +@@ -164,9 +164,9 @@ static int ds1337_set_datetime(struct i2 + buf[1] = BIN2BCD(dt->tm_sec); + buf[2] = BIN2BCD(dt->tm_min); + buf[3] = BIN2BCD(dt->tm_hour); +- buf[4] = BIN2BCD(dt->tm_wday) + 1; ++ buf[4] = BIN2BCD(dt->tm_wday + 1); + buf[5] = BIN2BCD(dt->tm_mday); +- buf[6] = BIN2BCD(dt->tm_mon) + 1; ++ buf[6] = BIN2BCD(dt->tm_mon + 1); + val = dt->tm_year; + if (val >= 100) { + val -= 100; |