Martin Blumenstingl
084ed144c4
hwmon: (jc42) Restore the min/max/critical temperatures on resume
...
The JC42 compatible thermal sensor on Kingston KSM32ES8/16ME DIMMs
(using Micron E-Die) is an ST Microelectronics STTS2004 (manufacturer
0x104a, device 0x2201). It does not keep the previously programmed
minimum, maximum and critical temperatures after system suspend and
resume (which is a shutdown / startup cycle for the JC42 temperature
sensor). This results in an alarm on system resume because the hardware
default for these values is 0°C (so any environment temperature greater
than 0°C will trigger the alarm).
Example before system suspend:
jc42-i2c-0-1a
Adapter: SMBus PIIX4 adapter port 0 at 0b00
temp1: +34.8°C (low = +0.0°C)
(high = +85.0°C, hyst = +85.0°C)
(crit = +95.0°C, hyst = +95.0°C)
Example after system resume (without this change):
jc42-i2c-0-1a
Adapter: SMBus PIIX4 adapter port 0 at 0b00
temp1: +34.8°C (low = +0.0°C) ALARM (HIGH, CRIT)
(high = +0.0°C, hyst = +0.0°C)
(crit = +0.0°C, hyst = +0.0°C)
Apply the cached values from the JC42_REG_TEMP_UPPER,
JC42_REG_TEMP_LOWER, JC42_REG_TEMP_CRITICAL and JC42_REG_SMBUS (where
the SMBUS register is not related to this issue but a side-effect of
using regcache_sync() during system resume with the previously
cached/programmed values. This fixes the alarm due to the hardware
defaults of 0°C because the previously applied limits (set by userspace)
are re-applied on system resume.
Fixes: 175c490c9e7f ("hwmon: (jc42) Add support for STTS2004 and AT30TSE004")
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20221023213157.11078-3-martin.blumenstingl@googlemail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-12-04 16:45:02 -08:00
..
2022-12-04 16:45:02 -08:00
2022-05-22 11:32:32 -07:00
2022-11-04 16:47:01 -07:00
2022-09-25 14:22:11 -07:00
2022-09-25 14:22:11 -07:00
2022-10-04 19:02:54 -07:00
2019-05-30 11:25:18 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2022-10-04 19:02:54 -07:00
2022-02-09 13:00:45 +00:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-12-04 16:45:02 -08:00
2022-09-25 14:22:11 -07:00
2020-09-23 09:42:40 -07:00
2019-05-24 17:36:42 +02:00
2022-09-25 14:22:12 -07:00
2022-09-25 14:22:12 -07:00
2022-09-25 14:22:12 -07:00
2022-09-25 14:22:12 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-08-16 12:46:26 +02:00
2022-09-19 06:17:05 -07:00
2022-12-04 16:45:02 -08:00
2022-09-19 06:17:05 -07:00
2021-10-12 07:22:41 -07:00
2022-12-04 16:45:02 -08:00
2022-05-22 11:32:31 -07:00
2022-10-04 19:02:54 -07:00
2022-10-04 19:02:54 -07:00
2022-07-21 07:15:55 -07:00
2019-06-23 18:33:01 -07:00
2022-07-13 08:39:42 -07:00
2022-12-01 09:20:55 -08:00
2021-10-12 07:22:41 -07:00
2022-09-25 14:22:11 -07:00
2022-05-22 11:32:30 -07:00
2020-10-04 08:40:10 -07:00
2022-12-01 09:20:55 -08:00
2021-05-17 19:50:23 -05:00
2022-10-22 06:59:12 -07:00
2021-02-11 20:28:56 -08:00
2019-05-30 11:26:32 -07:00
2022-09-19 06:17:05 -07:00
2022-10-04 19:02:54 -07:00
2022-07-13 08:39:42 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-12-04 16:45:02 -08:00
2021-10-12 07:22:41 -07:00
2022-09-25 14:22:11 -07:00
2022-10-04 19:02:54 -07:00
2021-08-17 14:54:26 -07:00
2022-12-04 16:45:01 -08:00
2022-10-04 19:02:54 -07:00
2021-10-12 07:22:41 -07:00
2020-09-23 09:42:39 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-25 14:22:12 -07:00
2022-09-19 06:16:39 -07:00
2020-09-23 09:42:39 -07:00
2020-08-23 17:36:59 -05:00
2022-08-17 14:09:39 +02:00
2020-08-04 14:24:39 -07:00
2022-11-20 06:04:16 -08:00
2022-07-01 11:53:29 -07:00
2022-11-20 06:04:16 -08:00
2020-12-02 17:42:23 -08:00
2022-09-19 06:17:05 -07:00
2021-04-20 06:50:14 -07:00
2022-08-16 12:46:26 +02:00
2021-12-26 15:02:05 -08:00
2022-11-20 06:04:15 -08:00
2022-05-17 05:53:00 -07:00
2022-12-04 16:45:02 -08:00
2022-12-04 16:45:02 -08:00
2019-09-03 12:47:17 -07:00
2022-07-20 17:39:11 +02:00
2022-12-04 16:45:02 -08:00
2022-05-22 11:32:30 -07:00
2021-10-12 07:22:41 -07:00
2022-09-19 06:17:05 -07:00
2022-02-27 17:03:19 -08:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-07-13 08:38:19 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-12-04 16:45:02 -08:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2019-04-15 17:19:53 -07:00
2021-04-20 06:50:14 -07:00
2022-11-20 06:04:15 -08:00
2022-09-25 14:22:12 -07:00
2022-09-25 14:22:12 -07:00
2019-11-06 14:37:19 -08:00
2021-04-20 06:50:14 -07:00
2022-12-04 16:45:02 -08:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-04-20 06:50:14 -07:00
2020-09-23 09:42:39 -07:00
2021-04-20 06:50:14 -07:00
2021-10-12 07:22:41 -07:00
2019-05-21 11:28:45 +02:00
2022-12-04 16:45:02 -08:00
2022-12-04 16:45:02 -08:00
2019-06-19 17:09:55 +02:00
2022-02-09 13:00:45 +00:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2021-10-12 07:22:37 -07:00
2021-05-17 19:50:37 -05:00
2022-09-25 14:22:12 -07:00
2022-09-19 06:17:05 -07:00
2021-01-27 17:44:18 -08:00
2021-04-20 06:50:14 -07:00
2021-10-12 07:22:41 -07:00
2022-09-25 14:22:12 -07:00
2022-09-25 14:22:12 -07:00
2022-09-20 07:10:58 -07:00
2022-09-19 06:17:05 -07:00
2019-02-18 14:23:29 -08:00
2022-07-15 10:55:57 -07:00
2019-05-30 11:26:32 -07:00
2022-02-27 17:03:17 -08:00
2022-09-25 14:22:11 -07:00
2022-10-02 08:01:18 -07:00
2022-08-10 06:37:01 -07:00
2022-05-22 11:32:31 -07:00
2022-09-25 14:22:12 -07:00
2022-08-10 06:37:01 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2019-09-03 12:47:17 -07:00
2019-06-05 17:37:14 +02:00
2022-02-19 16:47:54 -08:00
2021-04-20 06:50:14 -07:00
2022-09-19 06:17:06 -07:00
2022-09-25 14:22:11 -07:00
2019-05-30 11:26:41 -07:00
2022-08-16 12:46:26 +02:00
2022-02-27 17:03:17 -08:00
2022-10-16 15:52:59 -07:00
2021-12-26 15:02:06 -08:00
2021-04-20 06:50:14 -07:00
2022-12-04 16:45:02 -08:00
2022-12-04 16:45:02 -08:00
2022-07-13 08:38:19 -07:00
2021-06-17 04:21:44 -07:00
2022-02-27 17:03:19 -08:00
2022-02-27 17:03:17 -08:00
2022-11-04 16:47:01 -07:00
2022-08-17 14:09:39 +02:00
2020-09-23 09:42:39 -07:00
2022-12-04 16:45:02 -08:00
2022-07-26 07:00:27 -07:00
2021-10-12 07:22:41 -07:00
2020-09-23 09:42:40 -07:00
2022-09-25 14:22:11 -07:00
2022-05-22 11:32:32 -07:00
2022-08-16 12:46:26 +02:00
2022-12-04 16:45:02 -08:00
2021-10-12 07:22:41 -07:00
2021-01-27 17:44:17 -08:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-02-08 09:27:33 +00:00
2020-09-23 09:42:39 -07:00
2022-02-27 17:03:18 -08:00
2022-09-19 06:17:05 -07:00
2022-09-25 14:22:12 -07:00
2022-09-25 14:22:12 -07:00
2022-09-25 14:22:12 -07:00
2022-09-19 06:17:05 -07:00
2022-09-19 06:17:05 -07:00
2022-03-03 07:40:42 -08:00
2020-10-04 08:40:10 -07:00
2022-10-04 19:02:54 -07:00
2019-05-21 10:50:45 +02:00
2022-03-08 09:15:22 -08:00
2022-09-25 14:22:11 -07:00
2020-03-24 21:33:36 +01:00
2021-10-12 07:22:41 -07:00
2022-09-25 14:22:11 -07:00
2022-10-04 19:02:54 -07:00
2022-09-19 06:17:05 -07:00
2022-09-25 14:22:12 -07:00
2022-09-26 15:21:33 -07:00
2020-09-23 09:42:39 -07:00
2022-10-04 19:02:54 -07:00
2022-10-04 19:02:54 -07:00
2022-10-04 19:02:54 -07:00
2022-10-04 19:02:54 -07:00
2022-10-04 19:02:54 -07:00
2019-06-05 17:30:30 +02:00
2019-06-05 17:30:30 +02:00
2021-12-28 08:04:10 -08:00