aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshay Piplani <lakshay.piplani@nxp.com>2025-07-28 09:49:13 +0530
committerGuenter Roeck <linux@roeck-us.net>2025-09-07 16:33:47 -0700
commit83b3354a4ad9a784a3335a2c303c693f521d1e47 (patch)
tree407ec8b02e0fae083b6ad3a31c1cecb7e70f087b
parent6a9b2fb8411e1bc9345f048c8061cfa96f45151f (diff)
downloadnet-83b3354a4ad9a784a3335a2c303c693f521d1e47.tar.gz
hwmon: (lm75) Add NXP P3T1750 support
Add support for lm75 compatible NXP P3T1750 temperature sensor. Signed-off-by: Lakshay Piplani <lakshay.piplani@nxp.com> Link: https://lore.kernel.org/r/20250728041913.3754236-2-lakshay.piplani@nxp.com [groeck: Fixed alphabetic order for new chip entries] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--Documentation/hwmon/lm75.rst6
-rw-r--r--drivers/hwmon/lm75.c13
2 files changed, 17 insertions, 2 deletions
diff --git a/Documentation/hwmon/lm75.rst b/Documentation/hwmon/lm75.rst
index c6a54bbca3c51c..908b3a9df06e82 100644
--- a/Documentation/hwmon/lm75.rst
+++ b/Documentation/hwmon/lm75.rst
@@ -121,9 +121,9 @@ Supported chips:
https://www.ti.com/product/TMP1075
- * NXP LM75B, P3T1755, PCT2075
+ * NXP LM75B, P3T1750, P3T1755, PCT2075
- Prefix: 'lm75b', 'p3t1755', 'pct2075'
+ Prefix: 'lm75b', 'p3t1750', 'p3t1755', 'pct2075'
Addresses scanned: none
@@ -131,6 +131,8 @@ Supported chips:
https://www.nxp.com/docs/en/data-sheet/LM75B.pdf
+ https://www.nxp.com/docs/en/data-sheet/P3T1750DP.pdf
+
https://www.nxp.com/docs/en/data-sheet/P3T1755.pdf
https://www.nxp.com/docs/en/data-sheet/PCT2075.pdf
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index 9b4875e2fd8d84..3c23b6e8e1bf5c 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -39,6 +39,7 @@ enum lm75_type { /* keep sorted in alphabetical order */
max6626,
max31725,
mcp980x,
+ p3t1750,
p3t1755,
pct2075,
stds75,
@@ -222,6 +223,13 @@ static const struct lm75_params device_params[] = {
.default_resolution = 9,
.default_sample_time = MSEC_PER_SEC / 18,
},
+ [p3t1750] = {
+ .clr_mask = 1 << 1 | 1 << 7, /* disable SMBAlert and one-shot */
+ .default_resolution = 12,
+ .default_sample_time = 55,
+ .num_sample_times = 4,
+ .sample_times = (unsigned int []){ 28, 55, 110, 220 },
+ },
[p3t1755] = {
.clr_mask = 1 << 1 | 1 << 7, /* disable SMBAlert and one-shot */
.default_resolution = 12,
@@ -805,6 +813,7 @@ static const struct i2c_device_id lm75_i2c_ids[] = {
{ "max31725", max31725, },
{ "max31726", max31725, },
{ "mcp980x", mcp980x, },
+ { "p3t1750", p3t1750, },
{ "p3t1755", p3t1755, },
{ "pct2075", pct2075, },
{ "stds75", stds75, },
@@ -917,6 +926,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = {
.data = (void *)mcp980x
},
{
+ .compatible = "nxp,p3t1750",
+ .data = (void *)p3t1750
+ },
+ {
.compatible = "nxp,p3t1755",
.data = (void *)p3t1755
},