diff options
author | John Klug <john.klug@multitech.com> | 2018-05-17 12:22:16 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2018-05-17 12:22:16 -0500 |
commit | 22ab73a75654edc33def4cf715791ead698e28bc (patch) | |
tree | a900252e30259d8f04873cf85b9674a02799a7b8 /io-module/mts_io.c | |
parent | 82c9e9423edbe17a768202a10f4aab0fffdd3849 (diff) | |
download | mts-io-22ab73a75654edc33def4cf715791ead698e28bc.tar.gz mts-io-22ab73a75654edc33def4cf715791ead698e28bc.tar.bz2 mts-io-22ab73a75654edc33def4cf715791ead698e28bc.zip |
Add cat-m WM-LINK-MON as adio-wm-lk-m for CAT-M cellular2.0.4
Diffstat (limited to 'io-module/mts_io.c')
-rw-r--r-- | io-module/mts_io.c | 84 |
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; |