Patch "hwmon: (ltc2947) fix temperature scaling" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    hwmon: (ltc2947) fix temperature scaling

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hwmon-ltc2947-fix-temperature-scaling.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit db2daa1f3f6fc77de3420960e9c261b4609fcaa0
Author: Derek Nguyen <derek.nguyen@xxxxxxxxxxx>
Date:   Thu Nov 10 13:21:08 2022 -0600

    hwmon: (ltc2947) fix temperature scaling
    
    [ Upstream commit 07e06193ead86d4812f431b4d87bbd4161222e3f ]
    
    The LTC2947 datasheet (Rev. B) calls out in the section "Register
    Description: Non-Accumulated Result Registers" (pg. 30) that "To
    calculate temperature, multiply the TEMP register value by 0.204°C
    and add 5.5°C". Fix to add 5.5C and not 0.55C.
    
    Fixes: 9f90fd652bed ("hwmon: Add support for ltc2947")
    Signed-off-by: Derek Nguyen <derek.nguyen@xxxxxxxxxxx>
    Signed-off-by: Brandon Maier <brandon.maier@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221110192108.20624-1-brandon.maier@xxxxxxxxxxx
    Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hwmon/ltc2947-core.c b/drivers/hwmon/ltc2947-core.c
index 5423466de697..e918490f3ff7 100644
--- a/drivers/hwmon/ltc2947-core.c
+++ b/drivers/hwmon/ltc2947-core.c
@@ -396,7 +396,7 @@ static int ltc2947_read_temp(struct device *dev, const u32 attr, long *val,
 		return ret;
 
 	/* in milidegrees celcius, temp is given by: */
-	*val = (__val * 204) + 550;
+	*val = (__val * 204) + 5500;
 
 	return 0;
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux