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

Revision 335, 20.6 KB (checked in by mds, 14 years ago)

Added sensor[1-3] to 782d/783s to select sensor type.
Added RT table read to 781d but then #undef'ed it since it was just
all 1's. Changed max entries in sensor.c to 32 bytes to handle RT table.

  • 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/* 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 */
38typedef 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. */
64extern 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);
67extern 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! */
79extern int sensors_register_entry(struct i2c_client *client,
80                                  const char *prefix, ctl_table *ctl_template);
81extern 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*/
96struct 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*/
140struct 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#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#define SENSORS_CONCAT(x,y) x ## y
186#define MODULE_PARM1(x,y) MODULE_PARM(x,y)
187
188/* This defines several insmod variables, and the addr_data structure */
189#define SENSORS_INSMOD \
190  MODULE_PARM(probe,SENSORS_MODPARM); \
191  static unsigned short probe[SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
192  MODULE_PARM(probe_range,SENSORS_MODPARM); \
193  static unsigned short probe_range[SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
194  MODULE_PARM(ignore,SENSORS_MODPARM); \
195  static unsigned short ignore[SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
196  MODULE_PARM(ignore_range,SENSORS_MODPARM); \
197  static unsigned short ignore_range [SENSORS_MAX_OPTS]  = SENSORS_DEFAULTS; \
198  static struct sensors_address_data addr_data = \
199                                       {normal_i2c, normal_i2c_range, \
200                                        normal_isa, normal_isa_range, \
201                                        probe, probe_range, \
202                                        ignore, ignore_range, \
203                                        forces}
204
205/* The following functions assume the existence of an enum with the chip
206   names as elements. The first element of the enum should be any_chip */
207
208#define SENSORS_INSMOD_0 \
209  enum chips { any_chip }; \
210  MODULE_PARM(force,SENSORS_MODPARM); \
211  static unsigned short force[SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
212  static struct sensors_force_data forces[] = {{force,any_chip},{NULL}}; \
213  SENSORS_INSMOD
214
215#define SENSORS_INSMOD_1(chip1) \
216  enum chips { any_chip, chip1 }; \
217  MODULE_PARM(force,SENSORS_MODPARM); \
218  static unsigned short force[SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
219  MODULE_PARM1(SENSORS_CONCAT(force_,chip1),SENSORS_MODPARM); \
220  static unsigned short force_ ## chip1 [SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
221  static struct sensors_force_data forces[] = {{force,any_chip},\
222                                                 {force_ ## chip1,chip1}, \
223                                                 {NULL}}; \
224  SENSORS_INSMOD
225
226#define SENSORS_INSMOD_2(chip1,chip2) \
227  enum chips { any_chip, chip1, chip2 }; \
228  MODULE_PARM(force,SENSORS_MODPARM); \
229  static unsigned short force[SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
230  MODULE_PARM1(SENSORS_CONCAT(force_,chip1),SENSORS_MODPARM); \
231  static unsigned short force_ ## chip1 [SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
232  MODULE_PARM1(SENSORS_CONCAT(force_,chip2),SENSORS_MODPARM); \
233  static unsigned short force_ ## chip2 [SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
234  static struct sensors_force_data forces[] = {{force,any_chip}, \
235                                                 {force_ ## chip1,chip2}, \
236                                                 {force_ ## chip2,nr2}, \
237                                                 {NULL}}; \
238  SENSORS_INSMOD
239
240#define SENSORS_INSMOD_3(chip1,chip2,chip3) \
241  enum chips { any_chip, chip1, chip2, chip3 }; \
242  MODULE_PARM(force,SENSORS_MODPARM); \
243  static unsigned short force[SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
244  MODULE_PARM1(SENSORS_CONCAT(force_,chip1),SENSORS_MODPARM); \
245  static unsigned short force_ ## chip1 [SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
246  MODULE_PARM1(SENSORS_CONCAT(force_,chip2),SENSORS_MODPARM); \
247  static unsigned short force_ ## chip2 [SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
248  MODULE_PARM1(SENSORS_CONCAT(force_,chip3),SENSORS_MODPARM); \
249  static unsigned short force_ ## chip3 [SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
250  static struct sensors_force_data forces[] = {{force,any_chip}, \
251                                                 {force_ ## chip1,chip1}, \
252                                                 {force_ ## chip2,chip2}, \
253                                                 {force_ ## chip3,chip3}, \
254                                                 {NULL}}; \
255  SENSORS_INSMOD
256
257typedef int sensors_found_addr_proc (struct i2c_adapter *adapter, 
258                                     int addr, int kind);
259
260/* Detect function. It itterates over all possible addresses itself. For
261   SMBus addresses, it will only call found_proc if some client is connected
262   to the SMBus (unless a 'force' matched); for ISA detections, this is not
263   done. */
264extern int sensors_detect(struct i2c_adapter *adapter,
265                          struct sensors_address_data *address_data,
266                          sensors_found_addr_proc *found_proc);
267
268#endif /* def __KERNEL__ */
269
270
271/* The maximum length of the prefix */
272#define SENSORS_PREFIX_MAX 20
273
274/* Driver IDs */
275#define I2C_DRIVERID_I2CDEV 1000
276#define I2C_DRIVERID_I2CPROC 1001
277#define I2C_DRIVERID_LM78 1002
278#define I2C_DRIVERID_LM75 1003
279#define I2C_DRIVERID_GL518 1004
280#define I2C_DRIVERID_EEPROM 1005
281#define I2C_DRIVERID_W83781D 1006
282#define I2C_DRIVERID_LM80 1007
283#define I2C_DRIVERID_ADM1021 1008
284#define I2C_DRIVERID_ADM9240 1009
285#define I2C_DRIVERID_LTC1710 1010
286#define I2C_DRIVERID_SIS5595 1011
287#define I2C_DRIVERID_ICSPLL 1012
288#define I2C_DRIVERID_MAXILIFE 1012
289
290/* Sysctl IDs */
291#ifdef DEV_HWMON
292#define DEV_SENSORS DEV_HWMON
293#else /* ndef DEV_HWMOM */
294#define DEV_SENSORS 2  /* The id of the lm_sensors directory within the
295                          dev table */
296#endif /* def DEV_HWMON */
297
298#define SENSORS_CHIPS 1
299struct sensors_chips_data {
300  int sysctl_id;
301  char name[SENSORS_PREFIX_MAX + 13];
302};
303
304#define LM78_SYSCTL_IN0 1000  /* Volts * 100 */
305#define LM78_SYSCTL_IN1 1001
306#define LM78_SYSCTL_IN2 1002
307#define LM78_SYSCTL_IN3 1003
308#define LM78_SYSCTL_IN4 1004
309#define LM78_SYSCTL_IN5 1005
310#define LM78_SYSCTL_IN6 1006
311#define LM78_SYSCTL_FAN1 1101 /* Rotations/min */
312#define LM78_SYSCTL_FAN2 1102
313#define LM78_SYSCTL_FAN3 1103
314#define LM78_SYSCTL_TEMP 1200 /* Degrees Celcius * 10 */
315#define LM78_SYSCTL_VID 1300 /* Volts * 100 */
316#define LM78_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */
317#define LM78_SYSCTL_ALARMS 2001 /* bitvector */
318
319#define LM78_ALARM_IN0 0x0001
320#define LM78_ALARM_IN1 0x0002
321#define LM78_ALARM_IN2 0x0004
322#define LM78_ALARM_IN3 0x0008
323#define LM78_ALARM_IN4 0x0100
324#define LM78_ALARM_IN5 0x0200
325#define LM78_ALARM_IN6 0x0400
326#define LM78_ALARM_FAN1 0x0040
327#define LM78_ALARM_FAN2 0x0080
328#define LM78_ALARM_FAN3 0x0800
329#define LM78_ALARM_TEMP 0x0010
330#define LM78_ALARM_BTI 0x0020
331#define LM78_ALARM_CHAS 0x1000
332#define LM78_ALARM_FIFO 0x2000
333#define LM78_ALARM_SMI_IN 0x4000
334
335#define W83781D_SYSCTL_IN0 1000  /* Volts * 100 */
336#define W83781D_SYSCTL_IN1 1001
337#define W83781D_SYSCTL_IN2 1002
338#define W83781D_SYSCTL_IN3 1003
339#define W83781D_SYSCTL_IN4 1004
340#define W83781D_SYSCTL_IN5 1005
341#define W83781D_SYSCTL_IN6 1006
342#define W83781D_SYSCTL_IN7 1007
343#define W83781D_SYSCTL_IN8 1008
344#define W83781D_SYSCTL_FAN1 1101 /* Rotations/min */
345#define W83781D_SYSCTL_FAN2 1102
346#define W83781D_SYSCTL_FAN3 1103
347#define W83781D_SYSCTL_TEMP1 1200 /* Degrees Celcius * 10 */
348#define W83781D_SYSCTL_TEMP2 1201 /* Degrees Celcius * 10 */
349#define W83781D_SYSCTL_TEMP3 1202 /* Degrees Celcius * 10 */
350#define W83781D_SYSCTL_VID 1300 /* Volts * 100 */
351#define W83781D_SYSCTL_PWM1 1401
352#define W83781D_SYSCTL_PWM2 1402
353#define W83781D_SYSCTL_PWM3 1403
354#define W83781D_SYSCTL_PWM4 1404
355#define W83781D_SYSCTL_SENS1 1501   /* 1, 2, or Beta (3000-5000) */
356#define W83781D_SYSCTL_SENS2 1502
357#define W83781D_SYSCTL_SENS3 1503
358#define W83781D_SYSCTL_RT1   1601   /* 32-entry table */
359#define W83781D_SYSCTL_RT2   1602   /* 32-entry table */
360#define W83781D_SYSCTL_RT3   1603   /* 32-entry table */
361#define W83781D_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */
362#define W83781D_SYSCTL_ALARMS 2001 /* bitvector */
363#define W83781D_SYSCTL_BEEP 2002 /* bitvector */
364
365#define W83781D_ALARM_IN0 0x0001
366#define W83781D_ALARM_IN1 0x0002
367#define W83781D_ALARM_IN2 0x0004
368#define W83781D_ALARM_IN3 0x0008
369#define W83781D_ALARM_IN4 0x0100
370#define W83781D_ALARM_IN5 0x0200
371#define W83781D_ALARM_IN6 0x0400
372#define W83782D_ALARM_IN7 0x10000
373#define W83782D_ALARM_IN8 0x20000
374#define W83781D_ALARM_FAN1 0x0040
375#define W83781D_ALARM_FAN2 0x0080
376#define W83781D_ALARM_FAN3 0x0800
377#define W83781D_ALARM_TEMP1 0x0010
378#define W83781D_ALARM_TEMP23 0x0020
379#define W83781D_ALARM_CHAS 0x1000
380
381#define LM75_SYSCTL_TEMP 1200 /* Degrees Celcius * 10 */
382
383#define ADM1021_SYSCTL_TEMP 1200
384#define ADM1021_SYSCTL_REMOTE_TEMP 1201
385#define ADM1021_SYSCTL_DIE_CODE 1202
386#define ADM1021_SYSCTL_STATUS 1203
387
388#define GL518_SYSCTL_VDD  1000     /* Volts * 100 */
389#define GL518_SYSCTL_VIN1 1001
390#define GL518_SYSCTL_VIN2 1002
391#define GL518_SYSCTL_VIN3 1003
392#define GL518_SYSCTL_FAN1 1101     /* RPM */
393#define GL518_SYSCTL_FAN2 1102
394#define GL518_SYSCTL_TEMP 1200     /* Degrees Celcius * 10 */
395#define GL518_SYSCTL_VID 1300   
396#define GL518_SYSCTL_FAN_DIV 2000  /* 1, 2, 4 or 8 */
397#define GL518_SYSCTL_ALARMS 2001   /* bitvector */
398#define GL518_SYSCTL_BEEP 2002     /* bitvector */
399
400#define GL518_ALARM_VDD 0x01
401#define GL518_ALARM_VIN1 0x02
402#define GL518_ALARM_VIN2 0x04
403#define GL518_ALARM_VIN3 0x08
404#define GL518_ALARM_TEMP 0x10
405#define GL518_ALARM_FAN1 0x20
406#define GL518_ALARM_FAN2 0x40
407
408#define EEPROM_SYSCTL1 1000
409#define EEPROM_SYSCTL2 1001
410#define EEPROM_SYSCTL3 1002
411#define EEPROM_SYSCTL4 1003
412#define EEPROM_SYSCTL5 1004
413#define EEPROM_SYSCTL6 1005
414#define EEPROM_SYSCTL7 1006
415#define EEPROM_SYSCTL8 1007
416
417#define LM80_SYSCTL_IN0 1000  /* Volts * 100 */
418#define LM80_SYSCTL_IN1 1001
419#define LM80_SYSCTL_IN2 1002
420#define LM80_SYSCTL_IN3 1003
421#define LM80_SYSCTL_IN4 1004
422#define LM80_SYSCTL_IN5 1005
423#define LM80_SYSCTL_IN6 1006
424#define LM80_SYSCTL_FAN1 1101 /* Rotations/min */
425#define LM80_SYSCTL_FAN2 1102
426#define LM80_SYSCTL_TEMP 1250 /* Degrees Celcius * 100 */
427#define LM80_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */
428#define LM80_SYSCTL_ALARMS 2001 /* bitvector */
429
430#define ADM9240_SYSCTL_IN0 1000  /* Volts * 100 */
431#define ADM9240_SYSCTL_IN1 1001
432#define ADM9240_SYSCTL_IN2 1002
433#define ADM9240_SYSCTL_IN3 1003
434#define ADM9240_SYSCTL_IN4 1004
435#define ADM9240_SYSCTL_IN5 1005
436#define ADM9240_SYSCTL_FAN1 1101 /* Rotations/min */
437#define ADM9240_SYSCTL_FAN2 1102
438#define ADM9240_SYSCTL_TEMP 1250 /* Degrees Celcius * 100 */
439#define ADM9240_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */
440#define ADM9240_SYSCTL_ALARMS 2001 /* bitvector */
441#define ADM9240_SYSCTL_ANALOG_OUT 2002
442#define ADM9240_SYSCTL_VID 2003
443
444#define LTC1710_SYSCTL_SWITCH_1 1000
445#define LTC1710_SYSCTL_SWITCH_2 1001
446
447#define LM80_ALARM_IN0 0x0001
448#define LM80_ALARM_IN1 0x0002
449#define LM80_ALARM_IN2 0x0004
450#define LM80_ALARM_IN3 0x0008
451#define LM80_ALARM_IN4 0x0010
452#define LM80_ALARM_IN5 0x0020
453#define LM80_ALARM_IN6 0x0040
454#define LM80_ALARM_FAN1 0x0400
455#define LM80_ALARM_FAN2 0x0800
456#define LM80_ALARM_TEMP_HOT 0x0100
457#define LM80_ALARM_TEMP_OS 0x2000
458#define LM80_ALARM_CHAS 0x1000
459#define LM80_ALARM_BTI 0x0200
460#define LM80_ALARM_INT_IN 0x0080
461
462#define MAXI_SYSCTL_FAN1   1101    /* Rotations/min */
463#define MAXI_SYSCTL_FAN2   1102    /* Rotations/min */
464#define MAXI_SYSCTL_FAN3   1103    /* Rotations/min */
465#define MAXI_SYSCTL_TEMP1  1201    /* Degrees Celcius */
466#define MAXI_SYSCTL_TEMP2  1202    /* Degrees Celcius */
467#define MAXI_SYSCTL_TEMP3  1203    /* Degrees Celcius */
468#define MAXI_SYSCTL_TEMP4  1204    /* Degrees Celcius */
469#define MAXI_SYSCTL_TEMP5  1205    /* Degrees Celcius */
470#define MAXI_SYSCTL_PLL    1301    /* MHz */
471#define MAXI_SYSCTL_VID1   1401    /* Volts / 6.337 */
472#define MAXI_SYSCTL_VID2   1402    /* Volts */
473#define MAXI_SYSCTL_VID3   1403    /* Volts */
474#define MAXI_SYSCTL_VID4   1404    /* Volts */
475#define MAXI_SYSCTL_ALARMS 2001    /* Bitvector (see below) */
476
477#define MAXI_ALARM_VID4      0x0001
478#define MAXI_ALARM_TEMP2     0x0002
479#define MAXI_ALARM_VID1      0x0004
480#define MAXI_ALARM_VID2      0x0008
481#define MAXI_ALARM_VID3      0x0010
482#define MAXI_ALARM_PLL       0x0080
483#define MAXI_ALARM_TEMP4     0x0100
484#define MAXI_ALARM_TEMP5     0x0200
485#define MAXI_ALARM_FAN1      0x1000
486#define MAXI_ALARM_FAN2      0x2000
487#define MAXI_ALARM_FAN3      0x4000
488
489
490#define ICSPLL_SYSCTL1 1000
491#endif /* def SENSORS_SENSORS_H */
Note: See TracBrowser for help on using the browser.