summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykyta Dorokhin <mykyta.dorokhin@globallogic.com>2016-09-14 21:10:20 +0300
committerMykyta Dorokhin <mykyta.dorokhin@globallogic.com>2016-09-14 21:11:56 +0300
commit6192f3b1193c5a839547b5acd9da1ea03bafccce (patch)
tree3b7915d398f39f93f768f37c32b170d38cbf2756
parentf544b19438dc3a0c14b957d8ba5fcc1113ecf542 (diff)
downloadmts-io-6192f3b1193c5a839547b5acd9da1ea03bafccce.tar.gz
mts-io-6192f3b1193c5a839547b5acd9da1ea03bafccce.tar.bz2
mts-io-6192f3b1193c5a839547b5acd9da1ea03bafccce.zip
mtp: remove led-a/b/c/d, add led-status properly1.3.1
-rw-r--r--io-module/mtp.c69
-rw-r--r--io-module/mts_io.c2
2 files changed, 11 insertions, 60 deletions
diff --git a/io-module/mtp.c b/io-module/mtp.c
index 3d536a4..9726b86 100644
--- a/io-module/mtp.c
+++ b/io-module/mtp.c
@@ -8,7 +8,6 @@ static struct gpio_pin gpio_pins_mtp_0_0[] = {
.flags = GPIOF_OUT_INIT_HIGH,
.label = "eth-enabled",
},
- .active_low = 0,
},
{
.name = "RADIO_POWER_MONITOR",
@@ -44,39 +43,30 @@ static struct gpio_pin gpio_pins_mtp_0_0[] = {
.active_low = 1,
},
{
- .name = "USER_PUSHBUTTON",
- .pin = {
- .gpio = AT91_PIN_PA5, // User Pushbutton
- .flags = GPIOF_IN,
- .label = "button",
- },
- .active_low = 1,
- },
- {
.name = "LORA_RESET",
.pin = {
.gpio = AT91_PIN_PA8, // LORA_RST
- .flags = GPIOF_OUT_INIT_HIGH,
+ .flags = GPIOF_OUT_INIT_LOW,
.label = "lora-reset",
},
},
/* LEDs */
{
- .name = "LED2", // LED2 is for LoRa status
+ .name = "STATUS_LED", // DEV_LED_GN
.pin = {
- .gpio = AT91_PIN_PC15,
- .flags = GPIOF_OUT_INIT_HIGH,
- .label = "led-lora",
+ .gpio = AT91_PIN_PC25,
+ .flags = GPIOF_OUT_INIT_LOW,
+ .label = "led-status",
},
.active_low = 1,
},
{
- .name = "LED2",
+ .name = "LED2", // LED2 is for LoRa status
.pin = {
.gpio = AT91_PIN_PC15,
.flags = GPIOF_OUT_INIT_HIGH,
- .label = "led-a",
+ .label = "led-lora",
},
.active_low = 1,
},
@@ -90,15 +80,6 @@ static struct gpio_pin gpio_pins_mtp_0_0[] = {
.active_low = 1,
},
{
- .name = "LED3",
- .pin = {
- .gpio = AT91_PIN_PC16,
- .flags = GPIOF_OUT_INIT_HIGH,
- .label = "led-b",
- },
- .active_low = 1,
- },
- {
.name = "LED4", // LED4 is for WiFi status
.pin = {
.gpio = AT91_PIN_PC20,
@@ -107,33 +88,6 @@ static struct gpio_pin gpio_pins_mtp_0_0[] = {
},
.active_low = 1,
},
- {
- .name = "LED4",
- .pin = {
- .gpio = AT91_PIN_PC20,
- .flags = GPIOF_OUT_INIT_HIGH,
- .label = "led-c",
- },
- .active_low = 1,
- },
- {
- .name = "LED5", // DEV_LED_GN
- .pin = {
- .gpio = AT91_PIN_PC25,
- .flags = GPIOF_OUT_INIT_HIGH,
- .label = "led-dev",
- },
- .active_low = 1,
- },
- {
- .name = "LED5",
- .pin = {
- .gpio = AT91_PIN_PC25,
- .flags = GPIOF_OUT_INIT_HIGH,
- .label = "led-d",
- },
- .active_low = 1,
- },
{ },
};
@@ -371,7 +325,7 @@ static DEVICE_ATTR_MTS(dev_attr_eth_enabled_mtp, "eth-enabled",
static DEVICE_ATTR_MTS(dev_attr_led_lora_gpio_mtp, "led-lora",
mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
-static DEVICE_ATTR_MTS(dev_attr_led_dev_gpio_mtp, "led-dev",
+static DEVICE_ATTR_MTS(dev_attr_led_wifi_gpio_mtp, "led-wifi",
mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
static struct attribute *mtp_0_0_platform_attributes[] = {
@@ -400,14 +354,11 @@ static struct attribute *mtp_0_0_platform_attributes[] = {
&dev_attr_radio_reset_backoff_index.attr,
&dev_attr_radio_reset_backoff_seconds.attr,
+ &dev_attr_led_status.attr,
&dev_attr_led_cd_gpio.attr,
&dev_attr_led_lora_gpio_mtp.attr,
- &dev_attr_led_dev_gpio_mtp.attr,
+ &dev_attr_led_wifi_gpio_mtp.attr,
- &dev_attr_led_a_gpio.attr,
- &dev_attr_led_b_gpio.attr,
- &dev_attr_led_c_gpio.attr,
- &dev_attr_led_d_gpio.attr,
&dev_attr_lora_reset_mtp.attr,
NULL,
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index bf0a6bd..17bf31f 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -47,7 +47,7 @@
#include "mts_io.h"
-#define DRIVER_VERSION "v1.1.3"
+#define DRIVER_VERSION "v1.4.0"
#define DRIVER_AUTHOR "James Maki <jmaki@multitech.com>"
#define DRIVER_DESC "MTS-IO Controller"
#define DRIVER_NAME "mts-io"