summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolodymyr Vorobiov <volodymyr.vorobiov@globallogic.com>2019-10-31 12:34:29 +0200
committerVolodymyr Vorobiov <volodymyr.vorobiov@globallogic.com>2019-10-31 12:34:29 +0200
commit7b69a324e2e76569a429341406a105b55d63a207 (patch)
tree27f7cd83ddcca37d754c7379efaf0ab84d9f4cb5
parent0f09f38ceaed0ce4f676facb02046095724fb4bf (diff)
downloadmts-io-7b69a324e2e76569a429341406a105b55d63a207.tar.gz
mts-io-7b69a324e2e76569a429341406a105b55d63a207.tar.bz2
mts-io-7b69a324e2e76569a429341406a105b55d63a207.zip
Add eth0-enabled pin
-rw-r--r--io-module/mt100eocg.c29
1 files 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
@@ -2,6 +2,14 @@
/* 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 = {
.label = "enio",
@@ -107,22 +115,6 @@ static struct gpio_pin gpio_pins_mt100eocg_0_0[] = {
},
},
{
- .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 = {
.gpio = AT91_PIN_PB17,
@@ -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,