summaryrefslogtreecommitdiff
path: root/io-module
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2013-05-01 12:16:51 -0500
committerMike Fiore <mfiore@multitech.com>2013-05-01 12:16:51 -0500
commitf8421437524cbba156e63c2fa04d1b641d963d48 (patch)
treee8d02d1a1c9bd9018acf4b8e7e78258854d61429 /io-module
parent49b27c48f56a2d772676963f4c0f9c16eac78c7f (diff)
downloadmts-io-f8421437524cbba156e63c2fa04d1b641d963d48.tar.gz
mts-io-f8421437524cbba156e63c2fa04d1b641d963d48.tar.bz2
mts-io-f8421437524cbba156e63c2fa04d1b641d963d48.zip
add mtocgd product id and hw version, support to detect board type in init code
Diffstat (limited to 'io-module')
-rw-r--r--io-module/mts_io.c9
-rw-r--r--io-module/mts_io.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index b20a5f8..1cae937 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -2390,6 +2390,15 @@ static int mts_id_eeprom_load(void)
has_spi_dout = 0;
has_spi_temp = 1;
log_info("detected board %s", HW_VERSION_MTOCGD3_0_0);
+ } else if (strncmp(id_eeprom.hw_version, HW_VERSION_MTOCGD_0_0, strlen(HW_VERSION_MTOCGD_0_0)) == 0) {
+ attr_group = &mtr_platform_attribute_group;
+ gpio_pins = gpio_pins_mtr_0_0;
+ mts_product_id = MTOCGD_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_MTOCGD_0_0);
} else {
attr_group = &mtcdp_platform_attribute_group;
gpio_pins = gpio_pins_mtcdp_1_0;
diff --git a/io-module/mts_io.h b/io-module/mts_io.h
index 4d6a1bd..43106cb 100644
--- a/io-module/mts_io.h
+++ b/io-module/mts_io.h
@@ -31,6 +31,7 @@ struct device_attribute _dev_name = { \
#define PRODUCT_ID_MTR2 "MTR2"
#define PRODUCT_ID_MTR "MTR"
#define PRODUCT_ID_MTOCGD3 "MTOCGD3"
+#define PRODUCT_ID_MTOCGD "MTOCGD"
#define HW_VERSION_MTCBA2_2_0 "MTCBA2-2.0"
#define HW_VERSION_MTCDP_0_0 "MTCDP-0.0"
@@ -39,6 +40,7 @@ struct device_attribute _dev_name = { \
#define HW_VERSION_MTR2_0_0 "MTR2-0.0"
#define HW_VERSION_MTR_0_0 "MTR-0.0"
#define HW_VERSION_MTOCGD3_0_0 "MTOCGD3-0.0"
+#define HW_VERSION_MTOCGD_0_0 "MTOCGD-0.0"
enum {
MTCDP_E1_DK_0_0,
@@ -47,6 +49,7 @@ enum {
MTR2_0_0,
MTR_0_0,
MTOCGD3_0_0,
+ MTOCGD_0_0,
};
#define DEVICE_CAPA_INDEX(c) (((c) & 0xFF) >> 3)