summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorAbdel Alkuor <alkuor@gmail.com>2024-01-06 04:02:53 +0100
committerGuenter Roeck <linux@roeck-us.net>2024-01-08 16:26:34 +0100
commit8249a0e25dd2972e919a2552425bf4faa2581d24 (patch)
treef1e2e79c7bdaac901db688f693738f5072481f78 /drivers/hwmon
parenthwmon: (lm75) Add AMS AS6200 temperature sensor (diff)
downloadlinux-8249a0e25dd2972e919a2552425bf4faa2581d24.tar.xz
linux-8249a0e25dd2972e919a2552425bf4faa2581d24.zip
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") Signed-off-by: Abdel Alkuor <alkuor@gmail.com> Link: https://lore.kernel.org/r/20240106030254.384963-1-alkuor@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/lm75.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index d3b0d8bf1654..e00750718536 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -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,