From 5a9ee2dc4b4d35ada418d027bb95ba1eefd6007c Mon Sep 17 00:00:00 2001 From: Jesse Gilles Date: Mon, 14 May 2012 11:16:25 -0500 Subject: en4: add rs422-term-res, rs485-term-res pins --- io-module/mts_io.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/io-module/mts_io.c b/io-module/mts_io.c index 6316894..aa8afa1 100644 --- a/io-module/mts_io.c +++ b/io-module/mts_io.c @@ -543,7 +543,7 @@ static struct gpio_pin gpio_pins_en4_0_0[] = { }, { .name = "SERIAL_MODE0", - .attr_name = "", + .attr_name = "serial-mode", .pin = AT91_PIN_PC23, .direction = GPIO_DIR_OUTPUT, .output_value = 0, @@ -551,12 +551,28 @@ static struct gpio_pin gpio_pins_en4_0_0[] = { }, { .name = "SERIAL_MODE2", - .attr_name = "", + .attr_name = "serial-mode", .pin = AT91_PIN_PC24, .direction = GPIO_DIR_OUTPUT, .output_value = 1, .use_pullup = 0, }, + { + .name = "RS422_TERM_RES", + .attr_name = "rs422-term-res", + .pin = AT91_PIN_PC25, + .direction = GPIO_DIR_OUTPUT, + .output_value = 0, + .use_pullup = 0, + }, + { + .name = "RS485_TERM_RES", + .attr_name = "rs485-term-res", + .pin = AT91_PIN_PC26, + .direction = GPIO_DIR_OUTPUT, + .output_value = 0, + .use_pullup = 0, + }, { }, }; @@ -1791,6 +1807,24 @@ static struct device_attribute dev_attr_reset = { .show = mts_attr_show_gpio_pin_inverted, }; +static struct device_attribute dev_attr_rs485_term_res = { + .attr = { + .name = "rs485-term-res", + .mode = MTS_ATTR_MODE_RW, + }, + .show = mts_attr_show_gpio_pin, + .store = mts_attr_store_gpio_pin, +}; + +static struct device_attribute dev_attr_rs422_term_res = { + .attr = { + .name = "rs422-term-res", + .mode = MTS_ATTR_MODE_RW, + }, + .show = mts_attr_show_gpio_pin, + .store = mts_attr_store_gpio_pin, +}; + static ssize_t mts_attr_show_reset_monitor(struct device *dev, struct device_attribute *attr, char *buf) @@ -2327,6 +2361,8 @@ static struct attribute *en4_platform_attributes[] = { &dev_attr_wlan_enabled.attr, &dev_attr_serial_mode.attr, + &dev_attr_rs485_term_res.attr, + &dev_attr_rs422_term_res.attr, &dev_attr_led_sig1_gpio.attr, &dev_attr_led_sig2_gpio.attr, -- cgit v1.2.3