summaryrefslogtreecommitdiff
path: root/io-module/mtcdt.c
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2018-04-02 18:21:34 -0500
committerJohn Klug <john.klug@multitech.com>2018-04-02 18:21:34 -0500
commitbf97eddfe29544407203edd9d46466e9e3601839 (patch)
tree1e2cb2edae44046ba9ce38019ee56b101d9e51aa /io-module/mtcdt.c
parentf133877e95a786f511a074c820e169a595eec10b (diff)
downloadmts-io-bf97eddfe29544407203edd9d46466e9e3601839.tar.gz
mts-io-bf97eddfe29544407203edd9d46466e9e3601839.tar.bz2
mts-io-bf97eddfe29544407203edd9d46466e9e3601839.zip
Add support for MTCDTIPHP hardware version
Diffstat (limited to 'io-module/mtcdt.c')
-rw-r--r--io-module/mtcdt.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/io-module/mtcdt.c b/io-module/mtcdt.c
index 048e11c..b84e67a 100644
--- a/io-module/mtcdt.c
+++ b/io-module/mtcdt.c
@@ -714,12 +714,6 @@ static struct attribute *mtcdt_0_1_platform_attributes[] = {
&dev_attr_reset.attr,
&dev_attr_reset_monitor.attr,
&dev_attr_reset_monitor_intervals.attr,
- &dev_attr_radio_power.attr,
- &dev_attr_radio_reset.attr,
-
- &dev_attr_radio_reset_backoffs.attr,
- &dev_attr_radio_reset_backoff_index.attr,
- &dev_attr_radio_reset_backoff_seconds.attr,
&dev_attr_led_status.attr,
&dev_attr_led_cd_gpio.attr,
@@ -734,6 +728,18 @@ static struct attribute *mtcdt_0_1_platform_attributes[] = {
&dev_attr_usbhub_reset.attr,
&dev_attr_eth_reset.attr,
+
+ // radio feature is last to be able to
+ // easily remove radio.
+ // is_radio_power_attr_mtcdt() truncates
+ // this list.
+ &dev_attr_radio_power.attr,
+ &dev_attr_radio_reset.attr,
+
+ &dev_attr_radio_reset_backoffs.attr,
+ &dev_attr_radio_reset_backoff_index.attr,
+ &dev_attr_radio_reset_backoff_seconds.attr,
+
NULL,
};
@@ -757,3 +763,10 @@ static struct attribute_group mtcdt_platform_attribute_group = {
static struct attribute_group mtcdt_0_1_platform_attribute_group = {
.attrs = mtcdt_0_1_platform_attributes
};
+
+
+static int
+is_radio_power_attr_mtcdt(struct attribute *attr)
+{
+ return (attr == &dev_attr_radio_power.attr);
+} \ No newline at end of file