summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2014-07-02 14:40:10 -0500
committerJesse Gilles <jgilles@multitech.com>2014-07-02 14:40:10 -0500
commitcc6b81f77f8b7d5a68a7fa3dc2aacdca0f2f5c13 (patch)
treee787a0b4a1239278bfae3c59edf873a947e9ade7
parentf8a371233d759309cd58672192294180c7f8842e (diff)
downloadcdp-io-controller-cc6b81f77f8b7d5a68a7fa3dc2aacdca0f2f5c13.tar.gz
cdp-io-controller-cc6b81f77f8b7d5a68a7fa3dc2aacdca0f2f5c13.tar.bz2
cdp-io-controller-cc6b81f77f8b7d5a68a7fa3dc2aacdca0f2f5c13.zip
rename daughter card to accessory card
-rw-r--r--io-module/mts_io.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index e578941..3bb0b2b 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -59,7 +59,7 @@
extern uint8_t mts_id_eeprom[512];
static struct mts_id_eeprom_layout id_eeprom;
-/* daughter card EEPROM */
+/* accessory card EEPROM */
#ifdef MTOCGD2
extern uint8_t mts_dc_eeprom[512];
#else
@@ -67,8 +67,8 @@ uint8_t mts_dc_eeprom[512] = {};
#endif
static struct mts_dc_eeprom_layout dc_eeprom;
-bool daughter_card_capable = false;
-bool has_daughter_card = false;
+bool accessory_card_capable = false;
+bool has_accessory_card = false;
static uint8_t mts_product_id;
static uint8_t mts_dc_product_id;
@@ -413,21 +413,21 @@ static int mts_dc_eeprom_load(void)
memcpy(&dc_eeprom, mts_dc_eeprom, sizeof(mts_dc_eeprom));
if (mts_dc_eeprom[0] == 0xFF) {
- log_error("uninitialized eeprom on daughter card");
+ log_error("uninitialized eeprom on accessory card");
return -EIO;
} else if (mts_dc_eeprom[0] == 0x00) {
- log_info("no daughter card inserted");
+ log_info("no accessory card inserted");
return 0;
}
- has_daughter_card = true;
+ has_accessory_card = true;
- log_info("daughter card vendor-id: %.32s", dc_eeprom.vendor_id);
- log_info("daughter card product-id: %.32s", dc_eeprom.product_id);
- log_info("daughter card device-id: %.32s", dc_eeprom.device_id);
- log_info("daughter card hw-version: %.32s", dc_eeprom.hw_version);
+ log_info("accessory card vendor-id: %.32s", dc_eeprom.vendor_id);
+ log_info("accessory card product-id: %.32s", dc_eeprom.product_id);
+ log_info("accessory card device-id: %.32s", dc_eeprom.device_id);
+ log_info("accessory card hw-version: %.32s", dc_eeprom.hw_version);
/* TODO: only show the mac address if this is the ethernet card */
- log_info("daughter card mac-addr: %02X:%02X:%02X:%02X:%02X:%02X",
+ log_info("accessory card mac-addr: %02X:%02X:%02X:%02X:%02X:%02X",
dc_eeprom.mac_addr[0],
dc_eeprom.mac_addr[1],
dc_eeprom.mac_addr[2],
@@ -478,7 +478,7 @@ static int mts_id_eeprom_load(void)
attr_group = &mtr2_platform_attribute_group;
gpio_pins = gpio_pins_mtr2_0_0;
mts_product_id = MTR2_0_0;
- daughter_card_capable = true;
+ accessory_card_capable = true;
has_spi_sout = 0;
has_spi_din = 0;
has_spi_dout = 0;
@@ -506,7 +506,7 @@ static int mts_id_eeprom_load(void)
attr_group = &mtr2_platform_attribute_group;
gpio_pins = gpio_pins_mtr2_0_0;
mts_product_id = MTOCGD2_0_0;
- daughter_card_capable = true;
+ accessory_card_capable = true;
has_spi_sout = 0;
has_spi_din = 0;
has_spi_dout = 0;
@@ -592,45 +592,45 @@ static int __init mts_io_init(void)
goto error1;
}
- if (daughter_card_capable) {
+ if (accessory_card_capable) {
mts_dc_product_id = MTDC_NONE;
ret = mts_dc_eeprom_load();
if (ret) {
- /* error reading the EEPROM from the daughter card */
- log_error("error reading daughter card eeprom: %d", ret);
- log_error("unable to initialize daughter card");
+ /* error reading the EEPROM from the accessory card */
+ log_error("error reading accessory card eeprom: %d", ret);
+ log_error("unable to initialize accessory card");
goto error1;
- } else if (has_daughter_card) {
- /* no error and we have a daughter card */
+ } else if (has_accessory_card) {
+ /* no error and we have a accessory card */
if (strstr(dc_eeprom.product_id, PRODUCT_ID_MTDC_GPIOB)) {
mts_dc_product_id = MTDC_GPIOB_0_0;
}
switch(mts_dc_product_id) {
case MTDC_GPIOB_0_0:
- log_debug("adding GPIO daughter card attributes");
- if (! mtr2_add_daughter_card_attributes()) {
- log_error("failed to add GPIO daughter card attributes");
+ log_debug("adding GPIO accessory card attributes");
+ if (! mtr2_add_accessory_card_attributes()) {
+ log_error("failed to add GPIO accessory card attributes");
goto error1;
} else {
- log_info("successfully added GPIO daughter card attributes");
+ log_info("successfully added GPIO accessory card attributes");
}
- log_debug("registering daughter card dout driver");
+ log_debug("registering accessory card dout driver");
ret = spi_register_driver(&mts_spi_dc_dout_driver);
if (ret) {
log_error("failed to register dc dout driver");
spi_unregister_driver(&mts_spi_dc_dout_driver);
goto error1;
}
- log_debug("registering daughter card din driver");
+ log_debug("registering accessory card din driver");
ret = spi_register_driver(&mts_spi_dc_din_driver);
if (ret) {
log_error("failed to register dc din driver");
spi_unregister_driver(&mts_spi_dc_din_driver);
goto error1;
}
- log_debug("registering daughter card adc driver");
+ log_debug("registering accessory card adc driver");
ret = spi_register_driver(&mts_spi_dc_adc_driver);
if (ret) {
log_error("failed to register dc adc driver");
@@ -640,7 +640,7 @@ static int __init mts_io_init(void)
break;
default:
- log_info("daughter card '%s' currently unsupported", dc_eeprom.product_id);
+ log_info("accessory card '%s' currently unsupported", dc_eeprom.product_id);
}
}
}
@@ -795,7 +795,7 @@ static void __exit mts_io_exit(void)
if (has_spi_sout)
spi_unregister_driver(&mts_spi_sout_driver);
- if (has_daughter_card) {
+ if (has_accessory_card) {
switch (mts_dc_product_id) {
case MTDC_GPIOB_0_0:
spi_unregister_driver(&mts_spi_dc_dout_driver);