diff options
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 7 | ||||
-rw-r--r-- | Documentation/hwmon/adt7473 | 2 | ||||
-rw-r--r-- | drivers/hwmon/Kconfig | 10 | ||||
-rw-r--r-- | drivers/hwmon/adt7473.c | 3 | ||||
-rw-r--r-- | drivers/hwmon/adt7475.c | 25 |
5 files changed, 35 insertions, 12 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 591e94448e63..2a4d77946c7d 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -483,3 +483,10 @@ Why: With the recent innovations in CPU hardware acceleration technologies | |||
483 | Who: Alok N Kataria <akataria@vmware.com> | 483 | Who: Alok N Kataria <akataria@vmware.com> |
484 | 484 | ||
485 | ---------------------------- | 485 | ---------------------------- |
486 | |||
487 | What: adt7473 hardware monitoring driver | ||
488 | When: February 2010 | ||
489 | Why: Obsoleted by the adt7475 driver. | ||
490 | Who: Jean Delvare <khali@linux-fr.org> | ||
491 | |||
492 | --------------------------- | ||
diff --git a/Documentation/hwmon/adt7473 b/Documentation/hwmon/adt7473 index 1cbf671822e2..446612bd1fb9 100644 --- a/Documentation/hwmon/adt7473 +++ b/Documentation/hwmon/adt7473 | |||
@@ -9,6 +9,8 @@ Supported chips: | |||
9 | 9 | ||
10 | Author: Darrick J. Wong | 10 | Author: Darrick J. Wong |
11 | 11 | ||
12 | This driver is depreacted, please use the adt7475 driver instead. | ||
13 | |||
12 | Description | 14 | Description |
13 | ----------- | 15 | ----------- |
14 | 16 | ||
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index edf8febb5bc4..5b2eaff47900 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig | |||
@@ -191,21 +191,25 @@ config SENSORS_ADT7470 | |||
191 | will be called adt7470. | 191 | will be called adt7470. |
192 | 192 | ||
193 | config SENSORS_ADT7473 | 193 | config SENSORS_ADT7473 |
194 | tristate "Analog Devices ADT7473" | 194 | tristate "Analog Devices ADT7473 (DEPRECATED)" |
195 | depends on I2C && EXPERIMENTAL | 195 | depends on I2C && EXPERIMENTAL |
196 | select SENSORS_ADT7475 | ||
196 | help | 197 | help |
197 | If you say yes here you get support for the Analog Devices | 198 | If you say yes here you get support for the Analog Devices |
198 | ADT7473 temperature monitoring chips. | 199 | ADT7473 temperature monitoring chips. |
199 | 200 | ||
201 | This driver is deprecated, you should use the adt7475 driver | ||
202 | instead. | ||
203 | |||
200 | This driver can also be built as a module. If so, the module | 204 | This driver can also be built as a module. If so, the module |
201 | will be called adt7473. | 205 | will be called adt7473. |
202 | 206 | ||
203 | config SENSORS_ADT7475 | 207 | config SENSORS_ADT7475 |
204 | tristate "Analog Devices ADT7475" | 208 | tristate "Analog Devices ADT7473 and ADT7475" |
205 | depends on I2C && EXPERIMENTAL | 209 | depends on I2C && EXPERIMENTAL |
206 | help | 210 | help |
207 | If you say yes here you get support for the Analog Devices | 211 | If you say yes here you get support for the Analog Devices |
208 | ADT7475 hardware monitoring chips. | 212 | ADT7473 and ADT7475 hardware monitoring chips. |
209 | 213 | ||
210 | This driver can also be build as a module. If so, the module | 214 | This driver can also be build as a module. If so, the module |
211 | will be called adt7475. | 215 | will be called adt7475. |
diff --git a/drivers/hwmon/adt7473.c b/drivers/hwmon/adt7473.c index 97ef50833f64..aea244db974e 100644 --- a/drivers/hwmon/adt7473.c +++ b/drivers/hwmon/adt7473.c | |||
@@ -174,7 +174,6 @@ static const struct i2c_device_id adt7473_id[] = { | |||
174 | { "adt7473", adt7473 }, | 174 | { "adt7473", adt7473 }, |
175 | { } | 175 | { } |
176 | }; | 176 | }; |
177 | MODULE_DEVICE_TABLE(i2c, adt7473_id); | ||
178 | 177 | ||
179 | static struct i2c_driver adt7473_driver = { | 178 | static struct i2c_driver adt7473_driver = { |
180 | .class = I2C_CLASS_HWMON, | 179 | .class = I2C_CLASS_HWMON, |
@@ -1166,6 +1165,8 @@ static int adt7473_remove(struct i2c_client *client) | |||
1166 | 1165 | ||
1167 | static int __init adt7473_init(void) | 1166 | static int __init adt7473_init(void) |
1168 | { | 1167 | { |
1168 | pr_notice("The adt7473 driver is deprecated, please use the adt7475 " | ||
1169 | "driver instead\n"); | ||
1169 | return i2c_add_driver(&adt7473_driver); | 1170 | return i2c_add_driver(&adt7473_driver); |
1170 | } | 1171 | } |
1171 | 1172 | ||
diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c index 41d3e38f9ce1..fba2f016e4d8 100644 --- a/drivers/hwmon/adt7475.c +++ b/drivers/hwmon/adt7475.c | |||
@@ -113,11 +113,12 @@ | |||
113 | #define TEMP_OFFSET_REG(idx) (REG_TEMP_OFFSET_BASE + (idx)) | 113 | #define TEMP_OFFSET_REG(idx) (REG_TEMP_OFFSET_BASE + (idx)) |
114 | #define TEMP_TRANGE_REG(idx) (REG_TEMP_TRANGE_BASE + (idx)) | 114 | #define TEMP_TRANGE_REG(idx) (REG_TEMP_TRANGE_BASE + (idx)) |
115 | 115 | ||
116 | static unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END }; | 116 | static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END }; |
117 | 117 | ||
118 | I2C_CLIENT_INSMOD_1(adt7475); | 118 | I2C_CLIENT_INSMOD_2(adt7473, adt7475); |
119 | 119 | ||
120 | static const struct i2c_device_id adt7475_id[] = { | 120 | static const struct i2c_device_id adt7475_id[] = { |
121 | { "adt7473", adt7473 }, | ||
121 | { "adt7475", adt7475 }, | 122 | { "adt7475", adt7475 }, |
122 | { } | 123 | { } |
123 | }; | 124 | }; |
@@ -970,19 +971,27 @@ static int adt7475_detect(struct i2c_client *client, int kind, | |||
970 | struct i2c_board_info *info) | 971 | struct i2c_board_info *info) |
971 | { | 972 | { |
972 | struct i2c_adapter *adapter = client->adapter; | 973 | struct i2c_adapter *adapter = client->adapter; |
974 | int vendid, devid; | ||
975 | const char *name; | ||
973 | 976 | ||
974 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 977 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
975 | return -ENODEV; | 978 | return -ENODEV; |
976 | 979 | ||
977 | if (adt7475_read(REG_VENDID) != 0x41 || | 980 | vendid = adt7475_read(REG_VENDID); |
978 | adt7475_read(REG_DEVID) != 0x75) { | 981 | devid = adt7475_read(REG_DEVID); |
979 | dev_err(&adapter->dev, | 982 | |
980 | "Couldn't detect a adt7475 part at 0x%02x\n", | 983 | if (vendid == 0x41 && devid == 0x73) |
981 | (unsigned int)client->addr); | 984 | name = "adt7473"; |
985 | else if (vendid == 0x41 && devid == 0x75 && client->addr == 0x2e) | ||
986 | name = "adt7475"; | ||
987 | else { | ||
988 | dev_dbg(&adapter->dev, | ||
989 | "Couldn't detect an ADT7473 or ADT7475 part at " | ||
990 | "0x%02x\n", (unsigned int)client->addr); | ||
982 | return -ENODEV; | 991 | return -ENODEV; |
983 | } | 992 | } |
984 | 993 | ||
985 | strlcpy(info->type, adt7475_id[0].name, I2C_NAME_SIZE); | 994 | strlcpy(info->type, name, I2C_NAME_SIZE); |
986 | 995 | ||
987 | return 0; | 996 | return 0; |
988 | } | 997 | } |