#define NUM_TEMP 12 /* Max number of temp attribute sets w/ limits*/ #define NUM_TEMP_FIXED 6 /* Max number of fixed temp attribute sets */ #define NUM_TSI_TEMP 8 /* Max number of TSI temp register pairs */
#define NUM_REG_ALARM 7 /* Max number of alarm registers */ #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 */ int sioreg; /* SIO register address */ enum kinds kind; constchar *name;
struct mutex update_lock; bool valid; /* true if following fields are valid */ unsignedlong last_updated; /* In jiffies */
/* Register values */
u8 bank; /* current register bank */
u8 in_num; /* number of in inputs we have */
u8 in[NUM_IN][3]; /* [0]=in, [1]=in_max, [2]=in_min */ const u16 *scale_in; /* internal scaling factors */ unsignedint rpm[NUM_FAN];
u16 fan_min[NUM_FAN];
u8 fan_pulses[NUM_FAN];
u8 fan_div[NUM_FAN];
u8 has_pwm;
u8 has_fan; /* some fan inputs can be disabled */
u8 has_fan_min; /* some fans don't have min register */ bool has_fan_div;
staticinlineint
nct6775_add_attr_group(struct nct6775_data *data, conststruct attribute_group *group)
{ /* Need to leave a NULL terminator at the end of data->groups */ if (data->num_groups == ARRAY_SIZE(data->groups) - 1) return -ENOBUFS;
/* * ALARM_BITS and BEEP_BITS store bit-index for the mask of the registers * loaded into data->alarm and data->beep. * * Every input register (IN/TEMP/FAN) must have a corresponding * ALARM/BEEP bit at the same index BITS[BASE + index] * Set value to -1 to disable the visibility of that '*_alarm' attribute and * to pad the bits until the next BASE * * Beep has an additional GLOBAL_BEEP_ENABLE bit
*/ #define VIN_ALARM_BASE 0 #define FAN_ALARM_BASE 24 #define TEMP_ALARM_BASE 36 #define INTRUSION_ALARM_BASE 48 #define BEEP_ENABLE_BASE 50
/* * Not currently used: * REG_MAN_ID has the value 0x5ca3 for all supported chips. * REG_CHIP_ID == 0x88/0xa1/0xc1 depending on chip model. * REG_MAN_ID is at port 0x4f * REG_CHIP_ID is at port 0x58
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.