[svn-commits] sruffell: linux/trunk r5612 - /linux/trunk/drivers/dahdi/wctdm.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Dec 22 22:02:14 CST 2008


Author: sruffell
Date: Mon Dec 22 22:02:13 2008
New Revision: 5612

URL: http://svn.digium.com/view/dahdi?view=rev&rev=5612
Log:
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

Modified:
    linux/trunk/drivers/dahdi/wctdm.c

Modified: linux/trunk/drivers/dahdi/wctdm.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm.c?view=diff&rev=5612&r1=5611&r2=5612
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm.c (original)
+++ linux/trunk/drivers/dahdi/wctdm.c Mon Dec 22 22:02:13 2008
@@ -270,6 +270,7 @@
 
 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 @@
 
 	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 @@
 }
 
 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);




More information about the svn-commits mailing list