summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-08-30 16:38:36 +0000
committerShaun Ruffell <sruffell@digium.com>2011-08-30 16:38:36 +0000
commited9d6ec1e397916c69cee2dd1ebd3c7e3e18793b (patch)
tree70399de57ec39436a712f1982cee22442ce437d1 /drivers/dahdi/wctdm24xxp/wctdm24xxp.h
parent6ec60e48a7c141b8b4c8288e7654ee982dff9ad1 (diff)
wctdm24xxp: Use interval for debouncing FXO battery.
Allows the driver the option of not calling the misc function for every frame. This is part of preparation for moving misc processing out of the interrupt handler. Also use a state machine for the various battery states to unify the technique for debouncing the various signals in the driver. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10169 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm24xxp/wctdm24xxp.h')
-rw-r--r--drivers/dahdi/wctdm24xxp/wctdm24xxp.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
index 81ec1c2..e7547b3 100644
--- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
+++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
@@ -105,7 +105,11 @@ struct calregs {
enum battery_state {
BATTERY_UNKNOWN = 0,
+ BATTERY_DEBOUNCING_PRESENT,
+ BATTERY_DEBOUNCING_PRESENT_ALARM,
BATTERY_PRESENT,
+ BATTERY_DEBOUNCING_LOST,
+ BATTERY_DEBOUNCING_LOST_ALARM,
BATTERY_LOST,
};
@@ -159,9 +163,6 @@ struct fxo {
u8 hook_ring_shadow;
s8 line_voltage_status;
int offhook;
- int battdebounce;
- int battalarm;
- enum battery_state battery;
int lastpol;
int polarity;
int polaritydebounce;
@@ -171,6 +172,7 @@ struct fxo {
unsigned int neonmwi_offcounter;
unsigned long display_fxovoltage;
unsigned long ringdebounce_timer;
+ unsigned long battdebounce_timer;
};
struct fxs {