diff options
author | Frans Klaver <frans.klaver@xsens.com> | 2014-06-26 05:21:11 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2014-08-04 10:01:34 -0400 |
commit | c83959f89f1cbe2e712c11e4a77d89f4d34d09ff (patch) | |
tree | ddb5efbb797f147bc3d2146b41ccd6093f8a4432 | |
parent | 202e4851f8aa6bad39c7799dac93c6951d064c87 (diff) |
hwmon: (lm75) Add support for TMP112
TMP112 is compatible to LM75.
Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r-- | Documentation/hwmon/lm75 | 5 | ||||
-rw-r--r-- | drivers/hwmon/Kconfig | 4 | ||||
-rw-r--r-- | drivers/hwmon/lm75.c | 8 |
3 files changed, 13 insertions, 4 deletions
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75 index 2560a9c6d445..c6a5ff1b4641 100644 --- a/Documentation/hwmon/lm75 +++ b/Documentation/hwmon/lm75 | |||
@@ -42,13 +42,14 @@ Supported chips: | |||
42 | Addresses scanned: none | 42 | Addresses scanned: none |
43 | Datasheet: Publicly available at the ST website | 43 | Datasheet: Publicly available at the ST website |
44 | http://www.st.com/internet/analog/product/121769.jsp | 44 | http://www.st.com/internet/analog/product/121769.jsp |
45 | * Texas Instruments TMP100, TMP101, TMP105, TMP75, TMP175, TMP275 | 45 | * Texas Instruments TMP100, TMP101, TMP105, TMP112, TMP75, TMP175, TMP275 |
46 | Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp175', 'tmp75', 'tmp275' | 46 | Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp112', 'tmp175', 'tmp75', 'tmp275' |
47 | Addresses scanned: none | 47 | Addresses scanned: none |
48 | Datasheet: Publicly available at the Texas Instruments website | 48 | Datasheet: Publicly available at the Texas Instruments website |
49 | http://www.ti.com/product/tmp100 | 49 | http://www.ti.com/product/tmp100 |
50 | http://www.ti.com/product/tmp101 | 50 | http://www.ti.com/product/tmp101 |
51 | http://www.ti.com/product/tmp105 | 51 | http://www.ti.com/product/tmp105 |
52 | http://www.ti.com/product/tmp112 | ||
52 | http://www.ti.com/product/tmp75 | 53 | http://www.ti.com/product/tmp75 |
53 | http://www.ti.com/product/tmp175 | 54 | http://www.ti.com/product/tmp175 |
54 | http://www.ti.com/product/tmp275 | 55 | http://www.ti.com/product/tmp275 |
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index a01a166e511b..0c7359c5c317 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig | |||
@@ -894,8 +894,8 @@ config SENSORS_LM75 | |||
894 | - NXP's LM75A | 894 | - NXP's LM75A |
895 | - ST Microelectronics STDS75 | 895 | - ST Microelectronics STDS75 |
896 | - TelCom (now Microchip) TCN75 | 896 | - TelCom (now Microchip) TCN75 |
897 | - Texas Instruments TMP100, TMP101, TMP105, TMP75, TMP175, | 897 | - Texas Instruments TMP100, TMP101, TMP105, TMP112, TMP75, |
898 | TMP275 | 898 | TMP175, TMP275 |
899 | 899 | ||
900 | This driver supports driver model based binding through board | 900 | This driver supports driver model based binding through board |
901 | specific I2C device tables. | 901 | specific I2C device tables. |
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c index 479ffbeed3f8..d16dbb33a531 100644 --- a/drivers/hwmon/lm75.c +++ b/drivers/hwmon/lm75.c | |||
@@ -52,6 +52,7 @@ enum lm75_type { /* keep sorted in alphabetical order */ | |||
52 | tmp100, | 52 | tmp100, |
53 | tmp101, | 53 | tmp101, |
54 | tmp105, | 54 | tmp105, |
55 | tmp112, | ||
55 | tmp175, | 56 | tmp175, |
56 | tmp275, | 57 | tmp275, |
57 | tmp75, | 58 | tmp75, |
@@ -255,6 +256,12 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
255 | data->sample_time = HZ; | 256 | data->sample_time = HZ; |
256 | clr_mask |= 1 << 7; /* not one-shot mode */ | 257 | clr_mask |= 1 << 7; /* not one-shot mode */ |
257 | break; | 258 | break; |
259 | case tmp112: | ||
260 | set_mask |= 3 << 5; /* 12-bit mode */ | ||
261 | clr_mask |= 1 << 7; /* not one-shot mode */ | ||
262 | data->resolution = 12; | ||
263 | data->sample_time = HZ / 4; | ||
264 | break; | ||
258 | case tmp105: | 265 | case tmp105: |
259 | case tmp175: | 266 | case tmp175: |
260 | case tmp275: | 267 | case tmp275: |
@@ -323,6 +330,7 @@ static const struct i2c_device_id lm75_ids[] = { | |||
323 | { "tmp100", tmp100, }, | 330 | { "tmp100", tmp100, }, |
324 | { "tmp101", tmp101, }, | 331 | { "tmp101", tmp101, }, |
325 | { "tmp105", tmp105, }, | 332 | { "tmp105", tmp105, }, |
333 | { "tmp112", tmp112, }, | ||
326 | { "tmp175", tmp175, }, | 334 | { "tmp175", tmp175, }, |
327 | { "tmp275", tmp275, }, | 335 | { "tmp275", tmp275, }, |
328 | { "tmp75", tmp75, }, | 336 | { "tmp75", tmp75, }, |