aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 17:13:53 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 17:13:53 -0500
commit969780f8079994f161de991870feba68f49fc3d7 (patch)
tree2e6664c43be38a6cfdd20338d20385368c1b7a80
parentad8f76be48d817b48222411ae16a7dfe257bdb24 (diff)
parent8750197f0e8f5467297d72e11444cf32f29d790f (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
-rw-r--r--Documentation/i2c/busses/i2c-viapro6
-rw-r--r--Documentation/i2c/writing-clients4
-rw-r--r--drivers/hwmon/w83627hf.c16
-rw-r--r--drivers/i2c/busses/i2c-viapro.c27
-rw-r--r--drivers/i2c/chips/ds1337.c4
5 files changed, 24 insertions, 33 deletions
diff --git a/Documentation/i2c/busses/i2c-viapro b/Documentation/i2c/busses/i2c-viapro
index 9363b8bd6109..16775663b9f5 100644
--- a/Documentation/i2c/busses/i2c-viapro
+++ b/Documentation/i2c/busses/i2c-viapro
@@ -7,12 +7,10 @@ Supported adapters:
7 * VIA Technologies, Inc. VT82C686A/B 7 * VIA Technologies, Inc. VT82C686A/B
8 Datasheet: Sometimes available at the VIA website 8 Datasheet: Sometimes available at the VIA website
9 9
10 * VIA Technologies, Inc. VT8231, VT8233, VT8233A, VT8235, VT8237 10 * VIA Technologies, Inc. VT8231, VT8233, VT8233A, VT8235, VT8237R
11 Datasheet: available on request from Via 11 Datasheet: available on request from VIA
12 12
13Authors: 13Authors:
14 Frodo Looijaard <frodol@dds.nl>,
15 Philip Edelbrock <phil@netroedge.com>,
16 Kyösti Mälkki <kmalkki@cc.hut.fi>, 14 Kyösti Mälkki <kmalkki@cc.hut.fi>,
17 Mark D. Studebaker <mdsxyz123@yahoo.com>, 15 Mark D. Studebaker <mdsxyz123@yahoo.com>,
18 Jean Delvare <khali@linux-fr.org> 16 Jean Delvare <khali@linux-fr.org>
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
index cff7b652588a..d19993cc0604 100644
--- a/Documentation/i2c/writing-clients
+++ b/Documentation/i2c/writing-clients
@@ -412,7 +412,7 @@ For now, you can ignore the `flags' parameter. It is there for future use.
412 release_region(address,FOO_EXTENT); 412 release_region(address,FOO_EXTENT);
413 /* SENSORS ONLY END */ 413 /* SENSORS ONLY END */
414 ERROR1: 414 ERROR1:
415 kfree(new_client); 415 kfree(data);
416 ERROR0: 416 ERROR0:
417 return err; 417 return err;
418 } 418 }
@@ -443,7 +443,7 @@ much simpler than the attachment code, fortunately!
443 release_region(client->addr,LM78_EXTENT); 443 release_region(client->addr,LM78_EXTENT);
444 /* HYBRID SENSORS CHIP ONLY END */ 444 /* HYBRID SENSORS CHIP ONLY END */
445 445
446 kfree(data); 446 kfree(i2c_get_clientdata(client));
447 return 0; 447 return 0;
448 } 448 }
449 449
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index 70ef926c3bd8..4e9a04e1f08e 100644
--- a/drivers/hwmon/w83627hf.c
+++ b/drivers/hwmon/w83627hf.c
@@ -180,11 +180,10 @@ superio_exit(void)
180#define W83781D_REG_BANK 0x4E 180#define W83781D_REG_BANK 0x4E
181 181
182#define W83781D_REG_CONFIG 0x40 182#define W83781D_REG_CONFIG 0x40
183#define W83781D_REG_ALARM1 0x41 183#define W83781D_REG_ALARM1 0x459
184#define W83781D_REG_ALARM2 0x42 184#define W83781D_REG_ALARM2 0x45A
185#define W83781D_REG_ALARM3 0x450 185#define W83781D_REG_ALARM3 0x45B
186 186
187#define W83781D_REG_IRQ 0x4C
188#define W83781D_REG_BEEP_CONFIG 0x4D 187#define W83781D_REG_BEEP_CONFIG 0x4D
189#define W83781D_REG_BEEP_INTS1 0x56 188#define W83781D_REG_BEEP_INTS1 0x56
190#define W83781D_REG_BEEP_INTS2 0x57 189#define W83781D_REG_BEEP_INTS2 0x57
@@ -1370,13 +1369,6 @@ static void w83627hf_init_client(struct i2c_client *client)
1370 W83781D_REG_TEMP3_CONFIG, tmp & 0xfe); 1369 W83781D_REG_TEMP3_CONFIG, tmp & 0xfe);
1371 } 1370 }
1372 } 1371 }
1373
1374 /* enable comparator mode for temp2 and temp3 so
1375 alarm indication will work correctly */
1376 i = w83627hf_read_value(client, W83781D_REG_IRQ);
1377 if (!(i & 0x40))
1378 w83627hf_write_value(client, W83781D_REG_IRQ,
1379 i | 0x40);
1380 } 1372 }
1381 1373
1382 /* Start monitoring */ 1374 /* Start monitoring */
@@ -1400,7 +1392,7 @@ static struct w83627hf_data *w83627hf_update_device(struct device *dev)
1400 /* skip missing sensors */ 1392 /* skip missing sensors */
1401 if (((data->type == w83697hf) && (i == 1)) || 1393 if (((data->type == w83697hf) && (i == 1)) ||
1402 ((data->type == w83627thf || data->type == w83637hf) 1394 ((data->type == w83627thf || data->type == w83637hf)
1403 && (i == 4 || i == 5))) 1395 && (i == 5 || i == 6)))
1404 continue; 1396 continue;
1405 data->in[i] = 1397 data->in[i] =
1406 w83627hf_read_value(client, W83781D_REG_IN(i)); 1398 w83627hf_read_value(client, W83781D_REG_IN(i));
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c
index c9366b504833..a2237d4b2cf2 100644
--- a/drivers/i2c/busses/i2c-viapro.c
+++ b/drivers/i2c/busses/i2c-viapro.c
@@ -142,19 +142,18 @@ static int vt596_transaction(u8 size)
142 /* Make sure the SMBus host is ready to start transmitting */ 142 /* Make sure the SMBus host is ready to start transmitting */
143 if ((temp = inb_p(SMBHSTSTS)) & 0x1F) { 143 if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
144 dev_dbg(&vt596_adapter.dev, "SMBus busy (0x%02x). " 144 dev_dbg(&vt596_adapter.dev, "SMBus busy (0x%02x). "
145 "Resetting... ", temp); 145 "Resetting...\n", temp);
146 146
147 outb_p(temp, SMBHSTSTS); 147 outb_p(temp, SMBHSTSTS);
148 if ((temp = inb_p(SMBHSTSTS)) & 0x1F) { 148 if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
149 printk("Failed! (0x%02x)\n", temp); 149 dev_err(&vt596_adapter.dev, "SMBus reset failed! "
150 "(0x%02x)\n", temp);
150 return -1; 151 return -1;
151 } else {
152 printk("Successful!\n");
153 } 152 }
154 } 153 }
155 154
156 /* Start the transaction by setting bit 6 */ 155 /* Start the transaction by setting bit 6 */
157 outb_p(0x40 | (size & 0x3C), SMBHSTCNT); 156 outb_p(0x40 | size, SMBHSTCNT);
158 157
159 /* We will always wait for a fraction of a second */ 158 /* We will always wait for a fraction of a second */
160 do { 159 do {
@@ -171,7 +170,7 @@ static int vt596_transaction(u8 size)
171 if (temp & 0x10) { 170 if (temp & 0x10) {
172 result = -1; 171 result = -1;
173 dev_err(&vt596_adapter.dev, "Transaction failed (0x%02x)\n", 172 dev_err(&vt596_adapter.dev, "Transaction failed (0x%02x)\n",
174 inb_p(SMBHSTCNT) & 0x3C); 173 size);
175 } 174 }
176 175
177 if (temp & 0x08) { 176 if (temp & 0x08) {
@@ -180,11 +179,13 @@ static int vt596_transaction(u8 size)
180 } 179 }
181 180
182 if (temp & 0x04) { 181 if (temp & 0x04) {
182 int read = inb_p(SMBHSTADD) & 0x01;
183 result = -1; 183 result = -1;
184 /* Quick commands are used to probe for chips, so 184 /* The quick and receive byte commands are used to probe
185 errors are expected, and we don't want to frighten the 185 for chips, so errors are expected, and we don't want
186 user. */ 186 to frighten the user. */
187 if ((inb_p(SMBHSTCNT) & 0x3C) != VT596_QUICK) 187 if (!((size == VT596_QUICK && !read) ||
188 (size == VT596_BYTE && read)))
188 dev_err(&vt596_adapter.dev, "Transaction error!\n"); 189 dev_err(&vt596_adapter.dev, "Transaction error!\n");
189 } 190 }
190 191
@@ -462,9 +463,9 @@ static void __exit i2c_vt596_exit(void)
462 } 463 }
463} 464}
464 465
465MODULE_AUTHOR( 466MODULE_AUTHOR("Kyosti Malkki <kmalkki@cc.hut.fi>, "
466 "Frodo Looijaard <frodol@dds.nl> and " 467 "Mark D. Studebaker <mdsxyz123@yahoo.com> and "
467 "Philip Edelbrock <phil@netroedge.com>"); 468 "Jean Delvare <khali@linux-fr.org>");
468MODULE_DESCRIPTION("vt82c596 SMBus driver"); 469MODULE_DESCRIPTION("vt82c596 SMBus driver");
469MODULE_LICENSE("GPL"); 470MODULE_LICENSE("GPL");
470 471
diff --git a/drivers/i2c/chips/ds1337.c b/drivers/i2c/chips/ds1337.c
index 01b037007410..02682fb794c8 100644
--- a/drivers/i2c/chips/ds1337.c
+++ b/drivers/i2c/chips/ds1337.c
@@ -164,9 +164,9 @@ static int ds1337_set_datetime(struct i2c_client *client, struct rtc_time *dt)
164 buf[1] = BIN2BCD(dt->tm_sec); 164 buf[1] = BIN2BCD(dt->tm_sec);
165 buf[2] = BIN2BCD(dt->tm_min); 165 buf[2] = BIN2BCD(dt->tm_min);
166 buf[3] = BIN2BCD(dt->tm_hour); 166 buf[3] = BIN2BCD(dt->tm_hour);
167 buf[4] = BIN2BCD(dt->tm_wday) + 1; 167 buf[4] = BIN2BCD(dt->tm_wday + 1);
168 buf[5] = BIN2BCD(dt->tm_mday); 168 buf[5] = BIN2BCD(dt->tm_mday);
169 buf[6] = BIN2BCD(dt->tm_mon) + 1; 169 buf[6] = BIN2BCD(dt->tm_mon + 1);
170 val = dt->tm_year; 170 val = dt->tm_year;
171 if (val >= 100) { 171 if (val >= 100) {
172 val -= 100; 172 val -= 100;