summaryrefslogtreecommitdiff
path: root/io-module
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2014-10-08 10:01:34 -0500
committerMike Fiore <mfiore@multitech.com>2014-10-08 10:01:34 -0500
commitb4e12fd5092d6de675da8c6a3629a23dcb5a34f2 (patch)
tree51e51ddf1b4603998b3d8c4419d81998ff2ea8a5 /io-module
parent13718072814328b8b119e3c30e4acf8607d62b28 (diff)
downloadmts-io-b4e12fd5092d6de675da8c6a3629a23dcb5a34f2.tar.gz
mts-io-b4e12fd5092d6de675da8c6a3629a23dcb5a34f2.tar.bz2
mts-io-b4e12fd5092d6de675da8c6a3629a23dcb5a34f2.zip
mts-io: make mtcdt only supported hardware
remove including of mtr.c, mtcdp.c, mt100eocg.c remove wifi related attributes
Diffstat (limited to 'io-module')
-rw-r--r--io-module/mts_io.c70
1 files changed, 1 insertions, 69 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index 048f96d..38d1086 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -377,14 +377,6 @@ static ssize_t mts_attr_show_product_info(struct device *dev,
value = sprintf(buf, "%.32s\n", id_eeprom.hw_version);
} else if (strcmp(attr->attr.name, "imei") == 0) {
value = sprintf(buf, "%.32s\n", id_eeprom.imei);
- } else if (strcmp(attr->attr.name, "mac-wifi") == 0) {
- value = sprintf(buf, "%02X:%02X:%02X:%02X:%02X:%02X\n",
- id_eeprom.mac_wifi[0],
- id_eeprom.mac_wifi[1],
- id_eeprom.mac_wifi[2],
- id_eeprom.mac_wifi[3],
- id_eeprom.mac_wifi[4],
- id_eeprom.mac_wifi[5]);
} else if (strcmp(attr->attr.name, "mac-eth") == 0) {
value = sprintf(buf, "%02X:%02X:%02X:%02X:%02X:%02X\n",
id_eeprom.mac_addr[0],
@@ -411,20 +403,12 @@ static DEVICE_ATTR_RO_MTS(dev_attr_hw_version, "hw-version",
mts_attr_show_product_info);
static DEVICE_ATTR_RO_MTS(dev_attr_imei, "imei",
mts_attr_show_product_info);
-static DEVICE_ATTR_RO_MTS(dev_attr_wifi_mac, "mac-wifi",
- mts_attr_show_product_info);
static DEVICE_ATTR_RO_MTS(dev_attr_eth_mac, "mac-eth",
mts_attr_show_product_info);
/* include per-device pins and attributes */
-#include "mtr.c"
#include "mtr2d2.c"
-/* currently not supported
-#include "mtcdp.c"
-#include "mt100eocg.c"
-*/
-
static bool load_port(int port) {
int port_index = port - 1;
memcpy(&ap_eeprom[port_index], mts_ap_eeprom[port_index], sizeof(mts_ap_eeprom[port_index]));
@@ -504,48 +488,7 @@ static int mts_id_eeprom_load(void)
if (mts_id_eeprom[0] == 0xFF) {
log_error("uninitialized eeprom");
return -EIO;
- /*
- } else if (mts_id_eeprom[0] == 0x00) {
- strncpy(id_eeprom.vendor_id, VENDOR_ID_MULTITECH, sizeof(id_eeprom.vendor_id) - 1);
- strncpy(id_eeprom.product_id, PRODUCT_ID_MTCDP_E1_DK, sizeof(id_eeprom.product_id) - 1);
- strncpy(id_eeprom.device_id, "", sizeof(id_eeprom.device_id) - 1);
- strncpy(id_eeprom.hw_version, HW_VERSION_MTCDP_0_0, sizeof(id_eeprom.hw_version) - 1);
-
- DEVICE_CAPA_SET(id_eeprom.capa, CAPA_GPS);
-
- attr_group = &mtcdp_platform_attribute_group;
- gpio_pins = gpio_pins_mtcdp_0_0;
- mts_product_id = MTCDP_E1_DK_0_0;
- log_info("detected board %s", HW_VERSION_MTCDP_0_0);
- } else if (strncmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG, strlen(PRODUCT_ID_MT100EOCG)) == 0) {
- attr_group = &mt100eocg_platform_attribute_group;
- gpio_pins = gpio_pins_mt100eocg_0_0;
- mts_product_id = MT100EOCG_0_0;
- has_spi_sout = 0;
- has_spi_din = 1;
- has_spi_dout = 1;
- has_spi_temp = 1;
- log_info("detected board %s", HW_VERSION_MT100EOCG_0_0);
- */
- } else if (strncmp(id_eeprom.hw_version, HW_VERSION_MTR_0_0, strlen(HW_VERSION_MTR_0_0)) == 0) {
- attr_group = &mtr_platform_attribute_group;
- gpio_pins = gpio_pins_mtr_0_0;
- mts_product_id = MTR_0_0;
- has_spi_sout = 0;
- has_spi_din = 0;
- has_spi_dout = 0;
- has_spi_temp = 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) {
- attr_group = &mtr_platform_attribute_group;
- gpio_pins = gpio_pins_mtr_0_1;
- mts_product_id = MTR_0_1;
- has_spi_sout = 0;
- has_spi_din = 0;
- has_spi_dout = 0;
- has_spi_temp = 0;
- log_info("detected board %s", HW_VERSION_MTR_0_1);
- } else if (strncmp(id_eeprom.hw_version, HW_VERSION_MTR2D2_0_0, strlen(HW_VERSION_MTR2D2_0_0)) == 0) {
+ } else {
attr_group = &mtr2d2_platform_attribute_group;
gpio_pins = gpio_pins_mtr2d2_0_0;
mts_product_id = MTR2D2_0_0;
@@ -554,17 +497,6 @@ static int mts_id_eeprom_load(void)
has_spi_dout = 0;
has_spi_temp = 0;
log_info("detected board %s", HW_VERSION_MTR2D2_0_0);
- /*
- } else {
- attr_group = &mtcdp_platform_attribute_group;
- gpio_pins = gpio_pins_mtcdp_1_0;
- mts_product_id = MTCDP_E1_DK_1_0;
- has_spi_sout = 1;
- has_spi_din = 1;
- has_spi_dout = 1;
- has_spi_temp = 1;
- log_info("detected board %s", HW_VERSION_MTCDP_1_0);
- */
}
log_info("sizeof: %lu", (unsigned long) sizeof(struct mts_id_eeprom_layout));