diff options
Diffstat (limited to 'drivers/dahdi/wctdm24xxp/wctdm24xxp.h')
-rw-r--r-- | drivers/dahdi/wctdm24xxp/wctdm24xxp.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h index 453f9bc..802ec6b 100644 --- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h +++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h @@ -85,12 +85,9 @@ #define NUM_CAL_REGS 12 -#define USER_COMMANDS 8 #define ISR_COMMANDS 2 #define QRV_DEBOUNCETIME 20 -#define MAX_COMMANDS (USER_COMMANDS + ISR_COMMANDS) - #define VPM150M_HPI_CONTROL 0x00 #define VPM150M_HPI_ADDRESS 0x02 #define VPM150M_HPI_DATA 0x03 @@ -106,17 +103,19 @@ struct calregs { unsigned char vals[NUM_CAL_REGS]; }; -struct cmdq { - unsigned int cmds[MAX_COMMANDS]; - unsigned char isrshadow[ISR_COMMANDS]; -}; - enum battery_state { BATTERY_UNKNOWN = 0, BATTERY_PRESENT, BATTERY_LOST, }; +struct wctdm_cmd { + struct list_head node; + struct completion *complete; + u32 cmd; + u8 ident; +}; + /** * struct wctdm_span - * @span: dahdi_span to register. @@ -221,7 +220,10 @@ struct wctdm_module { struct b400m *bri; } mod; - struct cmdq cmdq; + /* Protected by wctdm.reglock */ + struct list_head pending_cmds; + struct list_head active_cmds; + u8 isrshadow[ISR_COMMANDS]; enum module_type type; int sethook; /* pending hook state command */ |