From a0f2265f433f14f0e0afa768b098ff4a54b2b27a Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 2 Oct 2020 11:38:47 -0500 Subject: Add TI Processer GPIO's to MTAC-MFSER module --- mtac_mfser.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'mtac_mfser.c') diff --git a/mtac_mfser.c b/mtac_mfser.c index 2b5ca29..04da4e8 100644 --- a/mtac_mfser.c +++ b/mtac_mfser.c @@ -1,5 +1,5 @@ -#define DRIVER_VERSION "v1.1.0" -#define DRIVER_AUTHOR "John Klug " +#define DRIVER_VERSION "v1.1.1" +#define DRIVER_AUTHOR "Multi-Tech" #define DRIVER_DESC "MTS Multi-Fuction Serial Accessory Card" #define DRIVER_NAME "mtac-mfser" @@ -12,13 +12,19 @@ #include #include #include - -static struct gpio_pin gpio_pins_mtcdt_mtac_mfser[] = { +#ifdef TI43X +#include "machine/ti43x_mfser_gpio.h" +#endif +#ifdef SAM9G25 +#include "machine/sam9g25_mfser_gpio.h" +#endif + +static struct gpio_pin gpio_pins_mtac_mfser[] = { // gpio pins for Accessory Card 1 { .name = "AP1_GPIO1", .pin = { - .gpio = AT91_PIN_PC6, + .gpio = M_AP1_GPIO1, .flags = GPIOF_OUT_INIT_LOW, .label = "ap1-gpio1", }, @@ -27,7 +33,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_mfser[] = { { .name = "AP1_GPIO2", .pin = { - .gpio = AT91_PIN_PC7, + .gpio = M_AP1_GPIO2, .flags = GPIOF_OUT_INIT_LOW, .label = "ap1-gpio2", } @@ -35,7 +41,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_mfser[] = { { .name = "AP1_GPIO3", .pin = { - .gpio = AT91_PIN_PC8, + .gpio = M_AP1_GPIO3, .flags = GPIOF_OUT_INIT_LOW, .label = "ap1-gpio3", } @@ -43,7 +49,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_mfser[] = { { .name = "AP1_GPIO4", .pin = { - .gpio = AT91_PIN_PC9, + .gpio = M_AP1_GPIO4, .flags = GPIOF_OUT_INIT_LOW, .label = "ap1-gpio4", } @@ -54,7 +60,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_mfser[] = { { .name = "AP2_GPIO1", .pin = { - .gpio = AT91_PIN_PC20, + .gpio = M_AP2_GPIO1, .flags = GPIOF_OUT_INIT_LOW, .label = "ap2-gpio1", }, @@ -63,7 +69,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_mfser[] = { { .name = "AP2_GPIO2", .pin = { - .gpio = AT91_PIN_PC21, + .gpio = M_AP2_GPIO2, .flags = GPIOF_OUT_INIT_LOW, .label = "ap2-gpio2", } @@ -71,7 +77,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_mfser[] = { { .name = "AP2_GPIO3", .pin = { - .gpio = AT91_PIN_PC22, + .gpio = M_AP2_GPIO3, .flags = GPIOF_OUT_INIT_LOW, .label = "ap2-gpio3", } @@ -79,7 +85,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_mfser[] = { { .name = "AP2_GPIO4", .pin = { - .gpio = AT91_PIN_PC23, + .gpio = M_AP2_GPIO4, .flags = GPIOF_OUT_INIT_LOW, .label = "ap2-gpio4", } @@ -268,7 +274,7 @@ static bool mfser_setup(enum ap port) { return false; } - mtac_set_port_pins(port_index,gpio_pins_mtcdt_mtac_mfser,subdir); + mtac_set_port_pins(port_index,gpio_pins_mtac_mfser,subdir); // create the link to the apX directory this card is in // if we're in the first slot, we get plain "mfser" -- cgit v1.2.3