From f8421437524cbba156e63c2fa04d1b641d963d48 Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Wed, 1 May 2013 12:16:51 -0500 Subject: add mtocgd product id and hw version, support to detect board type in init code --- io-module/mts_io.c | 9 +++++++++ io-module/mts_io.h | 3 +++ 2 files changed, 12 insertions(+) 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) -- cgit v1.2.3