diff options
Diffstat (limited to 'drivers/dahdi/wctdm24xxp/wctdm24xxp.h')
-rw-r--r-- | drivers/dahdi/wctdm24xxp/wctdm24xxp.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h index 2ce703c..47e72af 100644 --- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h +++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h @@ -116,6 +116,15 @@ enum hook_state { DEBOUNCING_OFF_HOOK, }; +enum ring_detector_state { + RINGOFF = 0, + DEBOUNCING_RINGING_POSITIVE, + DEBOUNCING_RINGING_NEGATIVE, + DEBOUNCING_RINGING_OFF, + RINGING, + DEBOUNCING_RINGOFF, +}; + struct wctdm_cmd { struct list_head node; struct completion *complete; @@ -150,10 +159,11 @@ struct wctdm_chan { }; struct fxo { - int wasringing; - int lastrdtx; - int lastrdtx_count; - int ringdebounce; + enum ring_detector_state ring_state:4; + enum battery_state battery_state:4; + u8 ring_polarity_change_count:4; + u8 hook_ring_shadow; + s8 line_voltage_status; int offhook; int battdebounce; int battalarm; @@ -166,8 +176,7 @@ struct fxo { unsigned int neonmwi_debounce; unsigned int neonmwi_offcounter; unsigned long display_fxovoltage; - u8 hook_ring_shadow; - s8 line_voltage_status; + unsigned long ringdebounce_timer; }; struct fxs { @@ -226,7 +235,7 @@ enum module_type { }; struct wctdm_module { - union { + union modtypes { struct fxo fxo; struct fxs fxs; struct qrv qrv; |