Skip to content

Commit 557c7ff

Browse files
zonquegroeck
authored andcommitted
hwmon: (lm75) add support for PCT2075
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 <daniel@zonque.org> Link: https://lore.kernel.org/r/20190711124504.7580-2-daniel@zonque.org [groeck: Documentation update] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 5ac6bad commit 557c7ff

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Documentation/hwmon/lm75.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,18 @@ Supported chips:
119119

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

122-
* NXP LM75B
122+
* NXP LM75B, PCT2075
123123

124-
Prefix: 'lm75b'
124+
Prefix: 'lm75b', 'pct2075'
125125

126126
Addresses scanned: none
127127

128128
Datasheet: Publicly available at the NXP website
129129

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

132+
http://www.nxp.com/docs/en/data-sheet/PCT2075.pdf
133+
132134
Author: Frodo Looijaard <frodol@dds.nl>
133135

134136
Description

drivers/hwmon/lm75.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ enum lm75_type { /* keep sorted in alphabetical order */
3636
max6626,
3737
max31725,
3838
mcp980x,
39+
pct2075,
3940
stds75,
4041
stlm75,
4142
tcn75,
@@ -317,6 +318,10 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
317318
data->resolution = 9;
318319
data->sample_time = MSEC_PER_SEC / 8;
319320
break;
321+
case pct2075:
322+
data->resolution = 11;
323+
data->sample_time = MSEC_PER_SEC / 10;
324+
break;
320325
case mcp980x:
321326
data->resolution_limits = 9;
322327
/* fall through */
@@ -397,6 +402,7 @@ static const struct i2c_device_id lm75_ids[] = {
397402
{ "max31725", max31725, },
398403
{ "max31726", max31725, },
399404
{ "mcp980x", mcp980x, },
405+
{ "pct2075", pct2075, },
400406
{ "stds75", stds75, },
401407
{ "stlm75", stlm75, },
402408
{ "tcn75", tcn75, },
@@ -466,6 +472,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = {
466472
.compatible = "maxim,mcp980x",
467473
.data = (void *)mcp980x
468474
},
475+
{
476+
.compatible = "nxp,pct2075",
477+
.data = (void *)pct2075
478+
},
469479
{
470480
.compatible = "st,stds75",
471481
.data = (void *)stds75

0 commit comments

Comments
 (0)