diff options
-rw-r--r-- | mtac_gpiob.c | 56 |
1 files changed, 24 insertions, 32 deletions
diff --git a/mtac_gpiob.c b/mtac_gpiob.c index ba16d89..6e08477 100644 --- a/mtac_gpiob.c +++ b/mtac_gpiob.c @@ -1,5 +1,5 @@ -#define DRIVER_VERSION "v1.1.1" -#define DRIVER_AUTHOR "John Klug <john.klug@multitech.com>" +#define DRIVER_VERSION "v1.1.2" +#define DRIVER_AUTHOR "Multi-Tech" #define DRIVER_DESC "MTS General Purpose I/O Accessory Card" #define DRIVER_NAME "mtac-gpiob" @@ -13,13 +13,19 @@ #include <linux/spi/spi.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 static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { // 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", } @@ -27,7 +33,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { { .name = "AP1_GPIO1", .pin = { - .gpio = AT91_PIN_PC6, + .gpio = M_AP1_GPIO1, .flags = GPIOF_OUT_INIT_LOW, .label = "ap1-gpio1", }, @@ -36,7 +42,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { { .name = "AP1_GPIO2", .pin = { - .gpio = AT91_PIN_PC7, + .gpio = M_AP1_GPIO2, .flags = GPIOF_OUT_INIT_LOW, .label = "ap1-gpio2", } @@ -44,7 +50,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { { .name = "AP1_GPIO3", .pin = { - .gpio = AT91_PIN_PC8, + .gpio = M_AP1_GPIO3, .flags = GPIOF_OUT_INIT_LOW, .label = "ap1-gpio3", } @@ -52,7 +58,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { { .name = "AP1_GPIO4", .pin = { - .gpio = AT91_PIN_PC9, + .gpio = M_AP1_GPIO4, .flags = GPIOF_OUT_INIT_LOW, .label = "ap1-gpio4", } @@ -60,7 +66,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { { .name = "AP1_INTERRUPT1", .pin = { - .gpio = AT91_PIN_PB14, + .gpio = M_AP1_NINT1, .flags = GPIOF_IN, .label = "ap1-interrupt1", } @@ -68,25 +74,18 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { { .name = "AP1_INTERRUPT2", .pin = { - .gpio = AT91_PIN_PB15, + .gpio = M_AP1_NINT2, .flags = GPIOF_IN, .label = "ap1-interrupt2", } }, - { - .name = "AP1_GPS_PPS", - .pin = { - .gpio = AT91_PIN_PA29, - .flags = GPIOF_IN, - .label = "ap1-gps-pps", - } - }, + // The PPS is driven by the on-board GPS -- removed // gpio pins for Accessory Card 2 { .name = "AP2_RESET", .pin = { - .gpio = AT91_PIN_PB13, + .gpio = M_AP2_NRESET, .flags = GPIOF_OUT_INIT_HIGH, .label = "ap2-reset", } @@ -94,7 +93,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { { .name = "AP2_GPIO1", .pin = { - .gpio = AT91_PIN_PC20, + .gpio = M_AP2_GPIO1, .flags = GPIOF_OUT_INIT_LOW, .label = "ap2-gpio1", }, @@ -103,7 +102,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { { .name = "AP2_GPIO2", .pin = { - .gpio = AT91_PIN_PC21, + .gpio = M_AP2_GPIO2, .flags = GPIOF_OUT_INIT_LOW, .label = "ap2-gpio2", } @@ -111,7 +110,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { { .name = "AP2_GPIO3", .pin = { - .gpio = AT91_PIN_PC22, + .gpio = M_AP2_GPIO3, .flags = GPIOF_OUT_INIT_LOW, .label = "ap2-gpio3", } @@ -119,7 +118,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { { .name = "AP2_GPIO4", .pin = { - .gpio = AT91_PIN_PC23, + .gpio = M_AP2_GPIO4, .flags = GPIOF_OUT_INIT_LOW, .label = "ap2-gpio4", } @@ -127,7 +126,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { { .name = "AP2_INTERRUPT1", .pin = { - .gpio = AT91_PIN_PB17, + .gpio = M_AP2_NINT1, .flags = GPIOF_IN, .label = "ap2-interrupt1", } @@ -135,19 +134,12 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_gpiob[] = { { .name = "AP2_INTERRUPT2", .pin = { - .gpio = AT91_PIN_PB18, + .gpio = M_AP2_NINT2, .flags = GPIOF_IN, .label = "ap2-interrupt2", } }, - { - .name = "AP2_GPS_PPS", - .pin = { - .gpio = AT91_PIN_PA6, - .flags = GPIOF_IN, - .label = "ap2-gps-pps", - } - }, + // The PPS is driven by the on-board GPS -- removed { }, }; |