summaryrefslogtreecommitdiff
path: root/drivers/hwmon/nct6775.h
diff options
context:
space:
mode:
authorAhmad Khalifa <ahmad@khalifa.ws>2023-07-19 20:28:48 +0100
committerGuenter Roeck <linux@roeck-us.net>2023-07-19 12:56:12 -0700
commit13558a2e6341d1ba6dff9f8e2febf97877067885 (patch)
tree8613064402cae99642cc2c97b96a52cc99ec151f /drivers/hwmon/nct6775.h
parent957961b6dcc813e6222a4f7e8e3626fcd1f1e098 (diff)
downloadlwn-13558a2e6341d1ba6dff9f8e2febf97877067885.tar.gz
lwn-13558a2e6341d1ba6dff9f8e2febf97877067885.zip
hwmon: (nct6775) Fix IN scaling factors for 6798/6799
Scaling for VTT/VIN5/VIN6 registers were based on prior chips * Split scaling factors for 6798/6799 and assign at probe() * Pass them through driver data to sysfs functions Tested on nct6799 with old/new input/min/max Fixes: 0599682b826f ("hwmon: (nct6775) Add support for NCT6798D") Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws> Link: https://lore.kernel.org/r/20230719192848.337508-1-ahmad@khalifa.ws Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/nct6775.h')
-rw-r--r--drivers/hwmon/nct6775.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/nct6775.h b/drivers/hwmon/nct6775.h
index 44f79c5726a9..a84c6ce7275d 100644
--- a/drivers/hwmon/nct6775.h
+++ b/drivers/hwmon/nct6775.h
@@ -98,6 +98,7 @@ struct nct6775_data {
u8 bank; /* current register bank */
u8 in_num; /* number of in inputs we have */
u8 in[15][3]; /* [0]=in, [1]=in_max, [2]=in_min */
+ const u16 *scale_in; /* internal scaling factors */
unsigned int rpm[NUM_FAN];
u16 fan_min[NUM_FAN];
u8 fan_pulses[NUM_FAN];