Murad Masimov
dd471e2577
hwmon: (tmp513) Fix interpretation of values of Temperature Result and Limit Registers
...
The values returned by the driver after processing the contents of the
Temperature Result and the Temperature Limit Registers do not correspond to
the TMP512/TMP513 specifications. A raw register value is converted to a
signed integer value by a sign extension in accordance with the algorithm
provided in the specification, but due to the off-by-one error in the sign
bit index, the result is incorrect.
According to the TMP512 and TMP513 datasheets, the Temperature Result (08h
to 0Bh) and Limit (11h to 14h) Registers are 13-bit two's complement
integer values, shifted left by 3 bits. The value is scaled by 0.0625
degrees Celsius per bit. E.g., if regval = 1 1110 0111 0000 000, the
output should be -25 degrees, but the driver will return +487 degrees.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 59dfa75e5d82 ("hwmon: Add driver for Texas Instruments TMP512/513 sensor chips.")
Signed-off-by: Murad Masimov <m.masimov@maxima.ru>
Link: https://lore.kernel.org/r/20241216173648.526-4-m.masimov@maxima.ru
[groeck: fixed description line length]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-12-16 15:58:25 -08:00
..
2024-11-10 14:48:07 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:07 -08:00
2024-11-12 13:54:55 -08:00
2019-05-30 11:25:18 -07:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:32 -07:00
2024-07-07 07:48:25 -07:00
2022-02-09 13:00:45 +00:00
2023-06-08 06:41:17 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:32 -07:00
2024-05-01 07:47:49 -07:00
2023-06-08 06:41:17 -07:00
2024-06-08 16:07:32 -07:00
2019-05-24 17:36:42 +02:00
2024-07-31 10:43:51 -07:00
2022-09-25 14:22:12 -07:00
2024-10-02 17:23:23 -04:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-07-31 10:43:51 -07:00
2024-10-07 08:42:31 -07:00
2024-06-08 16:07:32 -07:00
2024-11-10 14:48:06 -08:00
2021-10-12 07:22:41 -07:00
2024-11-24 07:36:47 -08:00
2023-08-21 06:04:29 -07:00
2024-05-01 07:47:49 -07:00
2023-06-08 06:41:17 -07:00
2024-11-10 14:48:07 -08:00
2024-08-27 08:11:15 -07:00
2024-09-27 08:18:43 -07:00
2024-10-02 17:23:23 -04:00
2023-09-29 14:48:31 -07:00
2024-10-02 17:23:23 -04:00
2024-05-01 07:47:49 -07:00
2024-02-25 12:37:46 -08:00
2023-08-21 06:04:29 -07:00
2020-10-04 08:40:10 -07:00
2024-08-27 08:10:23 -07:00
2024-04-28 10:08:43 -07:00
2024-06-08 16:07:33 -07:00
2024-05-29 15:33:18 -07:00
2024-11-12 19:03:58 -08:00
2024-11-10 14:48:07 -08:00
2019-05-30 11:26:32 -07:00
2024-10-02 17:23:23 -04:00
2024-11-10 14:48:07 -08:00
2023-04-27 11:53:57 -07:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:32 -07:00
2024-05-01 07:47:49 -07:00
2024-05-12 09:02:00 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:07 -08:00
2024-06-08 16:07:32 -07:00
2024-02-16 15:51:32 +01:00
2024-09-27 08:18:43 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-07-09 15:45:48 -07:00
2024-10-02 17:23:23 -04:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2023-04-19 07:08:31 -07:00
2024-11-10 14:48:06 -08:00
2023-08-21 06:04:29 -07:00
2024-05-01 07:47:49 -07:00
2024-09-05 17:21:59 +02:00
2024-05-01 07:47:49 -07:00
2020-08-23 17:36:59 -05:00
2024-12-02 11:34:44 -08:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:06 -08:00
2022-07-01 11:53:29 -07:00
2024-05-04 17:37:03 +02:00
2023-09-29 14:48:31 -07:00
2024-07-19 15:55:08 -07:00
2024-11-10 14:48:07 -08:00
2024-05-01 07:47:49 -07:00
2024-07-02 11:30:10 -07:00
2024-08-27 08:11:15 -07:00
2024-12-02 11:34:44 -08:00
2024-11-10 14:48:07 -08:00
2024-04-30 10:32:14 -07:00
2024-11-12 13:54:55 -08:00
2023-04-19 07:08:36 -07:00
2024-09-18 12:40:48 +02:00
2024-11-19 11:23:52 -08:00
2023-08-21 06:04:29 -07:00
2024-04-30 10:31:26 -07:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:32 -07:00
2024-06-08 16:07:32 -07:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:32 -07:00
2022-07-13 08:38:19 -07:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:33 -07:00
2023-06-08 06:41:17 -07:00
2024-06-08 16:07:33 -07:00
2024-06-08 16:07:33 -07:00
2024-05-09 12:56:06 -07:00
2024-08-27 08:11:15 -07:00
2024-08-27 08:10:23 -07:00
2024-05-01 07:47:49 -07:00
2024-07-31 10:43:52 -07:00
2024-05-09 12:56:06 -07:00
2024-07-31 10:43:51 -07:00
2023-08-21 06:04:29 -07:00
2024-05-01 07:47:49 -07:00
2024-07-31 10:43:52 -07:00
2024-05-01 07:47:49 -07:00
2022-09-25 14:22:12 -07:00
2019-11-06 14:37:19 -08:00
2024-05-01 07:47:49 -07:00
2024-09-01 06:39:57 -07:00
2024-07-31 10:43:52 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-02-25 12:37:10 -08:00
2023-08-21 06:04:29 -07:00
2024-11-10 14:48:07 -08:00
2024-05-01 07:47:49 -07:00
2024-11-10 14:48:07 -08:00
2023-05-26 13:33:05 +02:00
2024-07-31 10:43:53 -07:00
2024-07-31 10:43:53 -07:00
2024-05-01 07:47:49 -07:00
2024-05-09 12:56:06 -07:00
2024-11-10 14:48:06 -08:00
2023-12-11 06:20:28 -08:00
2024-07-31 10:43:53 -07:00
2024-07-31 10:43:52 -07:00
2022-09-25 14:22:12 -07:00
2024-05-01 07:47:49 -07:00
2024-02-25 12:37:36 -08:00
2024-05-01 07:47:49 -07:00
2024-06-11 07:25:03 -07:00
2024-05-01 07:47:49 -07:00
2024-11-10 14:48:07 -08:00
2024-06-08 16:07:33 -07:00
2019-05-30 11:26:32 -07:00
2023-08-25 07:43:04 -07:00
2024-06-08 16:07:33 -07:00
2024-05-29 15:23:54 -07:00
2024-12-03 08:22:25 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-06-11 07:25:13 -07:00
2024-11-10 14:48:07 -08:00
2024-08-27 08:11:15 -07:00
2024-05-01 07:47:49 -07:00
2024-08-27 08:11:15 -07:00
2023-08-21 06:04:31 -07:00
2024-08-27 08:10:23 -07:00
2024-11-10 14:48:06 -08:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-08-28 13:33:53 -07:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:07 -08:00
2024-05-01 07:47:49 -07:00
2024-11-10 14:48:06 -08:00
2024-06-08 16:07:33 -07:00
2024-08-26 20:58:05 -07:00
2024-11-12 13:54:55 -08:00
2024-11-10 14:48:06 -08:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2023-10-27 07:27:24 -07:00
2024-08-27 08:10:23 -07:00
2024-02-25 12:37:36 -08:00
2024-11-10 14:48:07 -08:00
2023-03-03 20:45:02 +01:00
2023-08-21 06:04:29 -07:00
2023-04-19 07:08:40 -07:00
2024-11-10 14:48:05 -08:00
2024-06-08 16:07:33 -07:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:07 -08:00
2024-09-12 14:17:29 -07:00
2024-07-15 17:39:13 -07:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:06 -08:00
2023-04-19 07:08:38 -07:00
2021-10-12 07:22:41 -07:00
2024-11-10 14:48:07 -08:00
2024-05-01 07:47:49 -07:00
2023-04-19 07:08:38 -07:00
2024-11-10 14:48:05 -08:00
2024-08-27 08:10:23 -07:00
2024-11-10 14:48:06 -08:00
2024-08-27 08:10:23 -07:00
2023-04-19 07:08:38 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:33 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-11-23 09:49:02 -08:00
2024-07-31 10:43:51 -07:00
2024-08-27 08:11:15 -07:00
2024-08-27 08:11:15 -07:00
2024-12-16 15:58:25 -08:00
2024-11-23 09:49:03 -08:00
2024-11-10 14:48:07 -08:00
2024-08-27 08:10:11 -07:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:07 -08:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-07-07 07:48:25 -07:00
2024-11-10 14:48:07 -08:00
2024-02-11 13:43:08 -08:00
2024-11-10 14:48:07 -08:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-09-27 08:18:43 -07:00
2024-06-08 16:07:33 -07:00
2019-06-05 17:30:30 +02:00
2019-06-05 17:30:30 +02:00
2024-11-10 14:48:07 -08:00