summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/nct6775.h
diff options
context:
space:
mode:
authorAhmad Khalifa <ahmad@khalifa.ws>2023-07-19 23:41:42 +0100
committerGuenter Roeck <linux@roeck-us.net>2023-08-21 06:04:30 -0700
commit4f65c15cf70eb22c074889af60b9d2bcffbb375a (patch)
treebce2dd981e1018ba11202f0e8ccd96fe48616c9b /drivers/hwmon/nct6775.h
parenta0ac418c6007c9e1694e21056964c923364f3175 (diff)
downloadlinux-stable-4f65c15cf70eb22c074889af60b9d2bcffbb375a.tar.gz
linux-stable-4f65c15cf70eb22c074889af60b9d2bcffbb375a.tar.bz2
linux-stable-4f65c15cf70eb22c074889af60b9d2bcffbb375a.zip
hwmon: (nct6775) Add support for 18 IN readings for nct6799
* Add additional VIN/IN_MIN/IN_MAX register values * Separate ALARM/BEEP bits for nct6799 * Update scaling factors for nct6799 Registers/alarms match for NCT6796D-S and NCT6799D-R Tested on NCT6799D-R for new IN/MIN/MAX and ALARMS Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws> Link: https://lore.kernel.org/r/20230719224142.411237-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.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/hwmon/nct6775.h b/drivers/hwmon/nct6775.h
index c752bc7bbe72..edcde39c4791 100644
--- a/drivers/hwmon/nct6775.h
+++ b/drivers/hwmon/nct6775.h
@@ -16,6 +16,7 @@ enum pwm_enable { off, manual, thermal_cruise, speed_cruise, sf3, sf4 };
#define NUM_REG_BEEP 5 /* Max number of beep registers */
#define NUM_FAN 7
+#define NUM_IN 18
struct nct6775_data {
int addr; /* IO base of hw monitor block */
@@ -97,7 +98,7 @@ struct nct6775_data {
/* Register values */
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 */
+ u8 in[NUM_IN][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];
@@ -166,7 +167,7 @@ struct nct6775_data {
u16 have_temp;
u16 have_temp_fixed;
u16 have_tsi_temp;
- u16 have_in;
+ u32 have_in;
/* Remember extra register values over suspend/resume */
u8 vbat;