Skip to content

Commit

Permalink
hwmon: (lm75) add support for PCT2075
Browse files Browse the repository at this point in the history
The NXP PCT2075 is largely compatible with other chips already supported
by the LM75 driver. It uses an 11-bit resolution and defaults to 100 ms
sampling period. The datasheet is here:

  https://www.nxp.com/docs/en/data-sheet/PCT2075.pdf

Signed-off-by: Daniel Mack <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[groeck: Documentation update]
Signed-off-by: Guenter Roeck <[email protected]>
  • Loading branch information
zonque authored and groeck committed Sep 3, 2019
1 parent 5ac6bad commit 557c7ff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Documentation/hwmon/lm75.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,18 @@ Supported chips:

http://www.ti.com/product/tmp275

* NXP LM75B
* NXP LM75B, PCT2075

Prefix: 'lm75b'
Prefix: 'lm75b', 'pct2075'

Addresses scanned: none

Datasheet: Publicly available at the NXP website

http://www.nxp.com/documents/data_sheet/LM75B.pdf

http://www.nxp.com/docs/en/data-sheet/PCT2075.pdf

Author: Frodo Looijaard <[email protected]>

Description
Expand Down
10 changes: 10 additions & 0 deletions drivers/hwmon/lm75.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ enum lm75_type { /* keep sorted in alphabetical order */
max6626,
max31725,
mcp980x,
pct2075,
stds75,
stlm75,
tcn75,
Expand Down Expand Up @@ -317,6 +318,10 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
data->resolution = 9;
data->sample_time = MSEC_PER_SEC / 8;
break;
case pct2075:
data->resolution = 11;
data->sample_time = MSEC_PER_SEC / 10;
break;
case mcp980x:
data->resolution_limits = 9;
/* fall through */
Expand Down Expand Up @@ -397,6 +402,7 @@ static const struct i2c_device_id lm75_ids[] = {
{ "max31725", max31725, },
{ "max31726", max31725, },
{ "mcp980x", mcp980x, },
{ "pct2075", pct2075, },
{ "stds75", stds75, },
{ "stlm75", stlm75, },
{ "tcn75", tcn75, },
Expand Down Expand Up @@ -466,6 +472,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = {
.compatible = "maxim,mcp980x",
.data = (void *)mcp980x
},
{
.compatible = "nxp,pct2075",
.data = (void *)pct2075
},
{
.compatible = "st,stds75",
.data = (void *)stds75
Expand Down

0 comments on commit 557c7ff

Please sign in to comment.