summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2012-10-03 11:22:30 -0500
committerJesse Gilles <jgilles@multitech.com>2012-10-03 11:22:30 -0500
commit19b229e8a044eb1a52a4d94e4d6e024700334bf3 (patch)
tree97016bacc62f0cfadd0a10e59b174ffb850a1871
parent374e7fefc767e9d80ec8818bbc9872d8aa4a362d (diff)
downloadcdp-io-controller-19b229e8a044eb1a52a4d94e4d6e024700334bf3.tar.gz
cdp-io-controller-19b229e8a044eb1a52a4d94e4d6e024700334bf3.tar.bz2
cdp-io-controller-19b229e8a044eb1a52a4d94e4d6e024700334bf3.zip
add extserial-ri for MTR RevA, rename EN4 to MTR2
-rw-r--r--io-module/mts_io.c41
-rw-r--r--io-module/mts_io.h6
2 files changed, 28 insertions, 19 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index 30800d3..9b089b6 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -399,7 +399,7 @@ static struct gpio_pin gpio_pins_mt100eocg_0_0[] = {
{ },
};
-static struct gpio_pin gpio_pins_en4_0_0[] = {
+static struct gpio_pin gpio_pins_mtr2_0_0[] = {
{
.name = "NETH_RST",
.attr_name = "eth-switch-enabled",
@@ -669,7 +669,15 @@ static struct gpio_pin gpio_pins_mtr_0_0[] = {
.use_pullup = 0,
},
{
- .name = "DTR3",
+ .name = "RI_B",
+ .attr_name = "extserial-ri",
+ .pin = AT91_PIN_PC25,
+ .direction = GPIO_DIR_OUTPUT,
+ .output_value = 1,
+ .use_pullup = 0,
+ },
+ {
+ .name = "DTR_B",
.attr_name = "extserial-dtr",
.pin = AT91_PIN_PC26,
.direction = GPIO_DIR_INPUT,
@@ -677,7 +685,7 @@ static struct gpio_pin gpio_pins_mtr_0_0[] = {
.use_pullup = 0,
},
{
- .name = "DSR3",
+ .name = "DSR_B",
.attr_name = "extserial-dsr",
.pin = AT91_PIN_PC27,
.direction = GPIO_DIR_OUTPUT,
@@ -685,7 +693,7 @@ static struct gpio_pin gpio_pins_mtr_0_0[] = {
.use_pullup = 0,
},
{
- .name = "DCD3",
+ .name = "DCD_B",
.attr_name = "extserial-dcd",
.pin = AT91_PIN_PC28,
.direction = GPIO_DIR_OUTPUT,
@@ -773,9 +781,9 @@ static int mts_id_eeprom_load(void)
has_spi_din = 1;
has_spi_dout = 1;
has_spi_temp = 1;
- } else if (strncmp(id_eeprom.product_id, PRODUCT_ID_EN4, strlen(PRODUCT_ID_EN4)) == 0) {
- gpio_pins = gpio_pins_en4_0_0;
- mts_product_id = EN4_0_0;
+ } else if (strncmp(id_eeprom.product_id, PRODUCT_ID_MTR2, strlen(PRODUCT_ID_MTR2)) == 0) {
+ gpio_pins = gpio_pins_mtr2_0_0;
+ mts_product_id = MTR2_0_0;
has_spi_sout = 0;
has_spi_din = 0;
has_spi_dout = 0;
@@ -2594,7 +2602,7 @@ static struct attribute_group mt100eocg_platform_attribute_group = {
.attrs = mt100eocg_platform_attributes
};
-static struct attribute *en4_platform_attributes[] = {
+static struct attribute *mtr2_platform_attributes[] = {
&dev_attr_reset.attr,
&dev_attr_reset_monitor.attr,
&dev_attr_radio_reset.attr,
@@ -2622,8 +2630,8 @@ static struct attribute *en4_platform_attributes[] = {
NULL,
};
-static struct attribute_group en4_platform_attribute_group = {
- .attrs = en4_platform_attributes
+static struct attribute_group mtr2_platform_attribute_group = {
+ .attrs = mtr2_platform_attributes
};
static struct attribute *platform_attributes[] = {
@@ -2693,6 +2701,7 @@ static struct attribute *mtr_platform_attributes[] = {
&dev_attr_reset.attr,
&dev_attr_reset_monitor.attr,
&dev_attr_radio_reset_telit.attr,
+ &dev_attr_extserial_ri_gpio.attr,
&dev_attr_extserial_dtr.attr,
&dev_attr_extserial_dsr_gpio.attr,
&dev_attr_extserial_cd.attr,
@@ -2914,9 +2923,9 @@ static int __init mts_io_init(void)
goto error3;
}
}
- else if ( mts_product_id == EN4_0_0 ) {
+ else if ( mts_product_id == MTR2_0_0 ) {
ret = sysfs_create_group(&mts_io_platform_device->dev.kobj,
- &en4_platform_attribute_group);
+ &mtr2_platform_attribute_group);
if (ret) {
goto error3;
}
@@ -3047,9 +3056,9 @@ error4:
sysfs_remove_group(&mts_io_platform_device->dev.kobj,
&mt100eocg_platform_attribute_group);
}
- else if ( mts_product_id == EN4_0_0 ) {
+ else if ( mts_product_id == MTR2_0_0 ) {
sysfs_remove_group(&mts_io_platform_device->dev.kobj,
- &en4_platform_attribute_group);
+ &mtr2_platform_attribute_group);
}
else if ( mts_product_id == MTR_0_0 ) {
sysfs_remove_group(&mts_io_platform_device->dev.kobj,
@@ -3095,9 +3104,9 @@ static void __exit mts_io_exit(void)
sysfs_remove_group(&mts_io_platform_device->dev.kobj,
&mt100eocg_platform_attribute_group);
}
- else if ( mts_product_id == EN4_0_0 ) {
+ else if ( mts_product_id == MTR2_0_0 ) {
sysfs_remove_group(&mts_io_platform_device->dev.kobj,
- &en4_platform_attribute_group);
+ &mtr2_platform_attribute_group);
}
else if ( mts_product_id == MTR_0_0 ) {
sysfs_remove_group(&mts_io_platform_device->dev.kobj,
diff --git a/io-module/mts_io.h b/io-module/mts_io.h
index 0e49184..5f00cda 100644
--- a/io-module/mts_io.h
+++ b/io-module/mts_io.h
@@ -13,21 +13,21 @@
#define VENDOR_ID_MULTITECH "Multi-Tech Systems"
#define PRODUCT_ID_MTCDP_E1_DK "MTCDP-E1-DK"
#define PRODUCT_ID_MT100EOCG "MT100EOCG"
-#define PRODUCT_ID_EN4 "EN4"
+#define PRODUCT_ID_MTR2 "MTR2"
#define PRODUCT_ID_MTR "MTR"
#define HW_VERSION_MTCBA2_2_0 "MTCBA2-2.0"
#define HW_VERSION_MTCDP_0_0 "MTCDP-0.0"
#define HW_VERSION_MTCDP_1_0 "MTCDP-1.0"
#define HW_VERSION_MT100EOCG_0_0 "MT100EOCG-0.0"
-#define HW_VERSION_EN4 "EN4-0.0"
+#define HW_VERSION_MTR2 "MTR2-0.0"
#define HW_VERSION_MTR "MTR-0.0"
enum {
MTCDP_E1_DK_0_0,
MTCDP_E1_DK_1_0,
MT100EOCG_0_0,
- EN4_0_0,
+ MTR2_0_0,
MTR_0_0,
};