diff options
-rw-r--r-- | Documentation/hwmon/tmp421 | 22 | ||||
-rw-r--r-- | drivers/hwmon/Kconfig | 2 | ||||
-rw-r--r-- | drivers/hwmon/tmp421.c | 21 |
3 files changed, 33 insertions, 12 deletions
diff --git a/Documentation/hwmon/tmp421 b/Documentation/hwmon/tmp421 index d0e77143077f..9e6fe5549ca1 100644 --- a/Documentation/hwmon/tmp421 +++ b/Documentation/hwmon/tmp421 | |||
@@ -14,6 +14,14 @@ Supported chips: | |||
14 | Prefix: 'tmp423' | 14 | Prefix: 'tmp423' |
15 | Addresses scanned: I2C 0x4c and 0x4d | 15 | Addresses scanned: I2C 0x4c and 0x4d |
16 | Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp421.html | 16 | Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp421.html |
17 | * Texas Instruments TMP441 | ||
18 | Prefix: 'tmp441' | ||
19 | Addresses scanned: I2C 0x2a, 0x4c, 0x4d, 0x4e and 0x4f | ||
20 | Datasheet: http://www.ti.com/product/tmp441 | ||
21 | * Texas Instruments TMP442 | ||
22 | Prefix: 'tmp442' | ||
23 | Addresses scanned: I2C 0x4c and 0x4d | ||
24 | Datasheet: http://www.ti.com/product/tmp442 | ||
17 | 25 | ||
18 | Authors: | 26 | Authors: |
19 | Andre Prendel <andre.prendel@gmx.de> | 27 | Andre Prendel <andre.prendel@gmx.de> |
@@ -21,13 +29,13 @@ Authors: | |||
21 | Description | 29 | Description |
22 | ----------- | 30 | ----------- |
23 | 31 | ||
24 | This driver implements support for Texas Instruments TMP421, TMP422 | 32 | This driver implements support for Texas Instruments TMP421, TMP422, |
25 | and TMP423 temperature sensor chips. These chips implement one local | 33 | TMP423, TMP441, and TMP442 temperature sensor chips. These chips |
26 | and up to one (TMP421), up to two (TMP422) or up to three (TMP423) | 34 | implement one local and up to one (TMP421, TMP441), up to two (TMP422, |
27 | remote sensors. Temperature is measured in degrees Celsius. The chips | 35 | TMP442) or up to three (TMP423) remote sensors. Temperature is measured |
28 | are wired over I2C/SMBus and specified over a temperature range of -40 | 36 | in degrees Celsius. The chips are wired over I2C/SMBus and specified |
29 | to +125 degrees Celsius. Resolution for both the local and remote | 37 | over a temperature range of -40 to +125 degrees Celsius. Resolution |
30 | channels is 0.0625 degree C. | 38 | for both the local and remote channels is 0.0625 degree C. |
31 | 39 | ||
32 | The chips support only temperature measurement. The driver exports | 40 | The chips support only temperature measurement. The driver exports |
33 | the temperature values via the following sysfs files: | 41 | the temperature values via the following sysfs files: |
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index ae1e2160c1b5..37908ff8f7ff 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig | |||
@@ -1431,7 +1431,7 @@ config SENSORS_TMP421 | |||
1431 | depends on I2C | 1431 | depends on I2C |
1432 | help | 1432 | help |
1433 | If you say yes here you get support for Texas Instruments TMP421, | 1433 | If you say yes here you get support for Texas Instruments TMP421, |
1434 | TMP422 and TMP423 temperature sensor chips. | 1434 | TMP422, TMP423, TMP441, and TMP442 temperature sensor chips. |
1435 | 1435 | ||
1436 | This driver can also be built as a module. If so, the module | 1436 | This driver can also be built as a module. If so, the module |
1437 | will be called tmp421. | 1437 | will be called tmp421. |
diff --git a/drivers/hwmon/tmp421.c b/drivers/hwmon/tmp421.c index 9438c1bd5d59..2ae383f737b4 100644 --- a/drivers/hwmon/tmp421.c +++ b/drivers/hwmon/tmp421.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Driver for the Texas Instruments TMP421 SMBus temperature sensor IC. | 23 | * Driver for the Texas Instruments TMP421 SMBus temperature sensor IC. |
24 | * Supported models: TMP421, TMP422, TMP423 | 24 | * Supported models: TMP421, TMP422, TMP423, TMP441, TMP442 |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
@@ -39,7 +39,7 @@ | |||
39 | static const unsigned short normal_i2c[] = { 0x2a, 0x4c, 0x4d, 0x4e, 0x4f, | 39 | static const unsigned short normal_i2c[] = { 0x2a, 0x4c, 0x4d, 0x4e, 0x4f, |
40 | I2C_CLIENT_END }; | 40 | I2C_CLIENT_END }; |
41 | 41 | ||
42 | enum chips { tmp421, tmp422, tmp423 }; | 42 | enum chips { tmp421, tmp422, tmp423, tmp441, tmp442 }; |
43 | 43 | ||
44 | /* The TMP421 registers */ | 44 | /* The TMP421 registers */ |
45 | #define TMP421_STATUS_REG 0x08 | 45 | #define TMP421_STATUS_REG 0x08 |
@@ -60,11 +60,15 @@ static const u8 TMP421_TEMP_LSB[4] = { 0x10, 0x11, 0x12, 0x13 }; | |||
60 | #define TMP421_DEVICE_ID 0x21 | 60 | #define TMP421_DEVICE_ID 0x21 |
61 | #define TMP422_DEVICE_ID 0x22 | 61 | #define TMP422_DEVICE_ID 0x22 |
62 | #define TMP423_DEVICE_ID 0x23 | 62 | #define TMP423_DEVICE_ID 0x23 |
63 | #define TMP441_DEVICE_ID 0x41 | ||
64 | #define TMP442_DEVICE_ID 0x42 | ||
63 | 65 | ||
64 | static const struct i2c_device_id tmp421_id[] = { | 66 | static const struct i2c_device_id tmp421_id[] = { |
65 | { "tmp421", 2 }, | 67 | { "tmp421", 2 }, |
66 | { "tmp422", 3 }, | 68 | { "tmp422", 3 }, |
67 | { "tmp423", 4 }, | 69 | { "tmp423", 4 }, |
70 | { "tmp441", 2 }, | ||
71 | { "tmp442", 3 }, | ||
68 | { } | 72 | { } |
69 | }; | 73 | }; |
70 | MODULE_DEVICE_TABLE(i2c, tmp421_id); | 74 | MODULE_DEVICE_TABLE(i2c, tmp421_id); |
@@ -235,7 +239,8 @@ static int tmp421_detect(struct i2c_client *client, | |||
235 | { | 239 | { |
236 | enum chips kind; | 240 | enum chips kind; |
237 | struct i2c_adapter *adapter = client->adapter; | 241 | struct i2c_adapter *adapter = client->adapter; |
238 | const char *names[] = { "TMP421", "TMP422", "TMP423" }; | 242 | const char * const names[] = { "TMP421", "TMP422", "TMP423", |
243 | "TMP441", "TMP442" }; | ||
239 | int addr = client->addr; | 244 | int addr = client->addr; |
240 | u8 reg; | 245 | u8 reg; |
241 | 246 | ||
@@ -269,6 +274,14 @@ static int tmp421_detect(struct i2c_client *client, | |||
269 | return -ENODEV; | 274 | return -ENODEV; |
270 | kind = tmp423; | 275 | kind = tmp423; |
271 | break; | 276 | break; |
277 | case TMP441_DEVICE_ID: | ||
278 | kind = tmp441; | ||
279 | break; | ||
280 | case TMP442_DEVICE_ID: | ||
281 | if (addr != 0x4c && addr != 0x4d) | ||
282 | return -ENODEV; | ||
283 | kind = tmp442; | ||
284 | break; | ||
272 | default: | 285 | default: |
273 | return -ENODEV; | 286 | return -ENODEV; |
274 | } | 287 | } |
@@ -319,5 +332,5 @@ static struct i2c_driver tmp421_driver = { | |||
319 | module_i2c_driver(tmp421_driver); | 332 | module_i2c_driver(tmp421_driver); |
320 | 333 | ||
321 | MODULE_AUTHOR("Andre Prendel <andre.prendel@gmx.de>"); | 334 | MODULE_AUTHOR("Andre Prendel <andre.prendel@gmx.de>"); |
322 | MODULE_DESCRIPTION("Texas Instruments TMP421/422/423 temperature sensor driver"); | 335 | MODULE_DESCRIPTION("Texas Instruments TMP421/422/423/441/442 temperature sensor driver"); |
323 | MODULE_LICENSE("GPL"); | 336 | MODULE_LICENSE("GPL"); |