summaryrefslogtreecommitdiff
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-19 08:19:30 -0500
commitef8a1a190b8f014364d69e2ab537df17c46e20c7 (patch)
tree1a85a201d90127796bfecd41d4ac7052759e59e3
parenta54b1cd7fc65ebb14c14c3ea294005f970403bf0 (diff)
downloadmts-io-ef8a1a190b8f014364d69e2ab537df17c46e20c7.tar.gz
mts-io-ef8a1a190b8f014364d69e2ab537df17c46e20c7.tar.bz2
mts-io-ef8a1a190b8f014364d69e2ab537df17c46e20c7.zip
Bring mts_io level up to match package name
-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;