Patch "hwmon (it87): Fix voltage scaling for chips with 10.9mV ADCs" has been added to the 5.10-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 (it87): Fix voltage scaling for chips with 10.9mV  ADCs

to the 5.10-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-it87-fix-voltage-scaling-for-chips-with-10.9mv.patch
and it can be found in the queue-5.10 subdirectory.

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



commit bca8371b6386420008c899e925a6a6b6042bf0b4
Author: Frank Crawford <frank@xxxxxxxxxxxxxxxxxx>
Date:   Sat Mar 18 19:05:42 2023 +1100

    hwmon (it87): Fix voltage scaling for chips with 10.9mV  ADCs
    
    [ Upstream commit 968b66ffeb7956acc72836a7797aeb7b2444ec51 ]
    
    Fix voltage scaling for chips that have 10.9mV ADCs, where scaling was
    not performed.
    
    Fixes: ead8080351c9 ("hwmon: (it87) Add support for IT8732F")
    Signed-off-by: Frank Crawford <frank@xxxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230318080543.1226700-2-frank@xxxxxxxxxxxxxxxxxx
    [groeck: Update subject and description to focus on bug fix]
    Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index fac9b5c68a6a0..85413d3dc3940 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -486,6 +486,8 @@ static const struct it87_devices it87_devices[] = {
 #define has_pwm_freq2(data)	((data)->features & FEAT_PWM_FREQ2)
 #define has_six_temp(data)	((data)->features & FEAT_SIX_TEMP)
 #define has_vin3_5v(data)	((data)->features & FEAT_VIN3_5V)
+#define has_scaling(data)	((data)->features & (FEAT_12MV_ADC | \
+						     FEAT_10_9MV_ADC))
 
 struct it87_sio_data {
 	int sioaddr;
@@ -3098,7 +3100,7 @@ static int it87_probe(struct platform_device *pdev)
 			 "Detected broken BIOS defaults, disabling PWM interface\n");
 
 	/* Starting with IT8721F, we handle scaling of internal voltages */
-	if (has_12mv_adc(data)) {
+	if (has_scaling(data)) {
 		if (sio_data->internal & BIT(0))
 			data->in_scaled |= BIT(3);	/* in3 is AVCC */
 		if (sio_data->internal & BIT(1))



[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