aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-10-26 15:25:04 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 17:02:13 -0400
commitb8095544bc27044a7aa79e1e073b781a249910c3 (patch)
tree2e7f92c1d6765d44531a5d5c830e53fc2f8d760f
parent142078f6f09986c2b8f5ebe215ce405438080317 (diff)
[PATCH] i2c: SMBus PEC support rewrite, 1 of 3
Discard I2C_FUNC_SMBUS_*_PEC defines. i2c clients are not supposed to check for PEC support of i2c bus drivers on individual SMBus transactions, and i2c bus drivers are not supposed to advertise them. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/i2c/busses/i2c-i801.c3
-rw-r--r--include/linux/i2c.h18
2 files changed, 1 insertions, 20 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index e90b6c4e7da3..b05e045f770c 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -513,8 +513,7 @@ static u32 i801_func(struct i2c_adapter *adapter)
513 return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | 513 return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
514 I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA | 514 I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA |
515 I2C_FUNC_SMBUS_BLOCK_DATA | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 515 I2C_FUNC_SMBUS_BLOCK_DATA | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK
516 | (isich4 ? I2C_FUNC_SMBUS_BLOCK_DATA_PEC | 516 | (isich4 ? I2C_FUNC_SMBUS_HWPEC_CALC : 0);
517 I2C_FUNC_SMBUS_HWPEC_CALC : 0);
518} 517}
519 518
520static struct i2c_algorithm smbus_algorithm = { 519static struct i2c_algorithm smbus_algorithm = {
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 64c13c042f9d..bcd4bb1b450c 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -389,10 +389,6 @@ struct i2c_msg {
389#define I2C_FUNC_10BIT_ADDR 0x00000002 389#define I2C_FUNC_10BIT_ADDR 0x00000002
390#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART,..} */ 390#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART,..} */
391#define I2C_FUNC_SMBUS_HWPEC_CALC 0x00000008 /* SMBus 2.0 */ 391#define I2C_FUNC_SMBUS_HWPEC_CALC 0x00000008 /* SMBus 2.0 */
392#define I2C_FUNC_SMBUS_READ_WORD_DATA_PEC 0x00000800 /* SMBus 2.0 */
393#define I2C_FUNC_SMBUS_WRITE_WORD_DATA_PEC 0x00001000 /* SMBus 2.0 */
394#define I2C_FUNC_SMBUS_PROC_CALL_PEC 0x00002000 /* SMBus 2.0 */
395#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL_PEC 0x00004000 /* SMBus 2.0 */
396#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */ 392#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */
397#define I2C_FUNC_SMBUS_QUICK 0x00010000 393#define I2C_FUNC_SMBUS_QUICK 0x00010000
398#define I2C_FUNC_SMBUS_READ_BYTE 0x00020000 394#define I2C_FUNC_SMBUS_READ_BYTE 0x00020000
@@ -408,8 +404,6 @@ struct i2c_msg {
408#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */ 404#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */
409#define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000 /* I2C-like block xfer */ 405#define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000 /* I2C-like block xfer */
410#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 0x20000000 /* w/ 2-byte reg. addr. */ 406#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 0x20000000 /* w/ 2-byte reg. addr. */
411#define I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC 0x40000000 /* SMBus 2.0 */
412#define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC 0x80000000 /* SMBus 2.0 */
413 407
414#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \ 408#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \
415 I2C_FUNC_SMBUS_WRITE_BYTE) 409 I2C_FUNC_SMBUS_WRITE_BYTE)
@@ -423,17 +417,6 @@ struct i2c_msg {
423 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK) 417 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)
424#define I2C_FUNC_SMBUS_I2C_BLOCK_2 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \ 418#define I2C_FUNC_SMBUS_I2C_BLOCK_2 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \
425 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2) 419 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2)
426#define I2C_FUNC_SMBUS_BLOCK_DATA_PEC (I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC | \
427 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC)
428#define I2C_FUNC_SMBUS_WORD_DATA_PEC (I2C_FUNC_SMBUS_READ_WORD_DATA_PEC | \
429 I2C_FUNC_SMBUS_WRITE_WORD_DATA_PEC)
430
431#define I2C_FUNC_SMBUS_READ_BYTE_PEC I2C_FUNC_SMBUS_READ_BYTE_DATA
432#define I2C_FUNC_SMBUS_WRITE_BYTE_PEC I2C_FUNC_SMBUS_WRITE_BYTE_DATA
433#define I2C_FUNC_SMBUS_READ_BYTE_DATA_PEC I2C_FUNC_SMBUS_READ_WORD_DATA
434#define I2C_FUNC_SMBUS_WRITE_BYTE_DATA_PEC I2C_FUNC_SMBUS_WRITE_WORD_DATA
435#define I2C_FUNC_SMBUS_BYTE_PEC I2C_FUNC_SMBUS_BYTE_DATA
436#define I2C_FUNC_SMBUS_BYTE_DATA_PEC I2C_FUNC_SMBUS_WORD_DATA
437 420
438#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \ 421#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \
439 I2C_FUNC_SMBUS_BYTE | \ 422 I2C_FUNC_SMBUS_BYTE | \
@@ -441,7 +424,6 @@ struct i2c_msg {
441 I2C_FUNC_SMBUS_WORD_DATA | \ 424 I2C_FUNC_SMBUS_WORD_DATA | \
442 I2C_FUNC_SMBUS_PROC_CALL | \ 425 I2C_FUNC_SMBUS_PROC_CALL | \
443 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \ 426 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \
444 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC | \
445 I2C_FUNC_SMBUS_I2C_BLOCK) 427 I2C_FUNC_SMBUS_I2C_BLOCK)
446 428
447/* 429/*