aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/i2c/busses/i2c-amd8111.c7
-rw-r--r--drivers/i2c/busses/i2c-i801.c13
-rw-r--r--drivers/i2c/busses/i2c-nforce2.c7
-rw-r--r--include/linux/i2c.h4
4 files changed, 5 insertions, 26 deletions
diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c
index aface7938a5b..f3b79a68dbec 100644
--- a/drivers/i2c/busses/i2c-amd8111.c
+++ b/drivers/i2c/busses/i2c-amd8111.c
@@ -253,13 +253,6 @@ static s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short fl
253 read_write = I2C_SMBUS_READ; 253 read_write = I2C_SMBUS_READ;
254 break; 254 break;
255 255
256 case I2C_SMBUS_WORD_DATA_PEC:
257 case I2C_SMBUS_BLOCK_DATA_PEC:
258 case I2C_SMBUS_PROC_CALL_PEC:
259 case I2C_SMBUS_BLOCK_PROC_CALL_PEC:
260 dev_warn(&adap->dev, "Unexpected software PEC transaction %d\n.", size);
261 return -1;
262
263 default: 256 default:
264 dev_warn(&adap->dev, "Unsupported transaction %d\n", size); 257 dev_warn(&adap->dev, "Unsupported transaction %d\n", size);
265 return -1; 258 return -1;
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index b05e045f770c..27e7894a9d1c 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -102,8 +102,8 @@ MODULE_PARM_DESC(force_addr,
102 "EXTREMELY DANGEROUS!"); 102 "EXTREMELY DANGEROUS!");
103 103
104static int i801_transaction(void); 104static int i801_transaction(void);
105static int i801_block_transaction(union i2c_smbus_data *data, 105static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
106 char read_write, int command); 106 int command, int hwpec);
107 107
108static unsigned short i801_smba; 108static unsigned short i801_smba;
109static struct pci_driver i801_driver; 109static struct pci_driver i801_driver;
@@ -249,7 +249,7 @@ static int i801_transaction(void)
249 249
250/* All-inclusive block transaction function */ 250/* All-inclusive block transaction function */
251static int i801_block_transaction(union i2c_smbus_data *data, char read_write, 251static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
252 int command) 252 int command, int hwpec)
253{ 253{
254 int i, len; 254 int i, len;
255 int smbcmd; 255 int smbcmd;
@@ -388,7 +388,7 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
388 goto END; 388 goto END;
389 } 389 }
390 390
391 if(isich4 && command == I2C_SMBUS_BLOCK_DATA_PEC) { 391 if (hwpec && command == I2C_SMBUS_BLOCK_DATA) {
392 /* wait for INTR bit as advised by Intel */ 392 /* wait for INTR bit as advised by Intel */
393 timeout = 0; 393 timeout = 0;
394 do { 394 do {
@@ -456,9 +456,6 @@ static s32 i801_access(struct i2c_adapter * adap, u16 addr,
456 break; 456 break;
457 case I2C_SMBUS_BLOCK_DATA: 457 case I2C_SMBUS_BLOCK_DATA:
458 case I2C_SMBUS_I2C_BLOCK_DATA: 458 case I2C_SMBUS_I2C_BLOCK_DATA:
459 case I2C_SMBUS_BLOCK_DATA_PEC:
460 if(hwpec && size == I2C_SMBUS_BLOCK_DATA)
461 size = I2C_SMBUS_BLOCK_DATA_PEC;
462 outb_p(((addr & 0x7f) << 1) | (read_write & 0x01), 459 outb_p(((addr & 0x7f) << 1) | (read_write & 0x01),
463 SMBHSTADD); 460 SMBHSTADD);
464 outb_p(command, SMBHSTCMD); 461 outb_p(command, SMBHSTCMD);
@@ -476,7 +473,7 @@ static s32 i801_access(struct i2c_adapter * adap, u16 addr,
476 outb_p(1, SMBAUXCTL); /* enable HW PEC */ 473 outb_p(1, SMBAUXCTL); /* enable HW PEC */
477 } 474 }
478 if(block) 475 if(block)
479 ret = i801_block_transaction(data, read_write, size); 476 ret = i801_block_transaction(data, read_write, size, hwpec);
480 else { 477 else {
481 outb_p(xact | ENABLE_INT9, SMBHSTCNT); 478 outb_p(xact | ENABLE_INT9, SMBHSTCNT);
482 ret = i801_transaction(); 479 ret = i801_transaction();
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
index 9b4247610815..fd26036e68a3 100644
--- a/drivers/i2c/busses/i2c-nforce2.c
+++ b/drivers/i2c/busses/i2c-nforce2.c
@@ -188,13 +188,6 @@ static s32 nforce2_access(struct i2c_adapter * adap, u16 addr,
188 dev_err(&adap->dev, "I2C_SMBUS_BLOCK_PROC_CALL not supported!\n"); 188 dev_err(&adap->dev, "I2C_SMBUS_BLOCK_PROC_CALL not supported!\n");
189 return -1; 189 return -1;
190 190
191 case I2C_SMBUS_WORD_DATA_PEC:
192 case I2C_SMBUS_BLOCK_DATA_PEC:
193 case I2C_SMBUS_PROC_CALL_PEC:
194 case I2C_SMBUS_BLOCK_PROC_CALL_PEC:
195 dev_err(&adap->dev, "Unexpected software PEC transaction %d\n.", size);
196 return -1;
197
198 default: 191 default:
199 dev_err(&adap->dev, "Unsupported transaction %d\n", size); 192 dev_err(&adap->dev, "Unsupported transaction %d\n", size);
200 return -1; 193 return -1;
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 78c64f7b3105..32977fb1d99a 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -451,10 +451,6 @@ union i2c_smbus_data {
451#define I2C_SMBUS_BLOCK_DATA 5 451#define I2C_SMBUS_BLOCK_DATA 5
452#define I2C_SMBUS_I2C_BLOCK_DATA 6 452#define I2C_SMBUS_I2C_BLOCK_DATA 6
453#define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */ 453#define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */
454#define I2C_SMBUS_BLOCK_DATA_PEC 8 /* SMBus 2.0 */
455#define I2C_SMBUS_PROC_CALL_PEC 9 /* SMBus 2.0 */
456#define I2C_SMBUS_BLOCK_PROC_CALL_PEC 10 /* SMBus 2.0 */
457#define I2C_SMBUS_WORD_DATA_PEC 11 /* SMBus 2.0 */
458 454
459 455
460/* ----- commands for the ioctl like i2c_command call: 456/* ----- commands for the ioctl like i2c_command call: