Lines Matching defs:nct6775_data

21 struct nct6775_data {  struct
22 int addr; /* IO base of hw monitor block */
23 int sioreg; /* SIO register address */
24 enum kinds kind;
25 const char *name;
27 const struct attribute_group *groups[7];
28 u8 num_groups;
30 u16 reg_temp[5][NUM_TEMP]; /* 0=temp, 1=temp_over, 2=temp_hyst,
33 u8 temp_src[NUM_TEMP];
34 u16 reg_temp_config[NUM_TEMP];
35 const char * const *temp_label;
36 u32 temp_mask;
37 u32 virt_temp_mask;
39 u16 REG_CONFIG;
40 u16 REG_VBAT;
41 u16 REG_DIODE;
42 u8 DIODE_MASK;
44 const s8 *ALARM_BITS;
45 const s8 *BEEP_BITS;
47 const u16 *REG_VIN;
48 const u16 *REG_IN_MINMAX[2];
50 const u16 *REG_TARGET;
51 const u16 *REG_FAN;
52 const u16 *REG_FAN_MODE;
53 const u16 *REG_FAN_MIN;
54 const u16 *REG_FAN_PULSES;
55 const u16 *FAN_PULSE_SHIFT;
56 const u16 *REG_FAN_TIME[3];
58 const u16 *REG_TOLERANCE_H;
60 const u8 *REG_PWM_MODE;
61 const u8 *PWM_MODE_MASK;
63 const u16 *REG_PWM[7]; /* [0]=pwm, [1]=pwm_start, [2]=pwm_floor,
67 const u16 *REG_PWM_READ;
69 const u16 *REG_CRITICAL_PWM_ENABLE;
70 u8 CRITICAL_PWM_ENABLE_MASK;
71 const u16 *REG_CRITICAL_PWM;
73 const u16 *REG_AUTO_TEMP;
74 const u16 *REG_AUTO_PWM;
76 const u16 *REG_CRITICAL_TEMP;
77 const u16 *REG_CRITICAL_TEMP_TOLERANCE;
79 const u16 *REG_TEMP_SOURCE; /* temp register sources */
80 const u16 *REG_TEMP_SEL;
81 const u16 *REG_WEIGHT_TEMP_SEL;
82 const u16 *REG_WEIGHT_TEMP[3]; /* 0=base, 1=tolerance, 2=step */
84 const u16 *REG_TEMP_OFFSET;
86 const u16 *REG_ALARM;
87 const u16 *REG_BEEP;
89 const u16 *REG_TSI_TEMP;
91 unsigned int (*fan_from_reg)(u16 reg, unsigned int divreg);
92 unsigned int (*fan_from_reg_min)(u16 reg, unsigned int divreg);
94 struct mutex update_lock;
95 bool valid; /* true if following fields are valid */
96 unsigned long last_updated; /* In jiffies */
99 u8 bank; /* current register bank */
100 u8 in_num; /* number of in inputs we have */
101 u8 in[NUM_IN][3]; /* [0]=in, [1]=in_max, [2]=in_min */
102 const u16 *scale_in; /* internal scaling factors */
103 unsigned int rpm[NUM_FAN];
104 u16 fan_min[NUM_FAN];
105 u8 fan_pulses[NUM_FAN];
106 u8 fan_div[NUM_FAN];
107 u8 has_pwm;
108 u8 has_fan; /* some fan inputs can be disabled */
109 u8 has_fan_min; /* some fans don't have min register */
110 bool has_fan_div;
112 u8 num_temp_alarms; /* 2, 3, or 6 */
113 u8 num_temp_beeps; /* 2, 3, or 6 */
114 u8 temp_fixed_num; /* 3 or 6 */
115 u8 temp_type[NUM_TEMP_FIXED];
116 s8 temp_offset[NUM_TEMP_FIXED];
117 s16 temp[5][NUM_TEMP]; /* 0=temp, 1=temp_over, 2=temp_hyst,
120 s16 tsi_temp[NUM_TSI_TEMP];
121 u64 alarms;
122 u64 beeps;
124 u8 pwm_num; /* number of pwm */
125 u8 pwm_mode[NUM_FAN]; /* 0->DC variable voltage,
128 enum pwm_enable pwm_enable[NUM_FAN];
136 u8 pwm[7][NUM_FAN]; /* [0]=pwm, [1]=pwm_start, [2]=pwm_floor,
141 u8 target_temp[NUM_FAN];
142 u8 target_temp_mask;
143 u32 target_speed[NUM_FAN];
144 u32 target_speed_tolerance[NUM_FAN];
145 u8 speed_tolerance_limit;
147 u8 temp_tolerance[2][NUM_FAN];
148 u8 tolerance_mask;
150 u8 fan_time[3][NUM_FAN]; /* 0 = stop_time, 1 = step_up, 2 = step_down */
153 int auto_pwm_num;
154 u8 auto_pwm[NUM_FAN][7];
155 u8 auto_temp[NUM_FAN][7];
156 u8 pwm_temp_sel[NUM_FAN];
157 u8 pwm_weight_temp_sel[NUM_FAN];
158 u8 weight_temp[3][NUM_FAN]; /* 0->temp_step, 1->temp_step_tol,
182 int (*driver_init)(struct nct6775_data *data); argument
186 static inline int nct6775_read_value(struct nct6775_data *data, u16 reg, u16 *value) in nct6775_read_value() argument