diff options
author | Shaun Ruffell <sruffell@digium.com> | 2008-12-23 04:02:13 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2008-12-23 04:02:13 +0000 |
commit | 8c3db120dcc5e6c56c419f4f7c293d40c2c4ab94 (patch) | |
tree | 4b13c678cc61045829eba47187daa3fc7b4e9a9f /drivers/dahdi/wctdm.c | |
parent | d26e15b7520563e6afe64effd5b3ce157fe89c2b (diff) |
Enabling a module parameter that will allow the user to periodically print the
battery voltage to the kernel log. Used for troubleshooting. Issue: DAHDI-34
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5612 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm.c')
-rw-r--r-- | drivers/dahdi/wctdm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c index 036f418..eacf33c 100644 --- a/drivers/dahdi/wctdm.c +++ b/drivers/dahdi/wctdm.c @@ -270,6 +270,7 @@ static struct wctdm *ifaces[WC_MAX_IFACES]; static void wctdm_release(struct wctdm *wc); +static unsigned int fxovoltage; static unsigned int battdebounce; static unsigned int battalarm; static unsigned int battthresh; @@ -825,6 +826,13 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card) b = wc->reg1shadow[card]; + if (fxovoltage) { + static int count = 0; + if (!(count++ % 100)) { + printk(KERN_DEBUG "Card %d: Voltage: %d Debounce %d\n", card + 1, b, fxo->battdebounce); + } + } + if (abs(b) < battthresh) { /* possible existing states: battery lost, no debounce timer @@ -2476,6 +2484,7 @@ static void __exit wctdm_cleanup(void) } module_param(debug, int, 0600); +module_param(fxovoltage, int, 0600); module_param(loopcurrent, int, 0600); module_param(reversepolarity, int, 0600); module_param(robust, int, 0600); |