summaryrefslogtreecommitdiff
path: root/mtac_mfser.c
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-10-02 11:38:47 -0500
committerJohn Klug <john.klug@multitech.com>2020-10-02 11:38:47 -0500
commita0f2265f433f14f0e0afa768b098ff4a54b2b27a (patch)
tree4379b0f71aa79439978129b7ff59711bcad3fcbb /mtac_mfser.c
parent3f05329be8476d12900ce31e78bb48a8f38a9761 (diff)
downloadmtac-mfser-a0f2265f433f14f0e0afa768b098ff4a54b2b27a.tar.gz
mtac-mfser-a0f2265f433f14f0e0afa768b098ff4a54b2b27a.tar.bz2
mtac-mfser-a0f2265f433f14f0e0afa768b098ff4a54b2b27a.zip
Add TI Processer GPIO's to MTAC-MFSER module
Diffstat (limited to 'mtac_mfser.c')
-rw-r--r--mtac_mfser.c32
1 files changed, 19 insertions, 13 deletions
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 <john.klug@multitech.com>"
+#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 <linux/slab.h>
#include <linux/mtac.h>
#include <linux/mts_io.h>
-
-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"