diff -r ee662c2e14f9 -r 12065fad228b me8100.h --- a/me8100.h Thu Jan 17 20:25:34 2002 +0100 +++ b/me8100.h Fri Jan 18 20:22:52 2002 +0100 @@ -135,6 +135,7 @@ #define ME8100_CTRL_IRQ_MASK 0x60 #define ME8100_CTRL_REG 0x00 //( ,w) +#define ME8100_MASK_REG 0x02 //(r, ) #define ME8100_DI_REG 0x04 //(r, ) #define ME8100_DO_REG 0x06 //( ,w) @@ -171,19 +172,19 @@ #define LOCAL_INT1_EN 0x01 // local interrupt 1 enabled (r,w) #define LOCAL_INT1_POL 0x02 // local interrupt 1 polarity (r,w) #define LOCAL_INT1_STATE 0x04 // local interrupt 1 state (r, ) + #define LOCAL_INT2_EN 0x08 // local interrupt 2 enabled (r,w) #define LOCAL_INT2_POL 0x10 // local interrupt 2 polarity (r,w) #define LOCAL_INT2_STATE 0x20 // local interrupt 2 state (r, ) + +/* Sould be shifted left by 3 if it's used for device B */ +#define LOCAL_INT_EN 0x01 +#define LOCAL_INT_POL 0x02 +#define LOCAL_INT_STATE 0x04 + #define PCI_INT_EN 0x40 // PCI interrupt enable (r,w) #define SOFT_INT 0x80 // Software interrupt (r,w) - -typedef enum { - ME8100_A, - ME8100_B -} me8100_version_enum_type; - - typedef struct{ int int1; int int2; @@ -191,9 +192,19 @@ #ifdef __KERNEL__ +typedef enum { + ME8100_A, + ME8100_B +} me8100_version_enum_type; + +struct me8100_private_data { + unsigned long last_read; /* jiffies */ +}; + struct me8100_subinfo { unsigned int regbase; unsigned short ctrl_reg; + unsigned long last_change; int num_writer; }; @@ -217,7 +228,6 @@ int int_count_1; /* Count of interrupt 1 */ int int_count_2; /* Count of interrupt 2 */ int board_in_use; /* Indicates if board is already in use */ - spinlock_t use_lock; /* Guards board in use */ struct file *file_ptr; /* Pointer to file structure of path */ struct fasync_struct *fasync_ptr; /* .hs */ struct me8100_subinfo subinfo[2]; /* .hs */