diff options
author | Jesse Gilles <jgilles@multitech.com> | 2014-09-04 13:38:01 -0500 |
---|---|---|
committer | Jesse Gilles <jgilles@multitech.com> | 2014-09-04 13:38:01 -0500 |
commit | 5503d316c26d664117ff899c0dece6efc5ea7077 (patch) | |
tree | f37a8b7b4829162478cc3d05416baf6ae0786c3c /io-module/mts_io.c | |
parent | fc543eac11fbeb87fe226b8f7921725c4139bb33 (diff) | |
download | mts-io-5503d316c26d664117ff899c0dece6efc5ea7077.tar.gz mts-io-5503d316c26d664117ff899c0dece6efc5ea7077.tar.bz2 mts-io-5503d316c26d664117ff899c0dece6efc5ea7077.zip |
add support for MTAC-MFSER
Diffstat (limited to 'io-module/mts_io.c')
-rw-r--r-- | io-module/mts_io.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c index b63a756..2ecc636 100644 --- a/io-module/mts_io.c +++ b/io-module/mts_io.c @@ -99,6 +99,7 @@ static DEFINE_MUTEX(mts_io_mutex); /* accessory card support */ #include "mtdc_gpiob.c" +#include "mtac_mfser.c" /* telit radio reset handling */ #include "telit_radio.c" @@ -440,6 +441,10 @@ static bool add_accessory_card_attributes(int slot) card_attrs_size = ap1_gpio_attributes_size; card_attrs = ap1_gpio_attributes; break; + case MTAC_MFSER_0_0: + card_attrs_size = ap1_mfser_attributes_size; + card_attrs = ap1_mfser_attributes; + break; default: log_error("accessory card %s isn't supported", ap1_eeprom.hw_version); return false; @@ -450,6 +455,10 @@ static bool add_accessory_card_attributes(int slot) card_attrs_size = ap2_gpio_attributes_size; card_attrs = ap2_gpio_attributes; break; + case MTAC_MFSER_0_0: + card_attrs_size = ap2_mfser_attributes_size; + card_attrs = ap2_mfser_attributes; + break; default: log_error("accessory card %s isn't supported", ap2_eeprom.hw_version); return false; @@ -715,7 +724,10 @@ static int __init mts_io_init(void) // more elegant way to handle this? if (strstr(ap1_eeprom.product_id, PRODUCT_ID_MTDC_GPIOB)) { mts_ap1_product_id = MTDC_GPIOB_0_0; - } // else if (...) { } + } + else if (strstr(ap1_eeprom.product_id, PRODUCT_ID_MTAC_MFSER)) { + mts_ap1_product_id = MTAC_MFSER_0_0; + } switch(mts_ap1_product_id) { case MTDC_GPIOB_0_0: @@ -747,6 +759,14 @@ static int __init mts_io_init(void) goto error1; } break; + case MTAC_MFSER_0_0: + log_info("loading MFSER accessory card in slot 1"); + if (! add_accessory_card_attributes(1)) { + log_error("failed to load MFSER accessory card in slot 1"); + } else { + log_info("successfully loaded MFSER accessory card in slot 1"); + } + break; default: log_error("accessory card %s unsupported", ap1_eeprom.product_id); @@ -757,7 +777,10 @@ static int __init mts_io_init(void) // more elegant way to handle this? if (strstr(ap2_eeprom.product_id, PRODUCT_ID_MTDC_GPIOB)) { mts_ap2_product_id = MTDC_GPIOB_0_0; - } // else if (...) { } + } + else if (strstr(ap2_eeprom.product_id, PRODUCT_ID_MTAC_MFSER)) { + mts_ap2_product_id = MTAC_MFSER_0_0; + } switch(mts_ap2_product_id) { case MTDC_GPIOB_0_0: @@ -789,6 +812,14 @@ static int __init mts_io_init(void) goto error1; } break; + case MTAC_MFSER_0_0: + log_info("loading MFSER accessory card in slot 2"); + if (! add_accessory_card_attributes(2)) { + log_error("failed to load MFSER accessory card in slot 2"); + } else { + log_info("successfully loaded MFSER accessory card in slot 2"); + } + break; default: log_error("accessory card %s unsupported", ap1_eeprom.product_id); |