summaryrefslogtreecommitdiff
path: root/io-module
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2018-04-16 15:07:24 -0500
committerJohn Klug <john.klug@multitech.com>2018-04-16 15:07:24 -0500
commite7040f65cbb2b275ee25eff79fef9a1bcdf23dbe (patch)
tree1a85a201d90127796bfecd41d4ac7052759e59e3 /io-module
parentc815406100fbb3e3d18a825d3148838cc3caf72b (diff)
downloadmts-io-e7040f65cbb2b275ee25eff79fef9a1bcdf23dbe.tar.gz
mts-io-e7040f65cbb2b275ee25eff79fef9a1bcdf23dbe.tar.bz2
mts-io-e7040f65cbb2b275ee25eff79fef9a1bcdf23dbe.zip
Bring mts_io level up to match package name
Diffstat (limited to 'io-module')
-rw-r--r--io-module/mts_io.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index d2e36c3..14029a3 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -47,7 +47,7 @@
#include "mts_io.h"
-#define DRIVER_VERSION "v1.6.0"
+#define DRIVER_VERSION "v2.0.0"
#define DRIVER_AUTHOR "James Maki <jmaki@multitech.com>"
#define DRIVER_DESC "MTS-IO Controller"
#define DRIVER_NAME "mts-io"
@@ -910,7 +910,7 @@ mts_id_eeprom_load(void)
}
if((strncmp(id_eeprom.product_id, PRODUCT_ID_MTCDT, sizeof PRODUCT_ID_MTCDT - 1) == 0) &&
- (id_eeprom.product_id[sizeof PRODUCT_ID_MTCDT] == '-') &&
+ (id_eeprom.product_id[sizeof PRODUCT_ID_MTCDT-1] == '-') &&
isdigit(id_eeprom.product_id[sizeof PRODUCT_ID_MTCDT])) {
struct attribute **ap = mtcdt_0_1_platform_attribute_group.attrs;
while(1) {
@@ -983,6 +983,24 @@ mts_id_eeprom_load(void)
}
log_info("detected board %s", tmp);
} else {
+ if((strncmp(id_eeprom.product_id, PRODUCT_ID_MTCDT, sizeof PRODUCT_ID_MTCDT - 1) == 0) &&
+ (id_eeprom.product_id[sizeof PRODUCT_ID_MTCDT-1] == '-') &&
+ isdigit(id_eeprom.product_id[sizeof PRODUCT_ID_MTCDT])) {
+ struct attribute **ap = mtcdt_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_mtcdt(ap[j])) {
+ log_info("Pruning radio feature from mts-io",j);
+ ap[j] = NULL;
+ break;
+ }
+ }
+ }
+
attr_group = &mtcdt_platform_attribute_group;
gpio_pins = gpio_pins_mtcdt_0_0;
mts_hw_version = MTCDT_0_0;