[dahdi-commits] dahdi/linux.git branch "master" updated.
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Jan 28 12:26:21 CST 2014
branch "master" has been updated
via 02f6b4e7bd0481f452a3aaaa62f51c57bbc7b4f1 (commit)
via 701ed41adf5a1d6f45c61c5fac4ad70457fc4fa9 (commit)
via 03b3ce1a107c4926038931b38894290c074d9e5f (commit)
from 2c4373972b7ff90ac4e69f26261a4bff69e56837 (commit)
Summary of changes:
README | 15 ++++++++++-----
drivers/dahdi/dahdi-base.c | 2 ++
drivers/dahdi/dahdi-sysfs.c | 14 ++++++++++++++
include/dahdi/kernel.h | 1 +
4 files changed, 27 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit 02f6b4e7bd0481f452a3aaaa62f51c57bbc7b4f1
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date: Tue Jan 28 20:24:40 2014 +0200
README: The sysfs class now includes no channels
Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
diff --git a/README b/README
index 5d9d660..e95d380 100644
--- a/README
+++ b/README
@@ -897,11 +897,12 @@ to other nodes.
Class DAHDI
^^^^^^^^^^^
-under /sys/class/dadhi there exists a node for each DAHDI device file
-under /dev/dahdi. The name is 'dahdi!foo' for the file '/dev/dahdi/foo'
-(udev translates exclamation marks to slashes). Those nodes are not, for
-the most part, proper SysFS nodes, and don't include any interesting
-properties.
+Under /sys/class/dadhi there exists a node for the non-channel DAHDI
+device file under /dev/dahdi. The name is 'dahdi!foo' for the file
+'/dev/dahdi/foo' (udev translates exclamation marks to slashes). Those
+nodes are not, for the most part, proper SysFS nodes, and don't include
+any interesting properties. The files in this class `ctl`, `timer`,
+`channel`, `pseudo` and (if exists) `transcode`.
Devices Bus
commit 701ed41adf5a1d6f45c61c5fac4ad70457fc4fa9
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date: Tue Jan 28 20:17:26 2014 +0200
README: the new registration_time device attribute
Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
diff --git a/README b/README
index 224711b..5d9d660 100644
--- a/README
+++ b/README
@@ -926,6 +926,10 @@ A unique hardware-level identifier (e.g. serial number), if available.
===== /sys/bus/dahdi_devices/devices/DEVICE/manufacturer
The name of the manufacturer. Freeform-string.
+===== /sys/bus/dahdi_devices/devices/DEVICE/registration_time
+The time at which the device registered with the DAHDI core. Example
+value: "0005634136.941901429".
+
===== /sys/bus/dahdi_devices/devices/DEVICE/spantype
A line for each available span: <num>:<type>. This has to be provided
here as in the case of manual assignment, userspace may need to know
commit 03b3ce1a107c4926038931b38894290c074d9e5f
Author: Oron Peled <oron.peled at xorcom.com>
Date: Sun Jan 26 17:27:49 2014 +0200
sysfs: new device attribute: registration_time
Add a new sysfs attribute to dahdi_device: registration_time
* Records the time of the device's registration with DAHDI.
* Used by dahdi_auto_assign_compat to assign spans by device
registration order when backward compatibility needed.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Acked-by: Shaun Ruffell <sruffell at digium.com>
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 8bba465..c7d0607 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -50,6 +50,7 @@
#include <linux/list.h>
#include <linux/delay.h>
#include <linux/mutex.h>
+#include <linux/time.h>
#if defined(HAVE_UNLOCKED_IOCTL) && defined(CONFIG_BKL)
#include <linux/smp_lock.h>
@@ -7404,6 +7405,7 @@ static int _dahdi_register_device(struct dahdi_device *ddev,
__dahdi_init_span(s);
}
+ getnstimeofday(&ddev->registration_time);
ret = dahdi_sysfs_add_device(ddev, parent);
if (ret)
return ret;
diff --git a/drivers/dahdi/dahdi-sysfs.c b/drivers/dahdi/dahdi-sysfs.c
index fea0cc1..7cd26e3 100644
--- a/drivers/dahdi/dahdi-sysfs.c
+++ b/drivers/dahdi/dahdi-sysfs.c
@@ -677,6 +677,19 @@ dahdi_spantype_store(struct device *dev, struct device_attribute *attr,
return (ret < 0) ? ret : count;
}
+static ssize_t
+dahdi_registration_time_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct dahdi_device *ddev = to_ddev(dev);
+ int count = 0;
+
+ count += sprintf(buf, "%010ld.%09ld\n",
+ ddev->registration_time.tv_sec,
+ ddev->registration_time.tv_nsec);
+ return count;
+}
+
static struct device_attribute dahdi_device_attrs[] = {
__ATTR(manufacturer, S_IRUGO, dahdi_device_manufacturer_show, NULL),
__ATTR(type, S_IRUGO, dahdi_device_type_show, NULL),
@@ -688,6 +701,7 @@ static struct device_attribute dahdi_device_attrs[] = {
__ATTR(unassign_span, S_IWUSR, NULL, dahdi_device_unassign_span),
__ATTR(spantype, S_IWUSR | S_IRUGO, dahdi_spantype_show,
dahdi_spantype_store),
+ __ATTR(registration_time, S_IRUGO, dahdi_registration_time_show, NULL),
__ATTR_NULL,
};
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
index eef65a9..dabd123 100644
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -941,6 +941,7 @@ struct dahdi_device {
const char *devicetype;
struct device dev;
unsigned int irqmisses;
+ struct timespec registration_time;
};
struct dahdi_span {
-----------------------------------------------------------------------
--
dahdi/linux.git
More information about the dahdi-commits
mailing list