diff options
Diffstat (limited to 'io-module')
-rw-r--r-- | io-module/mt100eocg.c | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/io-module/mt100eocg.c b/io-module/mt100eocg.c index f04a49b..ad22d22 100644 --- a/io-module/mt100eocg.c +++ b/io-module/mt100eocg.c @@ -2,6 +2,24 @@ /* Used for both MT100EOCG 0.0 */ static struct gpio_pin gpio_pins_mt100eocg_0_0[] = { { + .name = "DTR1", + .pin = { + .label = "extserial-dtr", + .gpio = AT91_PIN_PB18, + .flags = GPIOF_IN, + }, + .active_low = 1, + }, + { + .name = "DCD1", + .pin = { + .label = "extserial-dcd", + .gpio = AT91_PIN_PB3, + .flags = GPIOF_OUT_INIT_HIGH, + }, + .active_low = 1, + }, + { .name = "ETH0_ENABLED", .pin = { .label = "eth0-enabled", @@ -120,29 +138,17 @@ static struct gpio_pin gpio_pins_mt100eocg_0_0[] = { .gpio = AT91_PIN_PB17, .flags = GPIOF_IN, }, - }, - { - .name = "DTR1", - .pin = { - .label = "extserial-dtr", - .gpio = AT91_PIN_PB18, - .flags = GPIOF_IN, - }, - .active_low = 1, - }, - { - .name = "DCD1", - .pin = { - .label = "extserial-dcd", - .gpio = AT91_PIN_PB3, - .flags = GPIOF_OUT_INIT_HIGH, - }, - .active_low = 1, },*/ { }, }; /* mt100eocg specific attributes */ +static DEVICE_ATTR_RO_MTS(dev_attr_extserial_dtr, "extserial-dtr", + mts_attr_show_gpio_pin); + +static DEVICE_ATTR_MTS(dev_attr_extserial_dcd_gpio, "extserial-dcd", + mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); + static DEVICE_ATTR_MTS(dev_attr_eth0_enabled, "eth0-enabled", mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); @@ -197,8 +203,8 @@ static struct attribute *mt100eocg_platform_attributes[] = { &dev_attr_reset.attr, &dev_attr_reset_monitor.attr, &dev_attr_reset_monitor_intervals.attr, -// &dev_attr_extserial_dtr.attr, -// &dev_attr_extserial_dcd_gpio.attr, + &dev_attr_extserial_dtr.attr, + &dev_attr_extserial_dcd_gpio.attr, &dev_attr_rsersrc.attr, // AT91_PIN_PC7 &dev_attr_radio_reset.attr, // AT91_PIN_PB30 &dev_attr_eth0_enabled.attr, |