From 57651686d90c05a186604a27a532834fa7979c15 Mon Sep 17 00:00:00 2001 From: Volodymyr Vorobiov Date: Fri, 13 Dec 2019 15:40:14 +0200 Subject: Add ADC to mts-io --- io-module/mt100eocg.c | 74 +++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'io-module/mt100eocg.c') diff --git a/io-module/mt100eocg.c b/io-module/mt100eocg.c index ad22d22..749b85a 100644 --- a/io-module/mt100eocg.c +++ b/io-module/mt100eocg.c @@ -1,6 +1,38 @@ #include "at91gpio.h" /* Used for both MT100EOCG 0.0 */ static struct gpio_pin gpio_pins_mt100eocg_0_0[] = { + { + .name = "ADC0", + .pin = { + .label = "adc0", + .gpio = AT91_PIN_PC0, + .flags = GPIOF_IN, + }, + }, + { + .name = "ADC1", + .pin = { + .label = "adc1", + .gpio = AT91_PIN_PC1, + .flags = GPIOF_IN, + }, + }, + { + .name = "ADC2", + .pin = { + .label = "adc2", + .gpio = AT91_PIN_PC2, + .flags = GPIOF_IN, + }, + }, + { + .name = "ADC3", + .pin = { + .label = "adc3", + .gpio = AT91_PIN_PC3, + .flags = GPIOF_IN, + }, + }, { .name = "DTR1", .pin = { @@ -100,38 +132,6 @@ static struct gpio_pin gpio_pins_mt100eocg_0_0[] = { .active_low = 1, }, /* - { - .name = "ADC0", - .pin = { - .label = "adc0", - .gpio = AT91_PIN_PC0, - .flags = GPIOF_IN, - }, - }, - { - .name = "ADC1", - .pin = { - .label = "adc1", - .gpio = AT91_PIN_PC1, - .flags = GPIOF_IN, - }, - }, - { - .name = "ADC2", - .pin = { - .label = "adc2", - .gpio = AT91_PIN_PC2, - .flags = GPIOF_IN, - }, - }, - { - .name = "ADC3", - .pin = { - .label = "adc3", - .gpio = AT91_PIN_PC3, - .flags = GPIOF_IN, - }, - }, { .name = "TXD1", .pin = { @@ -216,10 +216,10 @@ static struct attribute *mt100eocg_platform_attributes[] = { &dev_attr_gpo2.attr, &dev_attr_gpo3.attr, &dev_attr_gpo4.attr, -// +// // SPI &dev_attr_led1.attr, -// +// &dev_attr_led2.attr, // AT91_PIN_PA30 &dev_attr_led3.attr, // AT91_PIN_PC9 // SPI @@ -227,7 +227,7 @@ static struct attribute *mt100eocg_platform_attributes[] = { &dev_attr_led5.attr, &dev_attr_led6.attr, // -// SPI +// SPI &dev_attr_gpi5.attr, &dev_attr_gpi6.attr, &dev_attr_gpi7.attr, @@ -238,12 +238,12 @@ static struct attribute *mt100eocg_platform_attributes[] = { // SPI &dev_attr_board_temperature.attr, // -/* adc +// adc &dev_attr_adc0.attr, &dev_attr_adc1.attr, &dev_attr_adc2.attr, &dev_attr_adc3.attr, -*/ + NULL, }; -- cgit v1.2.3