diff options
author | Ahmad Khalifa <ahmad@khalifa.ws> | 2023-07-20 01:41:42 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2023-08-21 16:04:30 +0300 |
commit | 4f65c15cf70eb22c074889af60b9d2bcffbb375a (patch) | |
tree | bce2dd981e1018ba11202f0e8ccd96fe48616c9b /drivers/hwmon/nct6775.h | |
parent | a0ac418c6007c9e1694e21056964c923364f3175 (diff) | |
download | linux-4f65c15cf70eb22c074889af60b9d2bcffbb375a.tar.xz |
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.h | 5 |
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; |