summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwcfxs.c20
-rwxr-xr-xwctdm.c20
2 files changed, 20 insertions, 20 deletions
diff --git a/wcfxs.c b/wcfxs.c
index a1c851f..c41a4f7 100755
--- a/wcfxs.c
+++ b/wcfxs.c
@@ -810,7 +810,6 @@ 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 */
@@ -844,15 +843,7 @@ 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);
- }
-
+ wcfxs_setreg(wc, card, 93, 0x19 /* was 0x19 */);
#if 0
origjiffies = jiffies;
while(0x80 & wcfxs_getreg(wc, card, 93)) {
@@ -1040,6 +1031,7 @@ static int wcfxs_init_proslic(struct wcfxs *wc, int card, int fast, int manual,
{
unsigned short tmp[5];
+ unsigned char r19;
int x;
/* By default, don't send on hook */
@@ -1121,6 +1113,14 @@ static int wcfxs_init_proslic(struct wcfxs *wc, int card, int fast, int manual,
printk("Proslic Passed Auto Calibration on Second Attempt\n");
}
}
+ /* Perform DC-DC calibration */
+ wcfxs_setreg(wc, card, 93, 0x99);
+ r19 = wcfxs_getreg(wc, card, 107);
+ if ((r19 < 0x2) || (r19 > 0xd)) {
+ printk("DC-DC cal has a surprising direct 107 of 0x%02x!\n", r19);
+ wcfxs_setreg(wc, card, 107, 0x8);
+ }
+
/* Save calibration vectors */
for (x=0;x<NUM_CAL_REGS;x++)
wc->mod.fxs.calregs[card].vals[x] = wcfxs_getreg(wc, card, 96 + x);
diff --git a/wctdm.c b/wctdm.c
index a1c851f..c41a4f7 100755
--- a/wctdm.c
+++ b/wctdm.c
@@ -810,7 +810,6 @@ 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 */
@@ -844,15 +843,7 @@ 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);
- }
-
+ wcfxs_setreg(wc, card, 93, 0x19 /* was 0x19 */);
#if 0
origjiffies = jiffies;
while(0x80 & wcfxs_getreg(wc, card, 93)) {
@@ -1040,6 +1031,7 @@ static int wcfxs_init_proslic(struct wcfxs *wc, int card, int fast, int manual,
{
unsigned short tmp[5];
+ unsigned char r19;
int x;
/* By default, don't send on hook */
@@ -1121,6 +1113,14 @@ static int wcfxs_init_proslic(struct wcfxs *wc, int card, int fast, int manual,
printk("Proslic Passed Auto Calibration on Second Attempt\n");
}
}
+ /* Perform DC-DC calibration */
+ wcfxs_setreg(wc, card, 93, 0x99);
+ r19 = wcfxs_getreg(wc, card, 107);
+ if ((r19 < 0x2) || (r19 > 0xd)) {
+ printk("DC-DC cal has a surprising direct 107 of 0x%02x!\n", r19);
+ wcfxs_setreg(wc, card, 107, 0x8);
+ }
+
/* Save calibration vectors */
for (x=0;x<NUM_CAL_REGS;x++)
wc->mod.fxs.calregs[card].vals[x] = wcfxs_getreg(wc, card, 96 + x);