summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/xbus-sysfs.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-03-01 13:56:23 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-03-01 13:56:23 +0000
commit5a1966ad819b54d21cbd552da66cbc6c4711f574 (patch)
tree34c04ea112c9587bbad7e0593119c09a53c43466 /drivers/dahdi/xpp/xbus-sysfs.c
parent6dea2614a38f79eccbe8de2c179aac33d15cbbb1 (diff)
New XPP code: xpp rev 6795:
* Fix cases where the command_queue overflowed during initialization. - Also add a 'command_queue_length' parameter to xpp.ko * More migrations to sysfs: - Add a 'transport' attribute to our astribank devices which points to the usb device we use. E.g: /sys/bus/astribanks/devices/xbus-00/transport is symlinked to ../../../../../../devices/pci0000:00/0000:00:10.4/usb5/5-4 - Move /proc/xpp/XBUS-??/XPD-??/span to /sys/bus/xpds/devices/??:?:?/span - Migrate from /proc/xpp/sync to: /sys/bus/astribanks/drivers/xppdrv/sync - New 'offhook' attribute in: /sys/bus/xpds/devices/??:?:?/offhook * PRI: change the "timing" priority to match the convention used by other PRI cards -- I.e: lower numbers (not 0) have higher priority. * FXO: - Power denial: create two module parameters instead of hard-coded constants (power_denial_safezone, power_denial_minlen). For sites that get non-standard power-denial signals from central office on offhook. - Don't hangup on power-denial, just notify Dahdi and wait for - Fix caller-id detection for the case central office sends it before first ring without any indication before. Asterisk's desicion. * USB_FW.hex: - Fixes cases where firmware loading would fail. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6046 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/xbus-sysfs.c')
-rw-r--r--drivers/dahdi/xpp/xbus-sysfs.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/dahdi/xpp/xbus-sysfs.c b/drivers/dahdi/xpp/xbus-sysfs.c
index 1094a19..67c4c28 100644
--- a/drivers/dahdi/xpp/xbus-sysfs.c
+++ b/drivers/dahdi/xpp/xbus-sysfs.c
@@ -612,6 +612,26 @@ static DEVICE_ATTR_READER(type_show, dev, buf)
return len;
}
+static DEVICE_ATTR_READER(offhook_show, dev, buf)
+{
+ xpd_t *xpd;
+ int len = 0;
+ int i;
+
+ BUG_ON(!dev);
+ xpd = dev_to_xpd(dev);
+ if(!xpd)
+ return -ENODEV;
+ for_each_line(xpd, i) {
+ len += sprintf(buf + len, "%d ", IS_OFFHOOK(xpd, i));
+ }
+ if(len) {
+ len--; /* backout last space */
+ len += sprintf(buf + len, "\n");
+ }
+ return len;
+}
+
static int xpd_match(struct device *dev, struct device_driver *driver)
{
struct xpd_driver *xpd_driver;
@@ -634,6 +654,7 @@ static struct device_attribute xpd_dev_attrs[] = {
__ATTR(blink, S_IRUGO | S_IWUSR, blink_show, blink_store),
__ATTR(span, S_IRUGO | S_IWUSR, span_show, span_store),
__ATTR_RO(type),
+ __ATTR_RO(offhook),
__ATTR_NULL,
};