From 8ad434c95444cf438845f57b2c63ba4114ee1e5e Mon Sep 17 00:00:00 2001 From: markster Date: Mon, 21 Jun 2004 21:54:15 +0000 Subject: Add special check for R19 calibration git-svn-id: http://svn.digium.com/svn/zaptel/trunk@417 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wctdm.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'wctdm.c') diff --git a/wctdm.c b/wctdm.c index 251443d..a1c851f 100755 --- a/wctdm.c +++ b/wctdm.c @@ -810,6 +810,7 @@ static int wcfxs_proslic_powerleak_test(struct wcfxs *wc, int card) static int wcfxs_powerup_proslic(struct wcfxs *wc, int card, int fast) { unsigned char vbat; + unsigned char r19; unsigned long origjiffies; /* Set period of DC-DC converter to 1/64 khz */ @@ -845,6 +846,13 @@ static int wcfxs_powerup_proslic(struct wcfxs *wc, int card, int fast) /* Engage DC-DC converter */ wcfxs_setreg(wc, card, 93, 0x99 /* was 0x19 */); + r19 = wcfxs_getreg(wc, card, 107); + if ((r19 < 0x2) || (r19 > 0xd)) { + if (debug) + printk("DC-DC cal has a surprising direct 107 of 0x%02x!\n", r19); + wcfxs_setreg(wc, card, 107, 0x8); + } + #if 0 origjiffies = jiffies; while(0x80 & wcfxs_getreg(wc, card, 93)) { -- cgit v1.2.3