From e7040f65cbb2b275ee25eff79fef9a1bcdf23dbe Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 16 Apr 2018 15:07:24 -0500 Subject: Bring mts_io level up to match package name --- io-module/mts_io.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'io-module') 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 " #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; -- cgit v1.2.3