summaryrefslogtreecommitdiff
path: root/io-module/mts_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io-module/mts_io.c')
-rw-r--r--io-module/mts_io.c84
1 files changed, 10 insertions, 74 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index 3310208..d360256 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -47,7 +47,7 @@
#include "mts_io.h"
-#define DRIVER_VERSION "v2.0.3"
+#define DRIVER_VERSION "v2.0.4"
#define DRIVER_AUTHOR "James Maki <jmaki@multitech.com>"
#define DRIVER_DESC "MTS-IO Controller"
#define DRIVER_NAME "mts-io"
@@ -926,94 +926,30 @@ mts_id_eeprom_load(void)
}
log_info("detected board %s", tmp);
} else if (strncmp(id_eeprom.hw_version, HW_VERSION_MTR_0_0, strlen(HW_VERSION_MTR_0_0)) == 0) {
- if(noradio) {
- struct attribute **ap = mtcap_0_0_platform_attribute_group.attrs;
- while(1) {
- if(ap[j] == NULL) {
- log_info("Did not find radio power attribute. Possible driver fault.");
- break;
- }
- j++;
- if (is_radio_power_attr_mtr(ap[j])) {
- log_info("Pruning radio feature from mts-io",j);
- ap[j] = NULL;
- break;
- }
- }
- }
-
attr_group = &mtr_platform_attribute_group;
gpio_pins = gpio_pins_mtr_0_0;
mts_hw_version = MTR_0_0;
log_info("detected board %s", HW_VERSION_MTR_0_0);
} else if (strncmp(id_eeprom.hw_version, HW_VERSION_MTR_0_1, strlen(HW_VERSION_MTR_0_1)) == 0) {
- if(noradio) {
- struct attribute **ap = mtr_platform_attribute_group.attrs;
- while(1) {
- if(ap[j] == NULL) {
- log_info("Did not find radio power attribute. Possible driver fault.");
- break;
- }
- j++;
- if (is_radio_power_attr_mtr(ap[j])) {
- log_info("Pruning radio feature from mts-io",j);
- ap[j] = NULL;
- break;
- }
- }
- }
-
attr_group = &mtr_platform_attribute_group;
gpio_pins = gpio_pins_mtr_0_1;
mts_hw_version = MTR_0_1;
log_info("detected board %s", HW_VERSION_MTR_0_1);
} else if (strncmp(id_eeprom.hw_version, HW_VERSION_MTRV1_0_0, strlen(HW_VERSION_MTRV1_0_0)) == 0) {
- if(noradio) {
- struct attribute **ap = mtr_platform_attribute_group.attrs;
- while(1) {
- if(ap[j] == NULL) {
- log_info("Did not find radio power attribute. Possible driver fault.");
- break;
- }
- j++;
- if (is_radio_power_attr_mtr(ap[j])) {
- log_info("Pruning radio feature from mts-io",j);
- ap[j] = NULL;
- break;
- }
- }
- }
-
- attr_group = &mtr_platform_attribute_group;
- gpio_pins = gpio_pins_mtrv1_0_0;
- mts_hw_version = MTRV1_0_0;
- log_info("detected board %s", HW_VERSION_MTRV1_0_0);
+ attr_group = &mtr_platform_attribute_group;
+ gpio_pins = gpio_pins_mtrv1_0_0;
+ mts_hw_version = MTRV1_0_0;
+ log_info("detected board %s", HW_VERSION_MTRV1_0_0);
} else if (strncmp(id_eeprom.hw_version, HW_VERSION_MTRV1_0_1, strlen(HW_VERSION_MTRV1_0_1)) == 0) {
- current_blength = attr_blength = sizeof mtrv1_0_1_platform_attributes;
- current_blength -= sizeof(struct attribute *); /* Length without terminating NULL */
-
- /* See if we have no radio, and if so, prune out the stuff that follows */
- if(noradio) {
- struct attribute **ap = mtrv1_0_1_platform_attribute_group.attrs;
- while(1) {
- if(ap[j] == NULL) {
- log_info("Did not find radio power attribute. Possible driver fault.");
- break;
- }
- j++;
- if (is_radio_power_attr_mtr(ap[j])) {
- log_info("Pruning radio feature from mts-io",j);
- ap[j] = NULL;
- current_blength = attr_blength = j * sizeof (ap[j]);
- break;
- }
- }
- }
-
attr_group = &mtrv1_0_1_platform_attribute_group;
gpio_pins = gpio_pins_mtrv1_0_1;
mts_hw_version = MTRV1_0_1;
log_info("detected board %s", HW_VERSION_MTRV1_0_1);
+ } else if (strncmp(id_eeprom.hw_version, HW_VERSION_MTRV1_0_2, strlen(HW_VERSION_MTRV1_0_2)) == 0) {
+ attr_group = &mtrv1_0_2_platform_attribute_group;
+ gpio_pins = gpio_pins_mtrv1_0_2;
+ mts_hw_version = MTRV1_0_2;
+ log_info("detected board %s", HW_VERSION_MTRV1_0_2);
} else if (((tmp=HW_VERSION_MTCDT_0_1),strncmp(id_eeprom.hw_version, tmp, strlen(tmp)) == 0) ||
((tmp=HW_VERSION_MTCDTIP_0_0),strncmp(id_eeprom.hw_version, tmp, strlen(tmp)) == 0)) {
current_blength = attr_blength = sizeof mtcdt_0_1_platform_attributes;