summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--io-module/mtdc_gpiob.c2
-rw-r--r--io-module/mtr2.c20
-rw-r--r--io-module/mts_io.c39
-rw-r--r--io-module/spi.c4
4 files changed, 32 insertions, 33 deletions
diff --git a/io-module/mtdc_gpiob.c b/io-module/mtdc_gpiob.c
index c207483..7cd38a8 100644
--- a/io-module/mtdc_gpiob.c
+++ b/io-module/mtdc_gpiob.c
@@ -10,7 +10,7 @@ struct gpio_pin *dc_gpio_pin_by_attr_name(const char *name) {
} else if (!strcmp(name, "dout-enable")) {
pin_attr_name = "dc-gpio3";
} else {
- log_error("daughter card attribute %s not available", name);
+ log_error("accessory card attribute %s not available", name);
return NULL;
}
diff --git a/io-module/mtr2.c b/io-module/mtr2.c
index 2efc85d..6807088 100644
--- a/io-module/mtr2.c
+++ b/io-module/mtr2.c
@@ -440,7 +440,7 @@ static struct attribute *mtr2_platform_attributes[] = {
&dev_attr_board_temperature.attr,
- /* extra space for the daughter card attributes */
+ /* extra space for the accessory card attributes */
NULL, // index 34
NULL, // index 35
NULL, // index 36
@@ -462,7 +462,7 @@ static struct attribute *mtr2_platform_attributes[] = {
NULL,
};
-static struct attribute *mtr2_daughter_card_attributes[] = {
+static struct attribute *mtr2_accessory_card_attributes[] = {
&dev_attr_dc_din0.attr,
&dev_attr_dc_din1.attr,
&dev_attr_dc_din2.attr,
@@ -484,13 +484,13 @@ static struct attribute *mtr2_daughter_card_attributes[] = {
NULL,
};
-static bool mtr2_add_daughter_card_attributes(void)
+static bool mtr2_add_accessory_card_attributes(void)
{
size_t platform_attrs_size = sizeof(mtr2_platform_attributes) / sizeof(struct attribute *);
- size_t daughter_card_attrs_size = sizeof(mtr2_daughter_card_attributes) / sizeof(struct attribute *);
+ size_t accessory_card_attrs_size = sizeof(mtr2_accessory_card_attributes) / sizeof(struct attribute *);
size_t platform_attrs_index;
- size_t daughter_card_attrs_index;
- size_t copy_length = daughter_card_attrs_size - 1; /* don't need to copy the NULL at the end */
+ size_t accessory_card_attrs_index;
+ size_t copy_length = accessory_card_attrs_size - 1; /* don't need to copy the NULL at the end */
for (platform_attrs_index = 0; platform_attrs_index < platform_attrs_size; platform_attrs_index++) {
if (! mtr2_platform_attributes[platform_attrs_index]) {
@@ -498,13 +498,13 @@ static bool mtr2_add_daughter_card_attributes(void)
}
}
- if (platform_attrs_size < platform_attrs_index + daughter_card_attrs_size) {
- log_error("not enough room for MTR2 daughter card attributes!");
+ if (platform_attrs_size < platform_attrs_index + accessory_card_attrs_size) {
+ log_error("not enough room for MTR2 accessory card attributes!");
return false;
}
- for (daughter_card_attrs_index = 0; daughter_card_attrs_index < copy_length; daughter_card_attrs_index++, platform_attrs_index++) {
- mtr2_platform_attributes[platform_attrs_index] = mtr2_daughter_card_attributes[daughter_card_attrs_index];
+ for (accessory_card_attrs_index = 0; accessory_card_attrs_index < copy_length; accessory_card_attrs_index++, platform_attrs_index++) {
+ mtr2_platform_attributes[platform_attrs_index] = mtr2_accessory_card_attributes[accessory_card_attrs_index];
}
return true;
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index bf0332a..229a8f7 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -422,21 +422,21 @@ static int mts_ap_eeprom_load(void)
memcpy(&ap1_eeprom, mts_ap1_eeprom, sizeof(mts_ap1_eeprom));
if (mts_ap1_eeprom[0] == 0xFF) {
- log_error("uninitialized eeprom on daughter card");
+ log_error("uninitialized eeprom on accessory card");
return -EIO;
} else if (mts_ap1_eeprom[0] == 0x00) {
- log_info("no daughter card inserted");
+ log_info("no accessory card inserted");
return 0;
}
has_accessory_card_port_1 = true;
- log_info("daughter card vendor-id: %.32s", ap1_eeprom.vendor_id);
- log_info("daughter card product-id: %.32s", ap1_eeprom.product_id);
- log_info("daughter card device-id: %.32s", ap1_eeprom.device_id);
- log_info("daughter card hw-version: %.32s", ap1_eeprom.hw_version);
+ log_info("accessory card vendor-id: %.32s", ap1_eeprom.vendor_id);
+ log_info("accessory card product-id: %.32s", ap1_eeprom.product_id);
+ log_info("accessory card device-id: %.32s", ap1_eeprom.device_id);
+ log_info("accessory card hw-version: %.32s", ap1_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",
ap1_eeprom.mac_addr[0],
ap1_eeprom.mac_addr[1],
ap1_eeprom.mac_addr[2],
@@ -614,41 +614,40 @@ static int __init mts_io_init(void)
mts_ap1_product_id = MTDC_NONE;
ret = mts_ap_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");
- goto error1;
+ /* error reading the EEPROM from the accessory card */
+ log_error("error reading accessory card eeprom: %d", ret);
+ log_error("unable to initialize accessory card");
} else if (has_accessory_card_port_1) {
- /* no error and we have a daughter card */
+ /* no error and we have a accessory card */
if (strstr(ap1_eeprom.product_id, PRODUCT_ID_MTDC_GPIOB)) {
mts_ap1_product_id = MTDC_GPIOB_0_0;
}
switch(mts_ap1_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");
@@ -658,7 +657,7 @@ static int __init mts_io_init(void)
break;
default:
- log_info("daughter card '%s' currently unsupported", ap1_eeprom.product_id);
+ log_info("accessory card '%s' currently unsupported", ap1_eeprom.product_id);
}
}
}
diff --git a/io-module/spi.c b/io-module/spi.c
index dfbdfe2..ce5c156 100644
--- a/io-module/spi.c
+++ b/io-module/spi.c
@@ -657,7 +657,7 @@ static int mts_spi_dc_din_probe(struct spi_device *spi)
tmp = spi_setup(spi);
if (tmp < 0) {
- log_error("spi_setup daughter card din failed");
+ log_error("spi_setup accessory card din failed");
return tmp;
}
@@ -701,7 +701,7 @@ static int mts_spi_dc_adc_probe(struct spi_device *spi)
tmp = spi_setup(spi);
if (tmp < 0) {
- log_error("spi_setup daughter card adc failed");
+ log_error("spi_setup accessory card adc failed");
return tmp;
}