Skip to content

Commit

Permalink
hwmon: (lm75) Add support for TMP112
Browse files Browse the repository at this point in the history
TMP112 is compatible to LM75.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Frans Klaver authored and Guenter Roeck committed Aug 4, 2014
1 parent 202e485 commit c83959f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Documentation/hwmon/lm75
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ Supported chips:
Addresses scanned: none
Datasheet: Publicly available at the ST website
http://www.st.com/internet/analog/product/121769.jsp
* Texas Instruments TMP100, TMP101, TMP105, TMP75, TMP175, TMP275
Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp175', 'tmp75', 'tmp275'
* Texas Instruments TMP100, TMP101, TMP105, TMP112, TMP75, TMP175, TMP275
Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp112', 'tmp175', 'tmp75', 'tmp275'
Addresses scanned: none
Datasheet: Publicly available at the Texas Instruments website
http://www.ti.com/product/tmp100
http://www.ti.com/product/tmp101
http://www.ti.com/product/tmp105
http://www.ti.com/product/tmp112
http://www.ti.com/product/tmp75
http://www.ti.com/product/tmp175
http://www.ti.com/product/tmp275
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,8 @@ config SENSORS_LM75
- NXP's LM75A
- ST Microelectronics STDS75
- TelCom (now Microchip) TCN75
- Texas Instruments TMP100, TMP101, TMP105, TMP75, TMP175,
TMP275
- Texas Instruments TMP100, TMP101, TMP105, TMP112, TMP75,
TMP175, TMP275

This driver supports driver model based binding through board
specific I2C device tables.
Expand Down
8 changes: 8 additions & 0 deletions drivers/hwmon/lm75.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ enum lm75_type { /* keep sorted in alphabetical order */
tmp100,
tmp101,
tmp105,
tmp112,
tmp175,
tmp275,
tmp75,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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, },
Expand Down

0 comments on commit c83959f

Please sign in to comment.