root/lm-sensors/trunk/kernel/include/sensors.h @ 742

Revision 742, 27.2 KB (checked in by mds, 13 years ago)

(mds) Add via686a integrated sensors support. Untested.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
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#ifndef SENSORS_SENSORS_H
22#define SENSORS_SENSORS_H
23
24#ifdef __KERNEL__
25
26/* Next two must be included before sysctl.h can be included, in 2.0 kernels */
27#include <linux/types.h>
28#include <linux/fs.h>
29#include <linux/sysctl.h>
30
31/* The type of callback functions used in sensors_{proc,sysctl}_real */
32typedef void (*sensors_real_callback) (struct i2c_client * client,
33                                       int operation, int ctl_name,
34                                       int *nrels_mag, long *results);
35
36/* Values for the operation field in the above function type */
37#define SENSORS_PROC_REAL_INFO 1
38#define SENSORS_PROC_REAL_READ 2
39#define SENSORS_PROC_REAL_WRITE 3
40
41/* These funcion reads or writes a 'real' value (encoded by the combination
42   of an integer and a magnitude, the last is the power of ten the value
43   should be divided with) to a /proc/sys directory. To use these functions,
44   you must (before registering the ctl_table) set the extra2 field to the
45   client, and the extra1 field to a function of the form:
46      void func(struct i2c_client *client, int operation, int ctl_name,
47                int *nrels_mag, long *results)
48   This last function can be called for three values of operation. If
49   operation equals SENSORS_PROC_REAL_INFO, the magnitude should be returned
50   in nrels_mag. If operation equals SENSORS_PROC_REAL_READ, values should
51   be read into results. nrels_mag should return the number of elements
52   read; the maximum number is put in it on entry. Finally, if operation
53   equals SENSORS_PROC_REAL_WRITE, the values in results should be
54   written to the chip. nrels_mag contains on entry the number of elements
55   found.
56   In all cases, client points to the client we wish to interact with,
57   and ctl_name is the SYSCTL id of the file we are accessing. */
58extern int sensors_sysctl_real(ctl_table * table, int *name, int nlen,
59                               void *oldval, size_t * oldlenp,
60                               void *newval, size_t newlen,
61                               void **context);
62extern int sensors_proc_real(ctl_table * ctl, int write, struct file *filp,
63                             void *buffer, size_t * lenp);
64
65
66
67/* These rather complex functions must be called when you want to add or
68   delete an entry in /proc/sys/dev/sensors/chips (not yet implemented). It
69   also creates a new directory within /proc/sys/dev/sensors/.
70   ctl_template should be a template of the newly created directory. It is
71   copied in memory. The extra2 field of each file is set to point to client.
72   If any driver wants subdirectories within the newly created directory,
73   these functions must be updated! */
74extern int sensors_register_entry(struct i2c_client *client,
75                                  const char *prefix,
76                                  ctl_table * ctl_template,
77                                  struct module *controlling_mod);
78
79extern void sensors_deregister_entry(int id);
80
81
82/* A structure containing detect information.
83   Force variables overrule all other variables; they force a detection on
84   that place. If a specific chip is given, the module blindly assumes this
85   chip type is present; if a general force (kind == 0) is given, the module
86   will still try to figure out what type of chip is present. This is useful
87   if for some reasons the detect for SMBus or ISA address space filled
88   fails.
89   probe: insmod parameter. Initialize this list with SENSORS_I2C_END values.
90     A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
91     the ISA bus, -1 for any I2C bus), the second is the address.
92   kind: The kind of chip. 0 equals any chip.
93*/
94struct sensors_force_data {
95        unsigned short *force;
96        unsigned short kind;
97};
98
99/* A structure containing the detect information.
100   normal_i2c: filled in by the module writer. Terminated by SENSORS_I2C_END.
101     A list of I2C addresses which should normally be examined.
102   normal_i2c_range: filled in by the module writer. Terminated by
103     SENSORS_I2C_END
104     A list of pairs of I2C addresses, each pair being an inclusive range of
105     addresses which should normally be examined.
106   normal_isa: filled in by the module writer. Terminated by SENSORS_ISA_END.
107     A list of ISA addresses which should normally be examined.
108   normal_isa_range: filled in by the module writer. Terminated by
109     SENSORS_ISA_END
110     A list of triples. The first two elements are ISA addresses, being an
111     range of addresses which should normally be examined. The third is the
112     modulo parameter: only addresses which are 0 module this value relative
113     to the first address of the range are actually considered.
114   probe: insmod parameter. Initialize this list with SENSORS_I2C_END values.
115     A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
116     the ISA bus, -1 for any I2C bus), the second is the address. These
117     addresses are also probed, as if they were in the 'normal' list.
118   probe_range: insmod parameter. Initialize this list with SENSORS_I2C_END
119     values.
120     A list of triples. The first value is a bus number (SENSORS_ISA_BUS for
121     the ISA bus, -1 for any I2C bus), the second and third are addresses.
122     These form an inclusive range of addresses that are also probed, as
123     if they were in the 'normal' list.
124   ignore: insmod parameter. Initialize this list with SENSORS_I2C_END values.
125     A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
126     the ISA bus, -1 for any I2C bus), the second is the I2C address. These
127     addresses are never probed. This parameter overrules 'normal' and
128     'probe', but not the 'force' lists.
129   ignore_range: insmod parameter. Initialize this list with SENSORS_I2C_END
130      values.
131     A list of triples. The first value is a bus number (SENSORS_ISA_BUS for
132     the ISA bus, -1 for any I2C bus), the second and third are addresses.
133     These form an inclusive range of I2C addresses that are never probed.
134     This parameter overrules 'normal' and 'probe', but not the 'force' lists.
135   force_data: insmod parameters. A list, ending with an element of which
136     the force field is NULL.
137*/
138struct sensors_address_data {
139        unsigned short *normal_i2c;
140        unsigned short *normal_i2c_range;
141        unsigned int *normal_isa;
142        unsigned int *normal_isa_range;
143        unsigned short *probe;
144        unsigned short *probe_range;
145        unsigned short *ignore;
146        unsigned short *ignore_range;
147        struct sensors_force_data *forces;
148};
149
150/* Internal numbers to terminate lists */
151#define SENSORS_I2C_END 0xfffe
152#define SENSORS_ISA_END 0xfffefffe
153
154/* The numbers to use to set an ISA or I2C bus address */
155#define SENSORS_ISA_BUS 9191
156#define SENSORS_ANY_I2C_BUS 0xffff
157
158/* The length of the option lists */
159#define SENSORS_MAX_OPTS 48
160
161/* Default fill of many variables */
162#define SENSORS_DEFAULTS {SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
163                          SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
164                          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
179/* This is ugly. We need to evaluate SENSORS_MAX_OPTS before it is
180   stringified */
181#define SENSORS_MODPARM_AUX1(x) "1-" #x "h"
182#define SENSORS_MODPARM_AUX(x) SENSORS_MODPARM_AUX1(x)
183#define SENSORS_MODPARM SENSORS_MODPARM_AUX(SENSORS_MAX_OPTS)
184
185/* SENSORS_MODULE_PARM creates a module parameter, and puts it in the
186   module header */
187#define SENSORS_MODULE_PARM(var,desc) \
188  static unsigned short var[SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
189  MODULE_PARM(var,SENSORS_MODPARM); \
190  MODULE_PARM_DESC(var,desc)
191
192/* SENSORS_MODULE_PARM creates a 'force_*' module parameter, and puts it in
193   the module header */
194#define SENSORS_MODULE_PARM_FORCE(name) \
195  SENSORS_MODULE_PARM(force_ ## name, \
196                      "List of adapter,address pairs which are unquestionably" \
197                      " assumed to contain a `" # name "' chip")
198
199
200/* This defines several insmod variables, and the addr_data structure */
201#define SENSORS_INSMOD \
202  SENSORS_MODULE_PARM(probe, \
203                      "List of adapter,address pairs to scan additionally"); \
204  SENSORS_MODULE_PARM(probe_range, \
205                      "List of adapter,start-addr,end-addr triples to scan " \
206                      "additionally"); \
207  SENSORS_MODULE_PARM(ignore, \
208                      "List of adapter,address pairs not to scan"); \
209  SENSORS_MODULE_PARM(ignore_range, \
210                      "List of adapter,start-addr,end-addr triples not to " \
211                      "scan"); \
212  static struct sensors_address_data addr_data = \
213                                       {normal_i2c, normal_i2c_range, \
214                                        normal_isa, normal_isa_range, \
215                                        probe, probe_range, \
216                                        ignore, ignore_range, \
217                                        forces}
218
219/* The following functions create an enum with the chip names as elements.
220   The first element of the enum is any_chip. These are the only macros
221   a module will want to use. */
222
223#define SENSORS_INSMOD_0 \
224  enum chips { any_chip }; \
225  SENSORS_MODULE_PARM(force, \
226                      "List of adapter,address pairs to boldly assume " \
227                      "to be present"); \
228  static struct sensors_force_data forces[] = {{force,any_chip},{NULL}}; \
229  SENSORS_INSMOD
230
231#define SENSORS_INSMOD_1(chip1) \
232  enum chips { any_chip, chip1 }; \
233  SENSORS_MODULE_PARM(force, \
234                      "List of adapter,address pairs to boldly assume " \
235                      "to be present"); \
236  SENSORS_MODULE_PARM_FORCE(chip1); \
237  static struct sensors_force_data forces[] = {{force,any_chip},\
238                                                 {force_ ## chip1,chip1}, \
239                                                 {NULL}}; \
240  SENSORS_INSMOD
241
242#define SENSORS_INSMOD_2(chip1,chip2) \
243  enum chips { any_chip, chip1, chip2 }; \
244  SENSORS_MODULE_PARM(force, \
245                      "List of adapter,address pairs to boldly assume " \
246                      "to be present"); \
247  SENSORS_MODULE_PARM_FORCE(chip1); \
248  SENSORS_MODULE_PARM_FORCE(chip2); \
249  static struct sensors_force_data forces[] = {{force,any_chip}, \
250                                                 {force_ ## chip1,chip1}, \
251                                                 {force_ ## chip2,chip2}, \
252                                                 {NULL}}; \
253  SENSORS_INSMOD
254
255#define SENSORS_INSMOD_3(chip1,chip2,chip3) \
256  enum chips { any_chip, chip1, chip2, chip3 }; \
257  SENSORS_MODULE_PARM(force, \
258                      "List of adapter,address pairs to boldly assume " \
259                      "to be present"); \
260  SENSORS_MODULE_PARM_FORCE(chip1); \
261  SENSORS_MODULE_PARM_FORCE(chip2); \
262  SENSORS_MODULE_PARM_FORCE(chip3); \
263  static struct sensors_force_data forces[] = {{force,any_chip}, \
264                                                 {force_ ## chip1,chip1}, \
265                                                 {force_ ## chip2,chip2}, \
266                                                 {force_ ## chip3,chip3}, \
267                                                 {NULL}}; \
268  SENSORS_INSMOD
269
270#define SENSORS_INSMOD_4(chip1,chip2,chip3,chip4) \
271  enum chips { any_chip, chip1, chip2, chip3, chip4 }; \
272  SENSORS_MODULE_PARM(force, \
273                      "List of adapter,address pairs to boldly assume " \
274                      "to be present"); \
275  SENSORS_MODULE_PARM_FORCE(chip1); \
276  SENSORS_MODULE_PARM_FORCE(chip2); \
277  SENSORS_MODULE_PARM_FORCE(chip3); \
278  SENSORS_MODULE_PARM_FORCE(chip4); \
279  static struct sensors_force_data forces[] = {{force,any_chip}, \
280                                                 {force_ ## chip1,chip1}, \
281                                                 {force_ ## chip2,chip2}, \
282                                                 {force_ ## chip3,chip3}, \
283                                                 {force_ ## chip4,chip4}, \
284                                                 {NULL}}; \
285  SENSORS_INSMOD
286
287#define SENSORS_INSMOD_5(chip1,chip2,chip3,chip4,chip5) \
288  enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \
289  SENSORS_MODULE_PARM(force, \
290                      "List of adapter,address pairs to boldly assume " \
291                      "to be present"); \
292  SENSORS_MODULE_PARM_FORCE(chip1); \
293  SENSORS_MODULE_PARM_FORCE(chip2); \
294  SENSORS_MODULE_PARM_FORCE(chip3); \
295  SENSORS_MODULE_PARM_FORCE(chip4); \
296  SENSORS_MODULE_PARM_FORCE(chip5); \
297  static struct sensors_force_data forces[] = {{force,any_chip}, \
298                                                 {force_ ## chip1,chip1}, \
299                                                 {force_ ## chip2,chip2}, \
300                                                 {force_ ## chip3,chip3}, \
301                                                 {force_ ## chip4,chip4}, \
302                                                 {force_ ## chip5,chip5}, \
303                                                 {NULL}}; \
304  SENSORS_INSMOD
305
306#define SENSORS_INSMOD_6(chip1,chip2,chip3,chip4,chip5,chip6) \
307  enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \
308  SENSORS_MODULE_PARM(force, \
309                      "List of adapter,address pairs to boldly assume " \
310                      "to be present"); \
311  SENSORS_MODULE_PARM_FORCE(chip1); \
312  SENSORS_MODULE_PARM_FORCE(chip2); \
313  SENSORS_MODULE_PARM_FORCE(chip3); \
314  SENSORS_MODULE_PARM_FORCE(chip4); \
315  SENSORS_MODULE_PARM_FORCE(chip5); \
316  SENSORS_MODULE_PARM_FORCE(chip6); \
317  static struct sensors_force_data forces[] = {{force,any_chip}, \
318                                                 {force_ ## chip1,chip1}, \
319                                                 {force_ ## chip2,chip2}, \
320                                                 {force_ ## chip3,chip3}, \
321                                                 {force_ ## chip4,chip4}, \
322                                                 {force_ ## chip5,chip5}, \
323                                                 {force_ ## chip6,chip6}, \
324                                                 {NULL}}; \
325  SENSORS_INSMOD
326
327typedef int sensors_found_addr_proc(struct i2c_adapter *adapter,
328                                    int addr, unsigned short flags,
329                                    int kind);
330
331/* Detect function. It itterates over all possible addresses itself. For
332   SMBus addresses, it will only call found_proc if some client is connected
333   to the SMBus (unless a 'force' matched); for ISA detections, this is not
334   done. */
335extern int sensors_detect(struct i2c_adapter *adapter,
336                          struct sensors_address_data *address_data,
337                          sensors_found_addr_proc * found_proc);
338
339
340/* This macro is used to scale user-input to sensible values in almost all
341   chip drivers. */
342extern inline int SENSORS_LIMIT(long value, long low, long high)
343{
344        if (value < low)
345                return low;
346        else if (value > high)
347                return high;
348        else
349                return value;
350}
351
352#endif                          /* def __KERNEL__ */
353
354
355/* The maximum length of the prefix */
356#define SENSORS_PREFIX_MAX 20
357
358/* IDs --   Use DRIVERIDs 1000-1999 for sensors.
359   Other drivers define the id in linux/i2c.h     */
360#define I2C_DRIVERID_LM78 1002
361#define I2C_DRIVERID_LM75 1003
362#define I2C_DRIVERID_GL518 1004
363#define I2C_DRIVERID_EEPROM 1005
364#define I2C_DRIVERID_W83781D 1006
365#define I2C_DRIVERID_LM80 1007
366#define I2C_DRIVERID_ADM1021 1008
367#define I2C_DRIVERID_ADM9240 1009
368#define I2C_DRIVERID_LTC1710 1010
369#define I2C_DRIVERID_SIS5595 1011
370#define I2C_DRIVERID_ICSPLL 1012
371#define I2C_DRIVERID_BT869 1013
372#define I2C_DRIVERID_MAXILIFE 1014
373#define I2C_DRIVERID_MATORB 1015
374#define I2C_DRIVERID_GL520 1016
375#define I2C_DRIVERID_THMC50 1017
376#define I2C_DRIVERID_DDCMON 1018
377#define I2C_DRIVERID_VIA686A 1019
378
379/* Sysctl IDs */
380#ifdef DEV_HWMON
381#define DEV_SENSORS DEV_HWMON
382#else                           /* ndef DEV_HWMOM */
383#define DEV_SENSORS 2           /* The id of the lm_sensors directory within the
384                                   dev table */
385#endif                          /* def DEV_HWMON */
386
387#define SENSORS_CHIPS 1
388struct sensors_chips_data {
389        int sysctl_id;
390        char name[SENSORS_PREFIX_MAX + 13];
391};
392
393#define LM78_SYSCTL_IN0 1000    /* Volts * 100 */
394#define LM78_SYSCTL_IN1 1001
395#define LM78_SYSCTL_IN2 1002
396#define LM78_SYSCTL_IN3 1003
397#define LM78_SYSCTL_IN4 1004
398#define LM78_SYSCTL_IN5 1005
399#define LM78_SYSCTL_IN6 1006
400#define LM78_SYSCTL_FAN1 1101   /* Rotations/min */
401#define LM78_SYSCTL_FAN2 1102
402#define LM78_SYSCTL_FAN3 1103
403#define LM78_SYSCTL_TEMP 1200   /* Degrees Celcius * 10 */
404#define LM78_SYSCTL_VID 1300    /* Volts * 100 */
405#define LM78_SYSCTL_FAN_DIV 2000        /* 1, 2, 4 or 8 */
406#define LM78_SYSCTL_ALARMS 2001 /* bitvector */
407
408#define LM78_ALARM_IN0 0x0001
409#define LM78_ALARM_IN1 0x0002
410#define LM78_ALARM_IN2 0x0004
411#define LM78_ALARM_IN3 0x0008
412#define LM78_ALARM_IN4 0x0100
413#define LM78_ALARM_IN5 0x0200
414#define LM78_ALARM_IN6 0x0400
415#define LM78_ALARM_FAN1 0x0040
416#define LM78_ALARM_FAN2 0x0080
417#define LM78_ALARM_FAN3 0x0800
418#define LM78_ALARM_TEMP 0x0010
419#define LM78_ALARM_BTI 0x0020
420#define LM78_ALARM_CHAS 0x1000
421#define LM78_ALARM_FIFO 0x2000
422#define LM78_ALARM_SMI_IN 0x4000
423
424#define W83781D_SYSCTL_IN0 1000 /* Volts * 100 */
425#define W83781D_SYSCTL_IN1 1001
426#define W83781D_SYSCTL_IN2 1002
427#define W83781D_SYSCTL_IN3 1003
428#define W83781D_SYSCTL_IN4 1004
429#define W83781D_SYSCTL_IN5 1005
430#define W83781D_SYSCTL_IN6 1006
431#define W83781D_SYSCTL_IN7 1007
432#define W83781D_SYSCTL_IN8 1008
433#define W83781D_SYSCTL_FAN1 1101        /* Rotations/min */
434#define W83781D_SYSCTL_FAN2 1102
435#define W83781D_SYSCTL_FAN3 1103
436#define W83781D_SYSCTL_TEMP1 1200       /* Degrees Celcius * 10 */
437#define W83781D_SYSCTL_TEMP2 1201       /* Degrees Celcius * 10 */
438#define W83781D_SYSCTL_TEMP3 1202       /* Degrees Celcius * 10 */
439#define W83781D_SYSCTL_VID 1300 /* Volts * 100 */
440#define W83781D_SYSCTL_PWM1 1401
441#define W83781D_SYSCTL_PWM2 1402
442#define W83781D_SYSCTL_PWM3 1403
443#define W83781D_SYSCTL_PWM4 1404
444#define W83781D_SYSCTL_SENS1 1501       /* 1, 2, or Beta (3000-5000) */
445#define W83781D_SYSCTL_SENS2 1502
446#define W83781D_SYSCTL_SENS3 1503
447#define W83781D_SYSCTL_RT1   1601       /* 32-entry table */
448#define W83781D_SYSCTL_RT2   1602       /* 32-entry table */
449#define W83781D_SYSCTL_RT3   1603       /* 32-entry table */
450#define W83781D_SYSCTL_FAN_DIV 2000     /* 1, 2, 4 or 8 */
451#define W83781D_SYSCTL_ALARMS 2001      /* bitvector */
452#define W83781D_SYSCTL_BEEP 2002        /* bitvector */
453
454#define W83781D_ALARM_IN0 0x0001
455#define W83781D_ALARM_IN1 0x0002
456#define W83781D_ALARM_IN2 0x0004
457#define W83781D_ALARM_IN3 0x0008
458#define W83781D_ALARM_IN4 0x0100
459#define W83781D_ALARM_IN5 0x0200
460#define W83781D_ALARM_IN6 0x0400
461#define W83782D_ALARM_IN7 0x10000
462#define W83782D_ALARM_IN8 0x20000
463#define W83781D_ALARM_FAN1 0x0040
464#define W83781D_ALARM_FAN2 0x0080
465#define W83781D_ALARM_FAN3 0x0800
466#define W83781D_ALARM_TEMP1 0x0010
467#define W83781D_ALARM_TEMP23 0x0020     /* 781D only */
468#define W83781D_ALARM_TEMP2 0x0020      /* 782D/783S */
469#define W83781D_ALARM_TEMP3 0x2000      /* 782D only */
470#define W83781D_ALARM_CHAS 0x1000
471
472#define LM75_SYSCTL_TEMP 1200   /* Degrees Celcius * 10 */
473
474#define ADM1021_SYSCTL_TEMP 1200
475#define ADM1021_SYSCTL_REMOTE_TEMP 1201
476#define ADM1021_SYSCTL_DIE_CODE 1202
477#define ADM1021_SYSCTL_ALARMS 1203
478
479#define ADM1021_ALARM_TEMP_HIGH 0x40
480#define ADM1021_ALARM_TEMP_LOW 0x20
481#define ADM1021_ALARM_RTEMP_HIGH 0x10
482#define ADM1021_ALARM_RTEMP_LOW 0x08
483#define ADM1021_ALARM_RTEMP_NA 0x04
484
485#define GL518_SYSCTL_VDD  1000  /* Volts * 100 */
486#define GL518_SYSCTL_VIN1 1001
487#define GL518_SYSCTL_VIN2 1002
488#define GL518_SYSCTL_VIN3 1003
489#define GL518_SYSCTL_FAN1 1101  /* RPM */
490#define GL518_SYSCTL_FAN2 1102
491#define GL518_SYSCTL_TEMP 1200  /* Degrees Celcius * 10 */
492#define GL518_SYSCTL_FAN_DIV 2000       /* 1, 2, 4 or 8 */
493#define GL518_SYSCTL_ALARMS 2001        /* bitvector */
494#define GL518_SYSCTL_BEEP 2002  /* bitvector */
495#define GL518_SYSCTL_FAN1OFF 2003
496#define GL518_SYSCTL_ITERATE 2004
497
498#define GL518_ALARM_VDD 0x01
499#define GL518_ALARM_VIN1 0x02
500#define GL518_ALARM_VIN2 0x04
501#define GL518_ALARM_VIN3 0x08
502#define GL518_ALARM_TEMP 0x10
503#define GL518_ALARM_FAN1 0x20
504#define GL518_ALARM_FAN2 0x40
505
506#define GL520_SYSCTL_VDD  1000  /* Volts * 100 */
507#define GL520_SYSCTL_VIN1 1001
508#define GL520_SYSCTL_VIN2 1002
509#define GL520_SYSCTL_VIN3 1003
510#define GL520_SYSCTL_VIN4 1004
511#define GL520_SYSCTL_FAN1 1101  /* RPM */
512#define GL520_SYSCTL_FAN2 1102
513#define GL520_SYSCTL_TEMP1 1200 /* Degrees Celcius * 10 */
514#define GL520_SYSCTL_TEMP2 1201 /* Degrees Celcius * 10 */
515#define GL520_SYSCTL_VID 1300
516#define GL520_SYSCTL_FAN_DIV 2000       /* 1, 2, 4 or 8 */
517#define GL520_SYSCTL_ALARMS 2001        /* bitvector */
518#define GL520_SYSCTL_BEEP 2002  /* bitvector */
519#define GL520_SYSCTL_FAN1OFF 2003
520#define GL520_SYSCTL_CONFIG 2004
521
522#define GL520_ALARM_VDD 0x01
523#define GL520_ALARM_VIN1 0x02
524#define GL520_ALARM_VIN2 0x04
525#define GL520_ALARM_VIN3 0x08
526#define GL520_ALARM_TEMP1 0x10
527#define GL520_ALARM_FAN1 0x20
528#define GL520_ALARM_FAN2 0x40
529#define GL520_ALARM_TEMP2 0x80
530#define GL520_ALARM_VIN4 0x80
531
532#define EEPROM_SYSCTL1 1000
533#define EEPROM_SYSCTL2 1001
534#define EEPROM_SYSCTL3 1002
535#define EEPROM_SYSCTL4 1003
536#define EEPROM_SYSCTL5 1004
537#define EEPROM_SYSCTL6 1005
538#define EEPROM_SYSCTL7 1006
539#define EEPROM_SYSCTL8 1007
540
541#define LM80_SYSCTL_IN0 1000    /* Volts * 100 */
542#define LM80_SYSCTL_IN1 1001
543#define LM80_SYSCTL_IN2 1002
544#define LM80_SYSCTL_IN3 1003
545#define LM80_SYSCTL_IN4 1004
546#define LM80_SYSCTL_IN5 1005
547#define LM80_SYSCTL_IN6 1006
548#define LM80_SYSCTL_FAN1 1101   /* Rotations/min */
549#define LM80_SYSCTL_FAN2 1102
550#define LM80_SYSCTL_TEMP 1250   /* Degrees Celcius * 100 */
551#define LM80_SYSCTL_FAN_DIV 2000        /* 1, 2, 4 or 8 */
552#define LM80_SYSCTL_ALARMS 2001 /* bitvector */
553
554#define ADM9240_SYSCTL_IN0 1000 /* Volts * 100 */
555#define ADM9240_SYSCTL_IN1 1001
556#define ADM9240_SYSCTL_IN2 1002
557#define ADM9240_SYSCTL_IN3 1003
558#define ADM9240_SYSCTL_IN4 1004
559#define ADM9240_SYSCTL_IN5 1005
560#define ADM9240_SYSCTL_FAN1 1101        /* Rotations/min */
561#define ADM9240_SYSCTL_FAN2 1102
562#define ADM9240_SYSCTL_TEMP 1250        /* Degrees Celcius * 100 */
563#define ADM9240_SYSCTL_FAN_DIV 2000     /* 1, 2, 4 or 8 */
564#define ADM9240_SYSCTL_ALARMS 2001      /* bitvector */
565#define ADM9240_SYSCTL_ANALOG_OUT 2002
566#define ADM9240_SYSCTL_VID 2003
567
568#define ADM9240_ALARM_IN0 0x0001
569#define ADM9240_ALARM_IN1 0x0002
570#define ADM9240_ALARM_IN2 0x0004
571#define ADM9240_ALARM_IN3 0x0008
572#define ADM9240_ALARM_IN4 0x0100
573#define ADM9240_ALARM_IN5 0x0200
574#define ADM9240_ALARM_FAN1 0x0040
575#define ADM9240_ALARM_FAN2 0x0080
576#define ADM9240_ALARM_TEMP 0x0010
577#define ADM9240_ALARM_CHAS 0x1000
578
579#define LTC1710_SYSCTL_SWITCH_1 1000
580#define LTC1710_SYSCTL_SWITCH_2 1001
581
582#define LM80_ALARM_IN0 0x0001
583#define LM80_ALARM_IN1 0x0002
584#define LM80_ALARM_IN2 0x0004
585#define LM80_ALARM_IN3 0x0008
586#define LM80_ALARM_IN4 0x0010
587#define LM80_ALARM_IN5 0x0020
588#define LM80_ALARM_IN6 0x0040
589#define LM80_ALARM_FAN1 0x0400
590#define LM80_ALARM_FAN2 0x0800
591#define LM80_ALARM_TEMP_HOT 0x0100
592#define LM80_ALARM_TEMP_OS 0x2000
593#define LM80_ALARM_CHAS 0x1000
594#define LM80_ALARM_BTI 0x0200
595#define LM80_ALARM_INT_IN 0x0080
596
597#define MAXI_SYSCTL_FAN1   1101 /* Rotations/min */
598#define MAXI_SYSCTL_FAN2   1102 /* Rotations/min */
599#define MAXI_SYSCTL_FAN3   1103 /* Rotations/min */
600#define MAXI_SYSCTL_TEMP1  1201 /* Degrees Celcius */
601#define MAXI_SYSCTL_TEMP2  1202 /* Degrees Celcius */
602#define MAXI_SYSCTL_TEMP3  1203 /* Degrees Celcius */
603#define MAXI_SYSCTL_TEMP4  1204 /* Degrees Celcius */
604#define MAXI_SYSCTL_TEMP5  1205 /* Degrees Celcius */
605#define MAXI_SYSCTL_PLL    1301 /* MHz */
606#define MAXI_SYSCTL_VID1   1401 /* Volts / 6.337 */
607#define MAXI_SYSCTL_VID2   1402 /* Volts */
608#define MAXI_SYSCTL_VID3   1403 /* Volts */
609#define MAXI_SYSCTL_VID4   1404 /* Volts */
610#define MAXI_SYSCTL_ALARMS 2001 /* Bitvector (see below) */
611
612#define MAXI_ALARM_VID4      0x0001
613#define MAXI_ALARM_TEMP2     0x0002
614#define MAXI_ALARM_VID1      0x0004
615#define MAXI_ALARM_VID2      0x0008
616#define MAXI_ALARM_VID3      0x0010
617#define MAXI_ALARM_PLL       0x0080
618#define MAXI_ALARM_TEMP4     0x0100
619#define MAXI_ALARM_TEMP5     0x0200
620#define MAXI_ALARM_FAN1      0x1000
621#define MAXI_ALARM_FAN2      0x2000
622#define MAXI_ALARM_FAN3      0x4000
623
624#define SIS5595_SYSCTL_IN0 1000 /* Volts * 100 */
625#define SIS5595_SYSCTL_IN1 1001
626#define SIS5595_SYSCTL_IN2 1002
627#define SIS5595_SYSCTL_IN3 1003
628#define SIS5595_SYSCTL_FAN1 1101        /* Rotations/min */
629#define SIS5595_SYSCTL_FAN2 1102
630#define SIS5595_SYSCTL_TEMP 1200        /* Degrees Celcius * 10 */
631#define SIS5595_SYSCTL_FAN_DIV 2000     /* 1, 2, 4 or 8 */
632#define SIS5595_SYSCTL_ALARMS 2001      /* bitvector */
633
634#define SIS5595_ALARM_IN0 0x01
635#define SIS5595_ALARM_IN1 0x02
636#define SIS5595_ALARM_IN2 0x04
637#define SIS5595_ALARM_IN3 0x08
638#define SIS5595_ALARM_TEMP 0x10
639#define SIS5595_ALARM_BTI 0x20
640#define SIS5595_ALARM_FAN1 0x40
641#define SIS5595_ALARM_FAN2 0x80
642
643#define VIA686A_SYSCTL_IN0 1000
644#define VIA686A_SYSCTL_IN1 1001
645#define VIA686A_SYSCTL_IN2 1002
646#define VIA686A_SYSCTL_IN3 1003
647#define VIA686A_SYSCTL_IN4 1004
648#define VIA686A_SYSCTL_FAN1 1101
649#define VIA686A_SYSCTL_FAN2 1102
650#define VIA686A_SYSCTL_TEMP 1200
651#define VIA686A_SYSCTL_TEMP2 1201
652#define VIA686A_SYSCTL_TEMP3 1202
653#define VIA686A_SYSCTL_FAN_DIV 2000
654#define VIA686A_SYSCTL_ALARMS 2001
655
656#define VIA686A_ALARM_IN0 0x01
657#define VIA686A_ALARM_IN1 0x02
658#define VIA686A_ALARM_IN2 0x04
659#define VIA686A_ALARM_IN3 0x08
660#define VIA686A_ALARM_TEMP 0x10
661#define VIA686A_ALARM_FAN1 0x40
662#define VIA686A_ALARM_FAN2 0x80
663#define VIA686A_ALARM_IN4 0x100
664#define VIA686A_ALARM_TEMP2 0x400
665#define VIA686A_ALARM_CHAS 0x1000
666#define VIA686A_ALARM_TEMP3 0x8000
667
668#define ICSPLL_SYSCTL1 1000
669
670#define BT869_SYSCTL_STATUS 1000
671#define BT869_SYSCTL_NTSC   1001
672#define BT869_SYSCTL_HALF   1002
673#define BT869_SYSCTL_RES    1003
674#define BT869_SYSCTL_COLORBARS    1004
675#define BT869_SYSCTL_DEPTH  1005
676
677#define MATORB_SYSCTL_DISP 1000
678
679#define THMC50_SYSCTL_TEMP 1200 /* Degrees Celcius */
680#define THMC50_SYSCTL_REMOTE_TEMP 1201  /* Degrees Celcius */
681#define THMC50_SYSCTL_INTER 1202
682#define THMC50_SYSCTL_INTER_MASK 1203
683#define THMC50_SYSCTL_DIE_CODE 1204
684#define THMC50_SYSCTL_ANALOG_OUT 1205
685
686#define DDCMON_SYSCTL_ID 1010
687#define DDCMON_SYSCTL_SIZE 1011
688#define DDCMON_SYSCTL_SYNC 1012
689#define DDCMON_SYSCTL_TIMINGS 1013
690#define DDCMON_SYSCTL_SERIAL 1014
691
692
693#endif                          /* def SENSORS_SENSORS_H */
Note: See TracBrowser for help on using the browser.