diff options
| author | Jesse Gilles <jgilles@multitech.com> | 2012-05-14 11:16:25 -0500 | 
|---|---|---|
| committer | Jesse Gilles <jgilles@multitech.com> | 2012-05-14 11:16:25 -0500 | 
| commit | 5a9ee2dc4b4d35ada418d027bb95ba1eefd6007c (patch) | |
| tree | 80c4d06fd8b470342452ac9117c45023591f603d | |
| parent | 15b996529938fc943dc491e40aa5aeae32a57793 (diff) | |
| download | cdp-io-controller-5a9ee2dc4b4d35ada418d027bb95ba1eefd6007c.tar.gz cdp-io-controller-5a9ee2dc4b4d35ada418d027bb95ba1eefd6007c.tar.bz2 cdp-io-controller-5a9ee2dc4b4d35ada418d027bb95ba1eefd6007c.zip | |
en4: add rs422-term-res, rs485-term-res pins
| -rw-r--r-- | io-module/mts_io.c | 40 | 
1 files 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, | 
