From 7b69a324e2e76569a429341406a105b55d63a207 Mon Sep 17 00:00:00 2001 From: Volodymyr Vorobiov Date: Thu, 31 Oct 2019 12:34:29 +0200 Subject: Add eth0-enabled pin --- io-module/mt100eocg.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/io-module/mt100eocg.c b/io-module/mt100eocg.c index 00eaaf7..f04a49b 100644 --- a/io-module/mt100eocg.c +++ b/io-module/mt100eocg.c @@ -1,6 +1,14 @@ #include "at91gpio.h" /* Used for both MT100EOCG 0.0 */ static struct gpio_pin gpio_pins_mt100eocg_0_0[] = { + { + .name = "ETH0_ENABLED", + .pin = { + .label = "eth0-enabled", + .gpio = AT91_PIN_PB31, + .flags = GPIOF_OUT_INIT_HIGH, + }, + }, { .name = "ENIO", .pin = { @@ -106,22 +114,6 @@ static struct gpio_pin gpio_pins_mt100eocg_0_0[] = { .flags = GPIOF_IN, }, }, - { - .name = "ENIO", - .pin = { - .gpio = AT91_PIN_PC15, - .flags = GPIOF_OUT_INIT_HIGH, - }, - }, - { - .name = "ETH0_ENABLED", - .pin = { - .label = "eth0-enabled", - .gpio = AT91_PIN_PB31, - .flags = GPIOF_OUT_INIT_HIGH, - }, - }, - { .name = "TXD1", .pin = { @@ -151,6 +143,9 @@ static struct gpio_pin gpio_pins_mt100eocg_0_0[] = { }; /* mt100eocg specific attributes */ +static DEVICE_ATTR_MTS(dev_attr_eth0_enabled, "eth0-enabled", + mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); + static DEVICE_ATTR_MTS(dev_attr_enio, "enio", mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); @@ -206,7 +201,7 @@ static struct attribute *mt100eocg_platform_attributes[] = { // &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, + &dev_attr_eth0_enabled.attr, &dev_attr_gpio11.attr, // AT91_PIN_PB19 &dev_attr_gpio12.attr, // AT91_PIN_PB20 &dev_attr_enio.attr, -- cgit v1.2.3