Skip to contentSkip to conversation

hwmon: (lm75) Fix tmp112 default config

PATCH Applied Abdel Alkuor 2 participants 2 messages Jan 6, 2024 – Jan 8, 2024 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (lm75) Fix tmp112 default config

Set tmp112 conversion rate to 8 HZ and 12-bit mode.

Fixes 35cd18048542 ("hwmon: (lm75) Aproximate sample times to data-sheet values")
---
 drivers/hwmon/lm75.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/hwmon/lm75.c +3 -2
index d3b0d8bf1654..e00750718536 100644
@@ -269,8 +269,9 @@ static const struct lm75_params device_params[] = {
 		.resolutions = (u8 []) {9, 10, 11, 12 },
 	},
 	[tmp112] = {
-		.set_mask = 3 << 5,	/* 8 samples / second */
-		.clr_mask = 1 << 7,	/* no one-shot mode*/
+		.config_reg_16bits = true,
+		.set_mask = 0x60C0,	/* 12-bit mode, 8 samples / second */
+		.clr_mask = 1 << 15,	/* no one-shot mode*/
 		.default_resolution = 12,
 		.default_sample_time = 125,
 		.num_sample_times = 4,
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Abdel Alkuor

Set tmp112 conversion rate to 8 HZ and 12-bit mode.

Fixes 35cd18048542 ("hwmon: (lm75) Aproximate sample times to data-sheet values")

Applied.

Thanks,
Guenter