summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm75.c
diff options
context:
space:
mode:
authorFrans Klaver <frans.klaver@xsens.com>2014-06-26 11:21:11 +0200
committerGuenter Roeck <linux@roeck-us.net>2014-08-04 07:01:34 -0700
commitc83959f89f1cbe2e712c11e4a77d89f4d34d09ff (patch)
treeddb5efbb797f147bc3d2146b41ccd6093f8a4432 /drivers/hwmon/lm75.c
parent202e4851f8aa6bad39c7799dac93c6951d064c87 (diff)
downloadlinux-c83959f89f1cbe2e712c11e4a77d89f4d34d09ff.tar.bz2
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>
Diffstat (limited to 'drivers/hwmon/lm75.c')
-rw-r--r--drivers/hwmon/lm75.c8
1 files changed, 8 insertions, 0 deletions
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 */
tmp100,
tmp101,
tmp105,
+ tmp112,
tmp175,
tmp275,
tmp75,
@@ -255,6 +256,12 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
data->sample_time = HZ;
clr_mask |= 1 << 7; /* not one-shot mode */
break;
+ case tmp112:
+ set_mask |= 3 << 5; /* 12-bit mode */
+ clr_mask |= 1 << 7; /* not one-shot mode */
+ data->resolution = 12;
+ data->sample_time = HZ / 4;
+ break;
case tmp105:
case tmp175:
case tmp275:
@@ -323,6 +330,7 @@ static const struct i2c_device_id lm75_ids[] = {
{ "tmp100", tmp100, },
{ "tmp101", tmp101, },
{ "tmp105", tmp105, },
+ { "tmp112", tmp112, },
{ "tmp175", tmp175, },
{ "tmp275", tmp275, },
{ "tmp75", tmp75, },