diff options
author | John Klug <john.klug@multitech.com> | 2018-06-19 16:04:47 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2018-06-19 16:04:47 -0500 |
commit | 3e7f8d202e9728daafc985f36ff0fff24e1a4840 (patch) | |
tree | 02c159152690f1528a860d70a3201b47f0cef838 /io-module/mtcdt.c | |
parent | 3892a0c8f5bfbb660a11c93153faf3a57dbe7dc3 (diff) | |
download | mts-io-3e7f8d202e9728daafc985f36ff0fff24e1a4840.tar.gz mts-io-3e7f8d202e9728daafc985f36ff0fff24e1a4840.tar.bz2 mts-io-3e7f8d202e9728daafc985f36ff0fff24e1a4840.zip |
XDOT feature2.1.0
Diffstat (limited to 'io-module/mtcdt.c')
-rw-r--r-- | io-module/mtcdt.c | 156 |
1 files changed, 140 insertions, 16 deletions
diff --git a/io-module/mtcdt.c b/io-module/mtcdt.c index 0fca7aa..e8aed3b 100644 --- a/io-module/mtcdt.c +++ b/io-module/mtcdt.c @@ -145,7 +145,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = { .name = "AP1_GPIO1", .pin = { .gpio = AT91_PIN_PC6, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap1-gpio1", }, .active_low = 1, @@ -154,7 +154,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = { .name = "AP1_GPIO2", .pin = { .gpio = AT91_PIN_PC7, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap1-gpio2", } }, @@ -162,7 +162,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = { .name = "AP1_GPIO3", .pin = { .gpio = AT91_PIN_PC8, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap1-gpio3", } }, @@ -170,7 +170,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = { .name = "AP1_GPIO4", .pin = { .gpio = AT91_PIN_PC9, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap1-gpio4", } }, @@ -212,7 +212,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = { .name = "AP2_GPIO1", .pin = { .gpio = AT91_PIN_PC20, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap2-gpio1", }, .active_low = 1, @@ -221,7 +221,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = { .name = "AP2_GPIO2", .pin = { .gpio = AT91_PIN_PC21, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap2-gpio2", } }, @@ -229,7 +229,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = { .name = "AP2_GPIO3", .pin = { .gpio = AT91_PIN_PC22, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap2-gpio3", } }, @@ -237,7 +237,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = { .name = "AP2_GPIO4", .pin = { .gpio = AT91_PIN_PC23, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap2-gpio4", } }, @@ -403,7 +403,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = { .name = "AP1_GPIO1", .pin = { .gpio = AT91_PIN_PC6, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap1-gpio1", }, .active_low = 1, @@ -412,7 +412,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = { .name = "AP1_GPIO2", .pin = { .gpio = AT91_PIN_PC7, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap1-gpio2", } }, @@ -420,7 +420,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = { .name = "AP1_GPIO3", .pin = { .gpio = AT91_PIN_PC8, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap1-gpio3", } }, @@ -428,7 +428,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = { .name = "AP1_GPIO4", .pin = { .gpio = AT91_PIN_PC9, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap1-gpio4", } }, @@ -471,7 +471,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = { .name = "AP2_GPIO1", .pin = { .gpio = AT91_PIN_PC20, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap2-gpio1", }, .active_low = 1, @@ -480,7 +480,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = { .name = "AP2_GPIO2", .pin = { .gpio = AT91_PIN_PC21, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap2-gpio2", } }, @@ -488,7 +488,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = { .name = "AP2_GPIO3", .pin = { .gpio = AT91_PIN_PC22, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap2-gpio3", } }, @@ -496,7 +496,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = { .name = "AP2_GPIO4", .pin = { .gpio = AT91_PIN_PC23, - .flags = GPIOF_OUT_INIT_LOW, + .flags = GPIOF_IN, .label = "ap2-gpio4", } }, @@ -650,6 +650,130 @@ static struct gpio_pin lora_h[3 /* Port */][3 /* Pin */] = { { }, }; +// GPIO Board +static struct gpio_pin gpiob[3 /* Port */][5 /* Pin */] = { + { // port 1 of 2 + { + .name = "AP1_GPIO1", + .pin = { + .gpio = AT91_PIN_PC6, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap1-gpio1", + }, + .active_low = 1, + }, + { + .name = "AP1_GPIO2", + .pin = { + .gpio = AT91_PIN_PC7, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap1-gpio2", + } + }, + { + .name = "AP1_GPIO3", + .pin = { + .gpio = AT91_PIN_PC8, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap1-gpio3", + } + }, + { + .name = "AP1_GPIO4", + .pin = { + .gpio = AT91_PIN_PC9, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap1-gpio4", + } + }, + { }, + }, // End of port 1 +// GPIOB AP2 + { // Port 2 of 2 + { + .name = "AP2_GPIO1", + .pin = { + .gpio = AT91_PIN_PC20, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap2-gpio1", + }, + .active_low = 1, + }, + { + .name = "AP2_GPIO2", + .pin = { + .gpio = AT91_PIN_PC21, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap2-gpio2", + } + }, + { + .name = "AP2_GPIO3", + .pin = { + .gpio = AT91_PIN_PC22, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap2-gpio3", + } + }, + { + .name = "AP2_GPIO4", + .pin = { + .gpio = AT91_PIN_PC23, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap2-gpio4", + } + }, + { }, + }, // End of port 2 + { }, +}; + + +// MFSER AP1 +static struct gpio_pin mfser[3 /* Port */][3 /* Pin */] = { + { // port 1 of 2 + { + .name = "AP1_GPIO3", + .pin = { + .gpio = AT91_PIN_PC8, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap1-gpio3", + } + }, + { + .name = "AP1_GPIO4", + .pin = { + .gpio = AT91_PIN_PC9, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap1-gpio4", + } + }, + { }, + }, // End of port 1 +// MFSER + { // Port 2 of 2 + { + .name = "AP2_GPIO3", + .pin = { + .gpio = AT91_PIN_PC22, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap2-gpio3", + } + }, + { + .name = "AP2_GPIO4", + .pin = { + .gpio = AT91_PIN_PC23, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap2-gpio4", + } + }, + { }, + }, // End of port 2 + { }, +}; + + static DEVICE_ATTR_MTS(dev_attr_wifi_bt_lpwkup, "wifi-bt-lpwkup", mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); static DEVICE_ATTR_MTS(dev_attr_wifi_bt_ulpwkup, "wifi-bt-ulpwkup", |