summaryrefslogtreecommitdiff
path: root/io-module
diff options
context:
space:
mode:
authorVyacheslav Pedash <vyacheslav.pedash@globallogic.com>2022-06-30 17:44:19 +0300
committerJohn Klug <john.klug@multitech.com>2022-09-23 12:36:04 -0500
commitaecbf5e33f1c91daae1a36fb46c005c4e9c694f2 (patch)
tree00f9a47213ee2113668fc670382856643349c0d3 /io-module
parent203864e4f32b983178b80534dc53b50c3325e352 (diff)
downloadmts-io-aecbf5e33f1c91daae1a36fb46c005c4e9c694f2.tar.gz
mts-io-aecbf5e33f1c91daae1a36fb46c005c4e9c694f2.tar.bz2
mts-io-aecbf5e33f1c91daae1a36fb46c005c4e9c694f2.zip
Use gpiod for mtcpm
Diffstat (limited to 'io-module')
-rw-r--r--io-module/machine/mtcpm.c70
1 files changed, 42 insertions, 28 deletions
diff --git a/io-module/machine/mtcpm.c b/io-module/machine/mtcpm.c
index 6ed4c6c..245225c 100644
--- a/io-module/machine/mtcpm.c
+++ b/io-module/machine/mtcpm.c
@@ -8,10 +8,11 @@ static struct gpio_pin gpio_pins_mtcpm[] = {
{
.name = "RADIO_RESET",
.pin = {
- .gpio = OMAP_GPIO(5,9), /* 5_9 */
- .flags = GPIOF_OUT_INIT_HIGH,
+ .gpio = ~0U,
+ .flags = GPIOD_OUT_HIGH,
.label = "radio-reset",
},
+ .do_gpio_desc = 1
},
#if 0
/* This goes through the PMIC for now */
@@ -27,75 +28,83 @@ static struct gpio_pin gpio_pins_mtcpm[] = {
{
.name = "DEVICE_RESET",
.pin = {
- .gpio = OMAP_GPIO(1,29),
- .flags = GPIOF_IN,
+ .gpio = ~0U,
+ .flags = GPIOD_IN,
.label = "reset",
},
+ .do_gpio_desc = 1,
.active_low = 1,
},
{
.name = "WIFI_BT_INT",
.pin = {
- .gpio = OMAP_GPIO(4,12), /* 4_12 */
- .flags = GPIOF_IN,
+ .gpio = ~0U,
+ .flags = GPIOD_IN,
.label = "wifi-bt-int",
},
+ .do_gpio_desc = 1,
.capability = CAPA_BLUETOOTH,
},
{
.name = "WIFI_RESET",
.pin = {
- .gpio = OMAP_GPIO(4,11), /* 4_11 */
- .flags = GPIOF_OUT_INIT_HIGH,
+ .gpio = ~0U,
+ .flags = GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
.label = "wlan-enabled",
},
+ .do_gpio_desc = 1,
.capability = CAPA_WIFI,
.active_low = 0,
},
{
.name = "BT_RESET",
.pin = {
- .gpio = OMAP_GPIO(4,10), /* 4_10 */
- .flags = GPIOF_OUT_INIT_HIGH,
+ .gpio = ~0U,
+ .flags = GPIOD_OUT_HIGH,
.label = "bt-enabled",
},
+ .do_gpio_desc = 1,
.capability = CAPA_BLUETOOTH,
.active_low = 0,
},
{
.name = "USBHUB_RESET",
.pin = {
- .gpio = OMAP_GPIO(2, 12),
- .flags = GPIOF_OUT_INIT_HIGH,
+ .gpio = ~0U,
+ .flags = GPIOD_OUT_HIGH,
.label = "usbhub-reset",
},
+ .do_gpio_desc = 1,
.active_low = 0,
},
{
.name = "ETH_RESET",
.pin = {
- .gpio = OMAP_GPIO(4,7), /* 4_7 */
- .flags = GPIOF_OUT_INIT_HIGH,
+ .gpio = ~0U,
+ .flags = GPIOD_OUT_HIGH,
.label = "eth-reset",
},
+ .do_gpio_desc = 1,
.active_low = 0,
},
{
.name = "GNSS_INT",
.pin = {
- .gpio = OMAP_GPIO(2, 16),
- .flags = GPIOF_OUT_INIT_HIGH,
+ .gpio = ~0U,
+ .flags = GPIOD_OUT_HIGH,
.label = "gnss-int",
},
+ .do_gpio_desc = 1,
.capability = CAPA_GPS,
},
{
.name = "GNSS_RESET",
.pin = {
- .gpio = OMAP_GPIO(5,10), /* 5_10 */
- .flags = GPIOF_OUT_INIT_HIGH,
+ .gpio = ~0U, /* 5_10 */
+ .flags = GPIOD_OUT_HIGH,
.label = "gnss-reset",
},
+ .do_gpio_desc = 1,
.capability = CAPA_GPS,
.active_low = 0,
},
@@ -114,42 +123,47 @@ static struct gpio_pin gpio_pins_mtcpm[] = {
{
.name = "STATUS_LED",
.pin = {
- .gpio = OMAP_GPIO(3, 22),
- .flags = GPIOF_OUT_INIT_LOW,
+ .gpio = ~0U,
+ .flags = GPIOD_OUT_LOW | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
.label = "led-status",
},
+ .do_gpio_desc = 1,
},
{
.name = "CD",
.pin = {
- .gpio = OMAP_GPIO(3, 23),
- .flags = GPIOF_OUT_INIT_HIGH,
+ .gpio = ~0U,
+ .flags = GPIOD_OUT_HIGH,
.label = "led-cd",
},
+ .do_gpio_desc = 1,
},
{
.name = "LED1",
.pin = {
- .gpio = OMAP_GPIO(4, 26),
- .flags = GPIOF_OUT_INIT_LOW,
+ .gpio = ~0U,
+ .flags = GPIOD_OUT_LOW,
.label = "led-sig1",
},
+ .do_gpio_desc = 1,
},
{
.name = "LED2",
.pin = {
- .gpio = OMAP_GPIO(4, 27),
- .flags = GPIOF_OUT_INIT_LOW,
+ .gpio = ~0U,
+ .flags = GPIOD_OUT_LOW,
.label = "led-sig2",
},
+ .do_gpio_desc = 1,
},
{
.name = "LED3",
.pin = {
- .gpio = OMAP_GPIO(4, 28),
- .flags = GPIOF_OUT_INIT_LOW,
+ .gpio = ~0U,
+ .flags = GPIOD_OUT_LOW,
.label = "led-sig3",
},
+ .do_gpio_desc = 1,
},
{ },
};