From 0f09f38ceaed0ce4f676facb02046095724fb4bf Mon Sep 17 00:00:00 2001 From: Volodymyr Vorobiov Date: Tue, 29 Oct 2019 18:17:27 +0200 Subject: Add mt100eocg spi io --- io-module/mt100eocg.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'io-module/mt100eocg.c') diff --git a/io-module/mt100eocg.c b/io-module/mt100eocg.c index 786b24c..00eaaf7 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[] = { +static struct gpio_pin gpio_pins_mt100eocg_0_0[] = { + { + .name = "ENIO", + .pin = { + .label = "enio", + .gpio = AT91_PIN_PC15, + .flags = GPIOF_OUT_INIT_LOW, + }, + }, { .name = "DEVICE_RESET", .pin = { @@ -143,6 +151,9 @@ static struct gpio_pin gpio_pins_mt100eocg_0_0[] = { }; /* mt100eocg specific attributes */ +static DEVICE_ATTR_MTS(dev_attr_enio, "enio", + mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); + static DEVICE_ATTR_MTS(dev_attr_gpo1, "gpo1", mts_attr_show_dout, mts_attr_store_dout); static DEVICE_ATTR_MTS(dev_attr_gpo2, "gpo2", @@ -198,6 +209,7 @@ static struct attribute *mt100eocg_platform_attributes[] = { // &dev_attr_eth0_enabled.attr, &dev_attr_gpio11.attr, // AT91_PIN_PB19 &dev_attr_gpio12.attr, // AT91_PIN_PB20 + &dev_attr_enio.attr, // SPI &dev_attr_gpo1.attr, &dev_attr_gpo2.attr, -- cgit v1.2.3