diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-06-06 02:47:53 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-06-06 02:47:53 +0000 |
commit | 21224b4ad18a623fbfc481242048e28fdbfaea86 (patch) | |
tree | 9648dec8ba91fdb90a2df80b781226c0a3516d94 /wctdm.c | |
parent | b4b9c88ccd625d7840111159f42b72bcda883227 (diff) |
FXS fixes, ring debounce
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@191 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wctdm.c')
-rwxr-xr-x | wctdm.c | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -560,12 +560,12 @@ static int wcfxs_powerleak_test(struct wcfxs *wc, int card) /* Wait for one second */ origjiffies = jiffies; - while((vbat = wcfxs_getreg(wc, card, 82)) > 0x3) { - if ((jiffies - origjiffies) >= HZ) + while((vbat = wcfxs_getreg(wc, card, 82)) > 0x6) { + if ((jiffies - origjiffies) >= (HZ/2)) break;; } - if (vbat < 0x04) { + if (vbat < 0x06) { printk("Excessive leakage detected on module %d: %d volts (%02x) after %d ms\n", card, 376 * vbat / 1000, vbat, (int)((jiffies - origjiffies) * 1000 / HZ)); return -1; @@ -581,10 +581,10 @@ static int wcfxs_powerup_proslic(struct wcfxs *wc, int card) unsigned long origjiffies; /* Set period of DC-DC converter to 1/64 khz */ - wcfxs_setreg(wc, card, 92, 0xff); + wcfxs_setreg(wc, card, 92, 0x7f /* was 0xff */); /* Engage DC-DC converter */ - wcfxs_setreg(wc, card, 93, 0x19); + wcfxs_setreg(wc, card, 93, 0x99 /* was 0x19 */); /* Wait for VBat to powerup */ origjiffies = jiffies; @@ -599,10 +599,6 @@ static int wcfxs_powerup_proslic(struct wcfxs *wc, int card) } } -#if 0 - printk("jiffies - origjiffies: %d\n", ((int)(jiffies - origjiffies))); -#endif - if (vbat < 0xc0) { printk("ProSLIC on module %d failed to powerup within %d ms\n", card, (int)(((jiffies - origjiffies) * 1000 / HZ))); @@ -611,8 +607,10 @@ static int wcfxs_powerup_proslic(struct wcfxs *wc, int card) printk("ProSLIC on module %d powered up to -%d volts (%02x) in %d ms\n", card, vbat * 376 / 1000, vbat, (int)(((jiffies - origjiffies) * 1000 / HZ))); } + +#if 0 /* Perform DC-DC calibration */ - wcfxs_setreg(wc, card, 93, 0x80); + /* wcfxs_setreg(wc, card, 93, 0x80); */ origjiffies = jiffies; while(0x80 & wcfxs_getreg(wc, card, 93)) { @@ -631,6 +629,7 @@ static int wcfxs_powerup_proslic(struct wcfxs *wc, int card) printk("ProSLIC on module %d powered up to -%d volts (%02x) in %d ms\n", card, vbat * 376 / 1000, vbat, (int)(((jiffies - origjiffies) * 1000 / HZ))); #endif +#endif return 0; } |