summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykyta Dorokhin <mykyta.dorokhin@globallogic.com>2022-02-08 23:46:59 +0200
committerJohn Klug <john.klug@multitech.com>2022-02-16 16:13:21 -0600
commit25a9a0239427de73c777b827d922642e6f46b646 (patch)
tree5b9faaf82bb274fbe89a158b643e692fe19fb8ae
parent5ab6ade834808da692bdd264e97a64eea6dbd1f6 (diff)
downloadmts-io-25a9a0239427de73c777b827d922642e6f46b646.tar.gz
mts-io-25a9a0239427de73c777b827d922642e6f46b646.tar.bz2
mts-io-25a9a0239427de73c777b827d922642e6f46b646.zip
mtcap3: correct init valies for the leds, change led names
-rw-r--r--io-module/machine/mtcap3.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/io-module/machine/mtcap3.c b/io-module/machine/mtcap3.c
index 0be5be6..738244e 100644
--- a/io-module/machine/mtcap3.c
+++ b/io-module/machine/mtcap3.c
@@ -85,7 +85,7 @@ static struct gpio_pin gpio_pins_mtcap3_0_0[] = {
},
/* LEDs */
{
- .name = "STATUS_LED", // DEV_LED_GN
+ .name = "STATUS_LED",
.pin = {
.gpio = NXP_GPIO(2, 15),
.flags = GPIOF_OUT_INIT_HIGH,
@@ -93,7 +93,7 @@ static struct gpio_pin gpio_pins_mtcap3_0_0[] = {
},
},
{
- .name = "LED2", // LED2 is for LoRa status
+ .name = "LED2",
.pin = {
.gpio = NXP_GPIO(3, 21),
.flags = GPIOF_OUT_INIT_LOW,
@@ -101,22 +101,21 @@ static struct gpio_pin gpio_pins_mtcap3_0_0[] = {
},
},
{
- .name = "LED3", // LED3 is for Cellular status (Modem can directly enable it)
+ .name = "LED3",
.pin = {
.gpio = NXP_GPIO(3, 22),
- .flags = GPIOF_OUT_INIT_HIGH,
- .label = "led-cd",
+ .flags = GPIOF_OUT_INIT_LOW,
+ .label = "led-cell",
},
},
{
- .name = "LED4", // LED4 is for power status
+ .name = "LED4",
.pin = {
.gpio = NXP_GPIO(3, 23),
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_OUT_INIT_HIGH,
.label = "led-power",
},
},
- // NXP_GPIO(3, 28), LED_EXTRA on the Rev 0 schem., is always on power
{ },
};
@@ -388,7 +387,9 @@ static DEVICE_ATTR_MTS(dev_attr_eth_reset_mtcap3, "eth-reset",
static DEVICE_ATTR_MTS(dev_attr_led_lora_gpio_mtcap3, "led-lora",
mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
-// here to maintain compatiblility
+static DEVICE_ATTR_MTS(dev_attr_led_cell_gpio_mtcap3, "led-cell",
+ mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
+
static DEVICE_ATTR_MTS(dev_attr_radio_enable_mtcap3, "radio-enable",
mts_attr_show_radio_enable_mtcap3, mts_attr_store_radio_enable_mtcap3);
@@ -411,7 +412,7 @@ static struct attribute *mtcap3_0_0_platform_attributes[] = {
&dev_attr_eth_reset_mtcap3.attr,
&dev_attr_led_status.attr,
- &dev_attr_led_cd_gpio.attr,
+ &dev_attr_led_cell_gpio_mtcap3.attr,
&dev_attr_led_lora_gpio_mtcap3.attr,
&dev_attr_led_power_gpio_mtcap3.attr,