diff options
-rw-r--r-- | mtac_pulse.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/mtac_pulse.c b/mtac_pulse.c index 9b5443a..569e640 100644 --- a/mtac_pulse.c +++ b/mtac_pulse.c @@ -1,5 +1,5 @@ -#define DRIVER_VERSION "v1.1.0" -#define DRIVER_AUTHOR "John Klug <john.klug@multitech.com>" +#define DRIVER_VERSION "v1.1.1" +#define DRIVER_AUTHOR "Multi-Tech" #define DRIVER_DESC "MTAC Pulse Accessory Card" #define DRIVER_NAME "mtac-pulse" @@ -12,6 +12,12 @@ #include <linux/slab.h> #include <linux/mtac.h> #include <linux/mts_io.h> +#ifdef TI43X +#include <linux/ti43x_gpio.h> +#endif +#ifdef SAM9G25 +#include <linux/sam9g25_gpio.h> +#endif /********************************************************************** * COPYRIGHT 2012-2018 CONNECTED DEVELOPMENT, LLC @@ -30,12 +36,12 @@ * ***********************************************************************/ -static struct gpio_pin gpio_pins_mtcdt_mtac_pulse[] = { +static struct gpio_pin gpio_pins_mtac_pulse[] = { // gpio pins for Accessory Card 1 { .name = "AP1_RESET", .pin = { - .gpio = AT91_PIN_PB12, + .gpio = M_AP1_NRESET, .flags = GPIOF_OUT_INIT_HIGH, .label = "ap1-reset", } @@ -43,7 +49,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_pulse[] = { { .name = "AP1_GPIO1", .pin = { - .gpio = AT91_PIN_PC6, + .gpio = M_AP1_GPIO1, .flags = GPIOF_OUT_INIT_LOW, .label = "ap1-gpio1", }, @@ -53,7 +59,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_pulse[] = { { .name = "AP2_RESET", .pin = { - .gpio = AT91_PIN_PB13, + .gpio = M_AP1_NRESET, .flags = GPIOF_OUT_INIT_HIGH, .label = "ap2-reset", } @@ -61,7 +67,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_pulse[] = { { .name = "AP2_GPIO1", .pin = { - .gpio = AT91_PIN_PC20, + .gpio = M_AP2_GPIO1, .flags = GPIOF_OUT_INIT_LOW, .label = "ap2-gpio1", }, @@ -128,7 +134,7 @@ static bool pulse_setup(enum ap port) { return false; } - mtac_set_port_pins(port_index,gpio_pins_mtcdt_mtac_pulse,subdir); + mtac_set_port_pins(port_index,gpio_pins_mtac_pulse,subdir); // create the link to the apX directory this card is in // if we're in the first slot, we get plain "pulse" @@ -207,9 +213,9 @@ static bool pulse_setup(enum ap port) { /* override ap_reset output mode to open drain */ if (port == 1) { - res = gpio_request_one(AT91_PIN_PB12, GPIOF_OUT_INIT_HIGH | GPIOF_OPEN_DRAIN, "ap1-reset"); + res = gpio_request_one(M_AP1_NRESET, GPIOF_OUT_INIT_HIGH | GPIOF_OPEN_DRAIN, "ap1-reset"); } else { - res = gpio_request_one(AT91_PIN_PB13, GPIOF_OUT_INIT_HIGH | GPIOF_OPEN_DRAIN, "ap2-reset"); + res = gpio_request_one(M_AP2_NRESET, GPIOF_OUT_INIT_HIGH | GPIOF_OPEN_DRAIN, "ap2-reset"); } if (res != 0) { |