Skip to content

Commit d350665

Browse files
Wolfram Sanggroeck
authored andcommitted
hwmon: (lm75) Add NXP P3T1755 support
Add this LM75 compatible sensor which needs a separate entry because of its default sampling time and SMBusAlert handling. Signed-off-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 844029c commit d350665

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

Documentation/hwmon/lm75.rst

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

122122
https://www.ti.com/product/TMP1075
123123

124-
* NXP LM75B, PCT2075
124+
* NXP LM75B, P3T1755, PCT2075
125125

126-
Prefix: 'lm75b', 'pct2075'
126+
Prefix: 'lm75b', 'p3t1755', 'pct2075'
127127

128128
Addresses scanned: none
129129

130130
Datasheet: Publicly available at the NXP website
131131

132132
https://www.nxp.com/documents/data_sheet/LM75B.pdf
133133

134+
https://www.nxp.com/docs/en/data-sheet/P3T1755.pdf
135+
134136
https://www.nxp.com/docs/en/data-sheet/PCT2075.pdf
135137

136138
* AMS OSRAM AS6200

drivers/hwmon/lm75.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ enum lm75_type { /* keep sorted in alphabetical order */
3838
max6626,
3939
max31725,
4040
mcp980x,
41+
p3t1755,
4142
pct2075,
4243
stds75,
4344
stlm75,
@@ -222,6 +223,13 @@ static const struct lm75_params device_params[] = {
222223
.default_resolution = 9,
223224
.default_sample_time = MSEC_PER_SEC / 18,
224225
},
226+
[p3t1755] = {
227+
.clr_mask = 1 << 1 | 1 << 7, /* disable SMBAlert and one-shot */
228+
.default_resolution = 12,
229+
.default_sample_time = 55,
230+
.num_sample_times = 4,
231+
.sample_times = (unsigned int []){ 28, 55, 110, 220 },
232+
},
225233
[pct2075] = {
226234
.default_resolution = 11,
227235
.default_sample_time = MSEC_PER_SEC / 10,
@@ -734,6 +742,7 @@ static const struct i2c_device_id lm75_ids[] = {
734742
{ "max31725", max31725, },
735743
{ "max31726", max31725, },
736744
{ "mcp980x", mcp980x, },
745+
{ "p3t1755", p3t1755, },
737746
{ "pct2075", pct2075, },
738747
{ "stds75", stds75, },
739748
{ "stlm75", stlm75, },
@@ -813,6 +822,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = {
813822
.compatible = "maxim,mcp980x",
814823
.data = (void *)mcp980x
815824
},
825+
{
826+
.compatible = "nxp,p3t1755",
827+
.data = (void *)p3t1755
828+
},
816829
{
817830
.compatible = "nxp,pct2075",
818831
.data = (void *)pct2075

0 commit comments

Comments
 (0)