From c681f7c79ca7032736d5c3b1284601c09910a44a Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sun, 14 Oct 2007 11:42:41 +0000 Subject: [PATCH] Rename I2C_FUNC_SMBUS_HWPEC_CALC to I2C_FUNC_SMBUS_PEC, as was done in the Linux 2.6 kernel. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4950 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + kernel/include/i2c-dev.h | 5 ++++- prog/detect/i2cdetect.c | 2 +- prog/dump/i2cdump.c | 2 +- prog/dump/i2cget.c | 2 +- prog/dump/i2cset.c | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 160dd3a9..6a536dad 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,7 @@ lm_sensors CHANGES file ----------------------- SVN HEAD + File i2c-dev.h: Rename I2C_FUNC_SMBUS_HWPEC_CALC to I2C_FUNC_SMBUS_PEC File sensors.conf.eg: Add a thmc50 section File useful_addresses.html: Moved to the wiki Library: Fix a memory leak on error diff --git a/kernel/include/i2c-dev.h b/kernel/include/i2c-dev.h index 5284cf11..6e090e94 100644 --- a/kernel/include/i2c-dev.h +++ b/kernel/include/i2c-dev.h @@ -52,7 +52,7 @@ struct i2c_msg { #define I2C_FUNC_I2C 0x00000001 #define I2C_FUNC_10BIT_ADDR 0x00000002 #define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART,..} */ -#define I2C_FUNC_SMBUS_HWPEC_CALC 0x00000008 /* SMBus 2.0 */ +#define I2C_FUNC_SMBUS_PEC 0x00000008 #define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */ #define I2C_FUNC_SMBUS_QUICK 0x00010000 #define I2C_FUNC_SMBUS_READ_BYTE 0x00020000 @@ -82,6 +82,9 @@ struct i2c_msg { #define I2C_FUNC_SMBUS_I2C_BLOCK_2 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \ I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2) +/* Old name, for compatibility */ +#define I2C_FUNC_SMBUS_HWPEC_CALC I2C_FUNC_SMBUS_PEC + /* * Data for SMBus Messages */ diff --git a/prog/detect/i2cdetect.c b/prog/detect/i2cdetect.c index 7bae2f8e..9c189f5e 100644 --- a/prog/detect/i2cdetect.c +++ b/prog/detect/i2cdetect.c @@ -146,7 +146,7 @@ static const struct func all_func[] = { .name = "SMBus Block Read" }, { .value = I2C_FUNC_SMBUS_BLOCK_PROC_CALL, .name = "SMBus Block Process Call" }, - { .value = I2C_FUNC_SMBUS_HWPEC_CALC, + { .value = I2C_FUNC_SMBUS_PEC, .name = "SMBus PEC" }, { .value = I2C_FUNC_SMBUS_WRITE_I2C_BLOCK, .name = "I2C Block Write" }, diff --git a/prog/dump/i2cdump.c b/prog/dump/i2cdump.c index e47663ec..062257a2 100644 --- a/prog/dump/i2cdump.c +++ b/prog/dump/i2cdump.c @@ -244,7 +244,7 @@ int main(int argc, char *argv[]) strerror(errno)); exit(1); } - if (!(funcs & (I2C_FUNC_SMBUS_HWPEC_CALC | I2C_FUNC_I2C))) { + if (!(funcs & (I2C_FUNC_SMBUS_PEC | I2C_FUNC_I2C))) { fprintf(stderr, "Warning: Adapter for i2c bus %d does " "not seem to actually support PEC\n", i2cbus); } diff --git a/prog/dump/i2cget.c b/prog/dump/i2cget.c index 314b5192..31d759fa 100644 --- a/prog/dump/i2cget.c +++ b/prog/dump/i2cget.c @@ -94,7 +94,7 @@ int check_funcs(int file, int i2cbus, int size, int daddress, int pec) } if (pec - && !(funcs & (I2C_FUNC_SMBUS_HWPEC_CALC | I2C_FUNC_I2C))) { + && !(funcs & (I2C_FUNC_SMBUS_PEC | I2C_FUNC_I2C))) { fprintf(stderr, "Warning: Adapter for i2c bus %d does " "not seem to support PEC\n", i2cbus); } diff --git a/prog/dump/i2cset.c b/prog/dump/i2cset.c index 3be4a9c4..a55adccc 100644 --- a/prog/dump/i2cset.c +++ b/prog/dump/i2cset.c @@ -234,7 +234,7 @@ int main(int argc, char *argv[]) strerror(errno)); exit(1); } - if (!(funcs & (I2C_FUNC_SMBUS_HWPEC_CALC | I2C_FUNC_I2C))) { + if (!(funcs & (I2C_FUNC_SMBUS_PEC | I2C_FUNC_I2C))) { fprintf(stderr, "Warning: Adapter for i2c bus %d does " "not seem to actually support PEC\n", i2cbus); }