| 1 | /* |
|---|
| 2 | sensors.h - Part of lm_sensors, Linux kernel modules for hardware |
|---|
| 3 | monitoring |
|---|
| 4 | Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl> |
|---|
| 5 | |
|---|
| 6 | This program is free software; you can redistribute it and/or modify |
|---|
| 7 | it under the terms of the GNU General Public License as published by |
|---|
| 8 | the Free Software Foundation; either version 2 of the License, or |
|---|
| 9 | (at your option) any later version. |
|---|
| 10 | |
|---|
| 11 | This program is distributed in the hope that it will be useful, |
|---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | GNU General Public License for more details. |
|---|
| 15 | |
|---|
| 16 | You should have received a copy of the GNU General Public License |
|---|
| 17 | along with this program; if not, write to the Free Software |
|---|
| 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|---|
| 19 | */ |
|---|
| 20 | |
|---|
| 21 | /* Important note: */ /* TBD */ |
|---|
| 22 | /* Lines like these, with the 'TBD' remark (To Be Deleted) */ /* TBD */ |
|---|
| 23 | /* WILL BE DELETED when this file is installed. */ /* TBD */ |
|---|
| 24 | /* This allows us to get rid of the ugly LM_SENSORS define */ /* TBD */ |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | #ifndef SENSORS_SENSORS_H |
|---|
| 28 | #define SENSORS_SENSORS_H |
|---|
| 29 | |
|---|
| 30 | #ifdef __KERNEL__ |
|---|
| 31 | |
|---|
| 32 | /* Next two must be included before sysctl.h can be included, in 2.0 kernels */ |
|---|
| 33 | #include <linux/types.h> |
|---|
| 34 | #include <linux/fs.h> |
|---|
| 35 | #include <linux/sysctl.h> |
|---|
| 36 | |
|---|
| 37 | /* The type of callback functions used in sensors_{proc,sysctl}_real */ |
|---|
| 38 | typedef void (*sensors_real_callback) (struct i2c_client *client, |
|---|
| 39 | int operation, int ctl_name, |
|---|
| 40 | int *nrels_mag, long *results); |
|---|
| 41 | |
|---|
| 42 | /* Values for the operation field in the above function type */ |
|---|
| 43 | #define SENSORS_PROC_REAL_INFO 1 |
|---|
| 44 | #define SENSORS_PROC_REAL_READ 2 |
|---|
| 45 | #define SENSORS_PROC_REAL_WRITE 3 |
|---|
| 46 | |
|---|
| 47 | /* These funcion reads or writes a 'real' value (encoded by the combination |
|---|
| 48 | of an integer and a magnitude, the last is the power of ten the value |
|---|
| 49 | should be divided with) to a /proc/sys directory. To use these functions, |
|---|
| 50 | you must (before registering the ctl_table) set the extra2 field to the |
|---|
| 51 | client, and the extra1 field to a function of the form: |
|---|
| 52 | void func(struct i2c_client *client, int operation, int ctl_name, |
|---|
| 53 | int *nrels_mag, long *results) |
|---|
| 54 | This last function can be called for three values of operation. If |
|---|
| 55 | operation equals SENSORS_PROC_REAL_INFO, the magnitude should be returned |
|---|
| 56 | in nrels_mag. If operation equals SENSORS_PROC_REAL_READ, values should |
|---|
| 57 | be read into results. nrels_mag should return the number of elements |
|---|
| 58 | read; the maximum number is put in it on entry. Finally, if operation |
|---|
| 59 | equals SENSORS_PROC_REAL_WRITE, the values in results should be |
|---|
| 60 | written to the chip. nrels_mag contains on entry the number of elements |
|---|
| 61 | found. |
|---|
| 62 | In all cases, client points to the client we wish to interact with, |
|---|
| 63 | and ctl_name is the SYSCTL id of the file we are accessing. */ |
|---|
| 64 | extern int sensors_sysctl_real (ctl_table *table, int *name, int nlen, |
|---|
| 65 | void *oldval, size_t *oldlenp, void *newval, |
|---|
| 66 | size_t newlen, void **context); |
|---|
| 67 | extern int sensors_proc_real(ctl_table *ctl, int write, struct file * filp, |
|---|
| 68 | void *buffer, size_t *lenp); |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | /* These rather complex functions must be called when you want to add or |
|---|
| 73 | delete an entry in /proc/sys/dev/sensors/chips (not yet implemented). It |
|---|
| 74 | also creates a new directory within /proc/sys/dev/sensors/. |
|---|
| 75 | ctl_template should be a template of the newly created directory. It is |
|---|
| 76 | copied in memory. The extra2 field of each file is set to point to client. |
|---|
| 77 | If any driver wants subdirectories within the newly created directory, |
|---|
| 78 | these functions must be updated! */ |
|---|
| 79 | extern int sensors_register_entry(struct i2c_client *client, |
|---|
| 80 | const char *prefix, ctl_table *ctl_template); |
|---|
| 81 | extern void sensors_deregister_entry(int id); |
|---|
| 82 | |
|---|
| 83 | |
|---|
| 84 | /* A structure containing detect information. |
|---|
| 85 | Force variables overrule all other variables; they force a detection on |
|---|
| 86 | that place. If a specific chip is given, the module blindly assumes this |
|---|
| 87 | chip type is present; if a general force (kind == 0) is given, the module |
|---|
| 88 | will still try to figure out what type of chip is present. This is useful |
|---|
| 89 | if for some reasons the detect for SMBus or ISA address space filled |
|---|
| 90 | fails. |
|---|
| 91 | probe: insmod parameter. Initialize this list with SENSORS_I2C_END values. |
|---|
| 92 | A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for |
|---|
| 93 | the ISA bus, -1 for any I2C bus), the second is the address. |
|---|
| 94 | kind: The kind of chip. 0 equals any chip. |
|---|
| 95 | */ |
|---|
| 96 | struct sensors_force_data { |
|---|
| 97 | unsigned short *force; |
|---|
| 98 | unsigned short kind; |
|---|
| 99 | }; |
|---|
| 100 | |
|---|
| 101 | /* A structure containing the detect information. |
|---|
| 102 | normal_i2c: filled in by the module writer. Terminated by SENSORS_I2C_END. |
|---|
| 103 | A list of I2C addresses which should normally be examined. |
|---|
| 104 | normal_i2c_range: filled in by the module writer. Terminated by |
|---|
| 105 | SENSORS_I2C_END |
|---|
| 106 | A list of pairs of I2C addresses, each pair being an inclusive range of |
|---|
| 107 | addresses which should normally be examined. |
|---|
| 108 | normal_isa: filled in by the module writer. Terminated by SENSORS_ISA_END. |
|---|
| 109 | A list of ISA addresses which should normally be examined. |
|---|
| 110 | normal_isa_range: filled in by the module writer. Terminated by |
|---|
| 111 | SENSORS_ISA_END |
|---|
| 112 | A list of triples. The first two elements are ISA addresses, being an |
|---|
| 113 | range of addresses which should normally be examined. The third is the |
|---|
| 114 | modulo parameter: only addresses which are 0 module this value relative |
|---|
| 115 | to the first address of the range are actually considered. |
|---|
| 116 | probe: insmod parameter. Initialize this list with SENSORS_I2C_END values. |
|---|
| 117 | A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for |
|---|
| 118 | the ISA bus, -1 for any I2C bus), the second is the address. These |
|---|
| 119 | addresses are also probed, as if they were in the 'normal' list. |
|---|
| 120 | probe_range: insmod parameter. Initialize this list with SENSORS_I2C_END |
|---|
| 121 | values. |
|---|
| 122 | A list of triples. The first value is a bus number (SENSORS_ISA_BUS for |
|---|
| 123 | the ISA bus, -1 for any I2C bus), the second and third are addresses. |
|---|
| 124 | These form an inclusive range of addresses that are also probed, as |
|---|
| 125 | if they were in the 'normal' list. |
|---|
| 126 | ignore: insmod parameter. Initialize this list with SENSORS_I2C_END values. |
|---|
| 127 | A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for |
|---|
| 128 | the ISA bus, -1 for any I2C bus), the second is the I2C address. These |
|---|
| 129 | addresses are never probed. This parameter overrules 'normal' and |
|---|
| 130 | 'probe', but not the 'force' lists. |
|---|
| 131 | ignore_range: insmod parameter. Initialize this list with SENSORS_I2C_END |
|---|
| 132 | values. |
|---|
| 133 | A list of triples. The first value is a bus number (SENSORS_ISA_BUS for |
|---|
| 134 | the ISA bus, -1 for any I2C bus), the second and third are addresses. |
|---|
| 135 | These form an inclusive range of I2C addresses that are never probed. |
|---|
| 136 | This parameter overrules 'normal' and 'probe', but not the 'force' lists. |
|---|
| 137 | force_data: insmod parameters. A list, ending with an element of which |
|---|
| 138 | the force field is NULL. |
|---|
| 139 | */ |
|---|
| 140 | struct sensors_address_data { |
|---|
| 141 | unsigned short *normal_i2c; |
|---|
| 142 | unsigned short *normal_i2c_range; |
|---|
| 143 | unsigned int *normal_isa; |
|---|
| 144 | unsigned int *normal_isa_range; |
|---|
| 145 | unsigned short *probe; |
|---|
| 146 | unsigned short *probe_range; |
|---|
| 147 | unsigned short *ignore; |
|---|
| 148 | unsigned short *ignore_range; |
|---|
| 149 | struct sensors_force_data *forces; |
|---|
| 150 | }; |
|---|
| 151 | |
|---|
| 152 | /* Internal numbers to terminate lists */ |
|---|
| 153 | #define SENSORS_I2C_END 0xfffe |
|---|
| 154 | #define SENSORS_ISA_END 0xfffefffe |
|---|
| 155 | |
|---|
| 156 | /* The numbers to use to set an ISA or I2C bus address */ |
|---|
| 157 | #define SENSORS_ISA_BUS 9191 |
|---|
| 158 | #define SENSORS_ANY_I2C_BUS 0xffff |
|---|
| 159 | |
|---|
| 160 | /* The length of the option lists */ |
|---|
| 161 | #define SENSORS_MAX_OPTS 48 |
|---|
| 162 | |
|---|
| 163 | /* Default fill of many variables */ |
|---|
| 164 | #define SENSORS_DEFAULTS {SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 165 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 166 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 167 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 168 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 169 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 170 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 171 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 172 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 173 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 174 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 175 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 176 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 177 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 178 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \ |
|---|
| 179 | SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END} |
|---|
| 180 | |
|---|
| 181 | /* This is ugly. We need to evaluate SENSORS_MAX_OPTS before it is |
|---|
| 182 | stringified */ |
|---|
| 183 | #define SENSORS_MODPARM_AUX1(x) "1-" #x "h" |
|---|
| 184 | #define SENSORS_MODPARM_AUX(x) SENSORS_MODPARM_AUX1(x) |
|---|
| 185 | #define SENSORS_MODPARM SENSORS_MODPARM_AUX(SENSORS_MAX_OPTS) |
|---|
| 186 | |
|---|
| 187 | /* SENSORS_MODULE_PARM creates a module parameter, and puts it in the |
|---|
| 188 | module header */ |
|---|
| 189 | #define SENSORS_MODULE_PARM(var,desc) \ |
|---|
| 190 | static unsigned short var[SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \ |
|---|
| 191 | MODULE_PARM(var,SENSORS_MODPARM); \ |
|---|
| 192 | MODULE_PARM_DESC(var,desc) |
|---|
| 193 | |
|---|
| 194 | /* SENSORS_MODULE_PARM creates a 'force_*' module parameter, and puts it in |
|---|
| 195 | the module header */ |
|---|
| 196 | #define SENSORS_MODULE_PARM_FORCE(name) \ |
|---|
| 197 | SENSORS_MODULE_PARM(force_ ## name, \ |
|---|
| 198 | "List of adapter,address pairs which are unquestionably" \ |
|---|
| 199 | " assumed to contain a `" # name "' chip") |
|---|
| 200 | |
|---|
| 201 | |
|---|
| 202 | /* This defines several insmod variables, and the addr_data structure */ |
|---|
| 203 | #define SENSORS_INSMOD \ |
|---|
| 204 | SENSORS_MODULE_PARM(probe, \ |
|---|
| 205 | "List of adapter,address pairs to scan additionally"); \ |
|---|
| 206 | SENSORS_MODULE_PARM(probe_range, \ |
|---|
| 207 | "List of adapter,start-addr,end-addr triples to scan " \ |
|---|
| 208 | "additionally"); \ |
|---|
| 209 | SENSORS_MODULE_PARM(ignore, \ |
|---|
| 210 | "List of adapter,address pairs not to scan"); \ |
|---|
| 211 | SENSORS_MODULE_PARM(ignore_range, \ |
|---|
| 212 | "List of adapter,start-addr,end-addr triples not to " \ |
|---|
| 213 | "scan"); \ |
|---|
| 214 | static struct sensors_address_data addr_data = \ |
|---|
| 215 | {normal_i2c, normal_i2c_range, \ |
|---|
| 216 | normal_isa, normal_isa_range, \ |
|---|
| 217 | probe, probe_range, \ |
|---|
| 218 | ignore, ignore_range, \ |
|---|
| 219 | forces} |
|---|
| 220 | |
|---|
| 221 | /* The following functions create an enum with the chip names as elements. |
|---|
| 222 | The first element of the enum is any_chip. These are the only macros |
|---|
| 223 | a module will want to use. */ |
|---|
| 224 | |
|---|
| 225 | #define SENSORS_INSMOD_0 \ |
|---|
| 226 | enum chips { any_chip }; \ |
|---|
| 227 | SENSORS_MODULE_PARM(force, \ |
|---|
| 228 | "List of adapter,address pairs to boldly assume " \ |
|---|
| 229 | "to be present"); \ |
|---|
| 230 | static struct sensors_force_data forces[] = {{force,any_chip},{NULL}}; \ |
|---|
| 231 | SENSORS_INSMOD |
|---|
| 232 | |
|---|
| 233 | #define SENSORS_INSMOD_1(chip1) \ |
|---|
| 234 | enum chips { any_chip, chip1 }; \ |
|---|
| 235 | SENSORS_MODULE_PARM(force, \ |
|---|
| 236 | "List of adapter,address pairs to boldly assume " \ |
|---|
| 237 | "to be present"); \ |
|---|
| 238 | SENSORS_MODULE_PARM_FORCE(chip1); \ |
|---|
| 239 | static struct sensors_force_data forces[] = {{force,any_chip},\ |
|---|
| 240 | {force_ ## chip1,chip1}, \ |
|---|
| 241 | {NULL}}; \ |
|---|
| 242 | SENSORS_INSMOD |
|---|
| 243 | |
|---|
| 244 | #define SENSORS_INSMOD_2(chip1,chip2) \ |
|---|
| 245 | enum chips { any_chip, chip1, chip2 }; \ |
|---|
| 246 | SENSORS_MODULE_PARM(force, \ |
|---|
| 247 | "List of adapter,address pairs to boldly assume " \ |
|---|
| 248 | "to be present"); \ |
|---|
| 249 | SENSORS_MODULE_PARM_FORCE(chip1); \ |
|---|
| 250 | SENSORS_MODULE_PARM_FORCE(chip2); \ |
|---|
| 251 | static struct sensors_force_data forces[] = {{force,any_chip}, \ |
|---|
| 252 | {force_ ## chip1,chip1}, \ |
|---|
| 253 | {force_ ## chip2,chip2}, \ |
|---|
| 254 | {NULL}}; \ |
|---|
| 255 | SENSORS_INSMOD |
|---|
| 256 | |
|---|
| 257 | #define SENSORS_INSMOD_3(chip1,chip2,chip3) \ |
|---|
| 258 | enum chips { any_chip, chip1, chip2, chip3 }; \ |
|---|
| 259 | SENSORS_MODULE_PARM(force, \ |
|---|
| 260 | "List of adapter,address pairs to boldly assume " \ |
|---|
| 261 | "to be present"); \ |
|---|
| 262 | SENSORS_MODULE_PARM_FORCE(chip1); \ |
|---|
| 263 | SENSORS_MODULE_PARM_FORCE(chip2); \ |
|---|
| 264 | SENSORS_MODULE_PARM_FORCE(chip3); \ |
|---|
| 265 | static struct sensors_force_data forces[] = {{force,any_chip}, \ |
|---|
| 266 | {force_ ## chip1,chip1}, \ |
|---|
| 267 | {force_ ## chip2,chip2}, \ |
|---|
| 268 | {force_ ## chip3,chip3}, \ |
|---|
| 269 | {NULL}}; \ |
|---|
| 270 | SENSORS_INSMOD |
|---|
| 271 | |
|---|
| 272 | typedef int sensors_found_addr_proc (struct i2c_adapter *adapter, |
|---|
| 273 | int addr, int kind); |
|---|
| 274 | |
|---|
| 275 | /* Detect function. It itterates over all possible addresses itself. For |
|---|
| 276 | SMBus addresses, it will only call found_proc if some client is connected |
|---|
| 277 | to the SMBus (unless a 'force' matched); for ISA detections, this is not |
|---|
| 278 | done. */ |
|---|
| 279 | extern int sensors_detect(struct i2c_adapter *adapter, |
|---|
| 280 | struct sensors_address_data *address_data, |
|---|
| 281 | sensors_found_addr_proc *found_proc); |
|---|
| 282 | |
|---|
| 283 | #endif /* def __KERNEL__ */ |
|---|
| 284 | |
|---|
| 285 | |
|---|
| 286 | /* The maximum length of the prefix */ |
|---|
| 287 | #define SENSORS_PREFIX_MAX 20 |
|---|
| 288 | |
|---|
| 289 | /* Driver IDs */ |
|---|
| 290 | #define I2C_DRIVERID_I2CDEV 1000 |
|---|
| 291 | #define I2C_DRIVERID_I2CPROC 1001 |
|---|
| 292 | #define I2C_DRIVERID_LM78 1002 |
|---|
| 293 | #define I2C_DRIVERID_LM75 1003 |
|---|
| 294 | #define I2C_DRIVERID_GL518 1004 |
|---|
| 295 | #define I2C_DRIVERID_EEPROM 1005 |
|---|
| 296 | #define I2C_DRIVERID_W83781D 1006 |
|---|
| 297 | #define I2C_DRIVERID_LM80 1007 |
|---|
| 298 | #define I2C_DRIVERID_ADM1021 1008 |
|---|
| 299 | #define I2C_DRIVERID_ADM9240 1009 |
|---|
| 300 | #define I2C_DRIVERID_LTC1710 1010 |
|---|
| 301 | #define I2C_DRIVERID_SIS5595 1011 |
|---|
| 302 | #define I2C_DRIVERID_ICSPLL 1012 |
|---|
| 303 | #define I2C_DRIVERID_MAXILIFE 1012 |
|---|
| 304 | |
|---|
| 305 | /* Sysctl IDs */ |
|---|
| 306 | #ifdef DEV_HWMON |
|---|
| 307 | #define DEV_SENSORS DEV_HWMON |
|---|
| 308 | #else /* ndef DEV_HWMOM */ |
|---|
| 309 | #define DEV_SENSORS 2 /* The id of the lm_sensors directory within the |
|---|
| 310 | dev table */ |
|---|
| 311 | #endif /* def DEV_HWMON */ |
|---|
| 312 | |
|---|
| 313 | #define SENSORS_CHIPS 1 |
|---|
| 314 | struct sensors_chips_data { |
|---|
| 315 | int sysctl_id; |
|---|
| 316 | char name[SENSORS_PREFIX_MAX + 13]; |
|---|
| 317 | }; |
|---|
| 318 | |
|---|
| 319 | #define LM78_SYSCTL_IN0 1000 /* Volts * 100 */ |
|---|
| 320 | #define LM78_SYSCTL_IN1 1001 |
|---|
| 321 | #define LM78_SYSCTL_IN2 1002 |
|---|
| 322 | #define LM78_SYSCTL_IN3 1003 |
|---|
| 323 | #define LM78_SYSCTL_IN4 1004 |
|---|
| 324 | #define LM78_SYSCTL_IN5 1005 |
|---|
| 325 | #define LM78_SYSCTL_IN6 1006 |
|---|
| 326 | #define LM78_SYSCTL_FAN1 1101 /* Rotations/min */ |
|---|
| 327 | #define LM78_SYSCTL_FAN2 1102 |
|---|
| 328 | #define LM78_SYSCTL_FAN3 1103 |
|---|
| 329 | #define LM78_SYSCTL_TEMP 1200 /* Degrees Celcius * 10 */ |
|---|
| 330 | #define LM78_SYSCTL_VID 1300 /* Volts * 100 */ |
|---|
| 331 | #define LM78_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ |
|---|
| 332 | #define LM78_SYSCTL_ALARMS 2001 /* bitvector */ |
|---|
| 333 | |
|---|
| 334 | #define LM78_ALARM_IN0 0x0001 |
|---|
| 335 | #define LM78_ALARM_IN1 0x0002 |
|---|
| 336 | #define LM78_ALARM_IN2 0x0004 |
|---|
| 337 | #define LM78_ALARM_IN3 0x0008 |
|---|
| 338 | #define LM78_ALARM_IN4 0x0100 |
|---|
| 339 | #define LM78_ALARM_IN5 0x0200 |
|---|
| 340 | #define LM78_ALARM_IN6 0x0400 |
|---|
| 341 | #define LM78_ALARM_FAN1 0x0040 |
|---|
| 342 | #define LM78_ALARM_FAN2 0x0080 |
|---|
| 343 | #define LM78_ALARM_FAN3 0x0800 |
|---|
| 344 | #define LM78_ALARM_TEMP 0x0010 |
|---|
| 345 | #define LM78_ALARM_BTI 0x0020 |
|---|
| 346 | #define LM78_ALARM_CHAS 0x1000 |
|---|
| 347 | #define LM78_ALARM_FIFO 0x2000 |
|---|
| 348 | #define LM78_ALARM_SMI_IN 0x4000 |
|---|
| 349 | |
|---|
| 350 | #define W83781D_SYSCTL_IN0 1000 /* Volts * 100 */ |
|---|
| 351 | #define W83781D_SYSCTL_IN1 1001 |
|---|
| 352 | #define W83781D_SYSCTL_IN2 1002 |
|---|
| 353 | #define W83781D_SYSCTL_IN3 1003 |
|---|
| 354 | #define W83781D_SYSCTL_IN4 1004 |
|---|
| 355 | #define W83781D_SYSCTL_IN5 1005 |
|---|
| 356 | #define W83781D_SYSCTL_IN6 1006 |
|---|
| 357 | #define W83781D_SYSCTL_IN7 1007 |
|---|
| 358 | #define W83781D_SYSCTL_IN8 1008 |
|---|
| 359 | #define W83781D_SYSCTL_FAN1 1101 /* Rotations/min */ |
|---|
| 360 | #define W83781D_SYSCTL_FAN2 1102 |
|---|
| 361 | #define W83781D_SYSCTL_FAN3 1103 |
|---|
| 362 | #define W83781D_SYSCTL_TEMP1 1200 /* Degrees Celcius * 10 */ |
|---|
| 363 | #define W83781D_SYSCTL_TEMP2 1201 /* Degrees Celcius * 10 */ |
|---|
| 364 | #define W83781D_SYSCTL_TEMP3 1202 /* Degrees Celcius * 10 */ |
|---|
| 365 | #define W83781D_SYSCTL_VID 1300 /* Volts * 100 */ |
|---|
| 366 | #define W83781D_SYSCTL_PWM1 1401 |
|---|
| 367 | #define W83781D_SYSCTL_PWM2 1402 |
|---|
| 368 | #define W83781D_SYSCTL_PWM3 1403 |
|---|
| 369 | #define W83781D_SYSCTL_PWM4 1404 |
|---|
| 370 | #define W83781D_SYSCTL_SENS1 1501 /* 1, 2, or Beta (3000-5000) */ |
|---|
| 371 | #define W83781D_SYSCTL_SENS2 1502 |
|---|
| 372 | #define W83781D_SYSCTL_SENS3 1503 |
|---|
| 373 | #define W83781D_SYSCTL_RT1 1601 /* 32-entry table */ |
|---|
| 374 | #define W83781D_SYSCTL_RT2 1602 /* 32-entry table */ |
|---|
| 375 | #define W83781D_SYSCTL_RT3 1603 /* 32-entry table */ |
|---|
| 376 | #define W83781D_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ |
|---|
| 377 | #define W83781D_SYSCTL_ALARMS 2001 /* bitvector */ |
|---|
| 378 | #define W83781D_SYSCTL_BEEP 2002 /* bitvector */ |
|---|
| 379 | |
|---|
| 380 | #define W83781D_ALARM_IN0 0x0001 |
|---|
| 381 | #define W83781D_ALARM_IN1 0x0002 |
|---|
| 382 | #define W83781D_ALARM_IN2 0x0004 |
|---|
| 383 | #define W83781D_ALARM_IN3 0x0008 |
|---|
| 384 | #define W83781D_ALARM_IN4 0x0100 |
|---|
| 385 | #define W83781D_ALARM_IN5 0x0200 |
|---|
| 386 | #define W83781D_ALARM_IN6 0x0400 |
|---|
| 387 | #define W83782D_ALARM_IN7 0x10000 |
|---|
| 388 | #define W83782D_ALARM_IN8 0x20000 |
|---|
| 389 | #define W83781D_ALARM_FAN1 0x0040 |
|---|
| 390 | #define W83781D_ALARM_FAN2 0x0080 |
|---|
| 391 | #define W83781D_ALARM_FAN3 0x0800 |
|---|
| 392 | #define W83781D_ALARM_TEMP1 0x0010 |
|---|
| 393 | #define W83781D_ALARM_TEMP23 0x0020 |
|---|
| 394 | #define W83781D_ALARM_CHAS 0x1000 |
|---|
| 395 | |
|---|
| 396 | #define LM75_SYSCTL_TEMP 1200 /* Degrees Celcius * 10 */ |
|---|
| 397 | |
|---|
| 398 | #define ADM1021_SYSCTL_TEMP 1200 |
|---|
| 399 | #define ADM1021_SYSCTL_REMOTE_TEMP 1201 |
|---|
| 400 | #define ADM1021_SYSCTL_DIE_CODE 1202 |
|---|
| 401 | #define ADM1021_SYSCTL_STATUS 1203 |
|---|
| 402 | |
|---|
| 403 | #define GL518_SYSCTL_VDD 1000 /* Volts * 100 */ |
|---|
| 404 | #define GL518_SYSCTL_VIN1 1001 |
|---|
| 405 | #define GL518_SYSCTL_VIN2 1002 |
|---|
| 406 | #define GL518_SYSCTL_VIN3 1003 |
|---|
| 407 | #define GL518_SYSCTL_FAN1 1101 /* RPM */ |
|---|
| 408 | #define GL518_SYSCTL_FAN2 1102 |
|---|
| 409 | #define GL518_SYSCTL_TEMP 1200 /* Degrees Celcius * 10 */ |
|---|
| 410 | #define GL518_SYSCTL_VID 1300 |
|---|
| 411 | #define GL518_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ |
|---|
| 412 | #define GL518_SYSCTL_ALARMS 2001 /* bitvector */ |
|---|
| 413 | #define GL518_SYSCTL_BEEP 2002 /* bitvector */ |
|---|
| 414 | |
|---|
| 415 | #define GL518_ALARM_VDD 0x01 |
|---|
| 416 | #define GL518_ALARM_VIN1 0x02 |
|---|
| 417 | #define GL518_ALARM_VIN2 0x04 |
|---|
| 418 | #define GL518_ALARM_VIN3 0x08 |
|---|
| 419 | #define GL518_ALARM_TEMP 0x10 |
|---|
| 420 | #define GL518_ALARM_FAN1 0x20 |
|---|
| 421 | #define GL518_ALARM_FAN2 0x40 |
|---|
| 422 | |
|---|
| 423 | #define EEPROM_SYSCTL1 1000 |
|---|
| 424 | #define EEPROM_SYSCTL2 1001 |
|---|
| 425 | #define EEPROM_SYSCTL3 1002 |
|---|
| 426 | #define EEPROM_SYSCTL4 1003 |
|---|
| 427 | #define EEPROM_SYSCTL5 1004 |
|---|
| 428 | #define EEPROM_SYSCTL6 1005 |
|---|
| 429 | #define EEPROM_SYSCTL7 1006 |
|---|
| 430 | #define EEPROM_SYSCTL8 1007 |
|---|
| 431 | |
|---|
| 432 | #define LM80_SYSCTL_IN0 1000 /* Volts * 100 */ |
|---|
| 433 | #define LM80_SYSCTL_IN1 1001 |
|---|
| 434 | #define LM80_SYSCTL_IN2 1002 |
|---|
| 435 | #define LM80_SYSCTL_IN3 1003 |
|---|
| 436 | #define LM80_SYSCTL_IN4 1004 |
|---|
| 437 | #define LM80_SYSCTL_IN5 1005 |
|---|
| 438 | #define LM80_SYSCTL_IN6 1006 |
|---|
| 439 | #define LM80_SYSCTL_FAN1 1101 /* Rotations/min */ |
|---|
| 440 | #define LM80_SYSCTL_FAN2 1102 |
|---|
| 441 | #define LM80_SYSCTL_TEMP 1250 /* Degrees Celcius * 100 */ |
|---|
| 442 | #define LM80_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ |
|---|
| 443 | #define LM80_SYSCTL_ALARMS 2001 /* bitvector */ |
|---|
| 444 | |
|---|
| 445 | #define ADM9240_SYSCTL_IN0 1000 /* Volts * 100 */ |
|---|
| 446 | #define ADM9240_SYSCTL_IN1 1001 |
|---|
| 447 | #define ADM9240_SYSCTL_IN2 1002 |
|---|
| 448 | #define ADM9240_SYSCTL_IN3 1003 |
|---|
| 449 | #define ADM9240_SYSCTL_IN4 1004 |
|---|
| 450 | #define ADM9240_SYSCTL_IN5 1005 |
|---|
| 451 | #define ADM9240_SYSCTL_FAN1 1101 /* Rotations/min */ |
|---|
| 452 | #define ADM9240_SYSCTL_FAN2 1102 |
|---|
| 453 | #define ADM9240_SYSCTL_TEMP 1250 /* Degrees Celcius * 100 */ |
|---|
| 454 | #define ADM9240_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ |
|---|
| 455 | #define ADM9240_SYSCTL_ALARMS 2001 /* bitvector */ |
|---|
| 456 | #define ADM9240_SYSCTL_ANALOG_OUT 2002 |
|---|
| 457 | #define ADM9240_SYSCTL_VID 2003 |
|---|
| 458 | |
|---|
| 459 | #define LTC1710_SYSCTL_SWITCH_1 1000 |
|---|
| 460 | #define LTC1710_SYSCTL_SWITCH_2 1001 |
|---|
| 461 | |
|---|
| 462 | #define LM80_ALARM_IN0 0x0001 |
|---|
| 463 | #define LM80_ALARM_IN1 0x0002 |
|---|
| 464 | #define LM80_ALARM_IN2 0x0004 |
|---|
| 465 | #define LM80_ALARM_IN3 0x0008 |
|---|
| 466 | #define LM80_ALARM_IN4 0x0010 |
|---|
| 467 | #define LM80_ALARM_IN5 0x0020 |
|---|
| 468 | #define LM80_ALARM_IN6 0x0040 |
|---|
| 469 | #define LM80_ALARM_FAN1 0x0400 |
|---|
| 470 | #define LM80_ALARM_FAN2 0x0800 |
|---|
| 471 | #define LM80_ALARM_TEMP_HOT 0x0100 |
|---|
| 472 | #define LM80_ALARM_TEMP_OS 0x2000 |
|---|
| 473 | #define LM80_ALARM_CHAS 0x1000 |
|---|
| 474 | #define LM80_ALARM_BTI 0x0200 |
|---|
| 475 | #define LM80_ALARM_INT_IN 0x0080 |
|---|
| 476 | |
|---|
| 477 | #define MAXI_SYSCTL_FAN1 1101 /* Rotations/min */ |
|---|
| 478 | #define MAXI_SYSCTL_FAN2 1102 /* Rotations/min */ |
|---|
| 479 | #define MAXI_SYSCTL_FAN3 1103 /* Rotations/min */ |
|---|
| 480 | #define MAXI_SYSCTL_TEMP1 1201 /* Degrees Celcius */ |
|---|
| 481 | #define MAXI_SYSCTL_TEMP2 1202 /* Degrees Celcius */ |
|---|
| 482 | #define MAXI_SYSCTL_TEMP3 1203 /* Degrees Celcius */ |
|---|
| 483 | #define MAXI_SYSCTL_TEMP4 1204 /* Degrees Celcius */ |
|---|
| 484 | #define MAXI_SYSCTL_TEMP5 1205 /* Degrees Celcius */ |
|---|
| 485 | #define MAXI_SYSCTL_PLL 1301 /* MHz */ |
|---|
| 486 | #define MAXI_SYSCTL_VID1 1401 /* Volts / 6.337 */ |
|---|
| 487 | #define MAXI_SYSCTL_VID2 1402 /* Volts */ |
|---|
| 488 | #define MAXI_SYSCTL_VID3 1403 /* Volts */ |
|---|
| 489 | #define MAXI_SYSCTL_VID4 1404 /* Volts */ |
|---|
| 490 | #define MAXI_SYSCTL_ALARMS 2001 /* Bitvector (see below) */ |
|---|
| 491 | |
|---|
| 492 | #define MAXI_ALARM_VID4 0x0001 |
|---|
| 493 | #define MAXI_ALARM_TEMP2 0x0002 |
|---|
| 494 | #define MAXI_ALARM_VID1 0x0004 |
|---|
| 495 | #define MAXI_ALARM_VID2 0x0008 |
|---|
| 496 | #define MAXI_ALARM_VID3 0x0010 |
|---|
| 497 | #define MAXI_ALARM_PLL 0x0080 |
|---|
| 498 | #define MAXI_ALARM_TEMP4 0x0100 |
|---|
| 499 | #define MAXI_ALARM_TEMP5 0x0200 |
|---|
| 500 | #define MAXI_ALARM_FAN1 0x1000 |
|---|
| 501 | #define MAXI_ALARM_FAN2 0x2000 |
|---|
| 502 | #define MAXI_ALARM_FAN3 0x4000 |
|---|
| 503 | |
|---|
| 504 | |
|---|
| 505 | #define ICSPLL_SYSCTL1 1000 |
|---|
| 506 | #endif /* def SENSORS_SENSORS_H */ |
|---|