summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2014-10-01 11:11:12 -0500
committerMike Fiore <mfiore@multitech.com>2014-10-01 11:11:12 -0500
commit0f0c9bb72a3be330512e60677c4e3693347bf66b (patch)
tree34c30d2b32ce8d3553dace4cf353c5b192c7e1b7
parent0f27f5666932274a30ca018c7dacfd7a9e5fc8bb (diff)
downloadmts-io-0f0c9bb72a3be330512e60677c4e3693347bf66b.tar.gz
mts-io-0f0c9bb72a3be330512e60677c4e3693347bf66b.tar.bz2
mts-io-0f0c9bb72a3be330512e60677c4e3693347bf66b.zip
mts-io: remove "ap-" from gpiob gpio pin attributes
-rw-r--r--io-module/mtac_gpiob.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/io-module/mtac_gpiob.c b/io-module/mtac_gpiob.c
index ce1d7de..f8652c6 100644
--- a/io-module/mtac_gpiob.c
+++ b/io-module/mtac_gpiob.c
@@ -106,21 +106,21 @@ static int mts_spi_ap_remove(struct spi_device *spi)
}
static char* gpiob_gpio_pin_name_by_attr_name(const char* name) {
- if (! strcmp(name, "ap-led1:1")) {
+ if (! strcmp(name, "led1:1")) {
return "ap1-gpio3";
- } else if (! strcmp(name, "ap-led2:1")) {
+ } else if (! strcmp(name, "led2:1")) {
return "ap1-gpio4";
- } else if (! strcmp(name, "ap-dout-enable:1")) {
+ } else if (! strcmp(name, "dout-enable:1")) {
return "ap1-gpio1";
- } else if (! strcmp(name, "ap-reset:1")) {
+ } else if (! strcmp(name, "reset:1")) {
return "ap1-reset";
- } else if (! strcmp(name, "ap-led1:2")) {
+ } else if (! strcmp(name, "led1:2")) {
return "ap2-gpio3";
- } else if (! strcmp(name, "ap-led2:2")) {
+ } else if (! strcmp(name, "led2:2")) {
return "ap2-gpio4";
- } else if (! strcmp(name, "ap-dout-enable:2")) {
+ } else if (! strcmp(name, "dout-enable:2")) {
return "ap2-gpio1";
- } else if (! strcmp(name, "ap-reset:2")) {
+ } else if (! strcmp(name, "reset:2")) {
return "ap2-reset";
} else {
log_error("attirbute name [%s] is invalid for GPIOB", name);
@@ -372,7 +372,7 @@ static bool gpiob_setup(enum ap port) {
// add LEDs
for (i = 1; i <= 2; i++) {
- sprintf(buf, "ap-led%d:%d", i, port);
+ sprintf(buf, "led%d:%d", i, port);
attr = create_attribute(buf, MTS_ATTR_MODE_RW);
if (! attr) {
log_error("failed to create attribute[%s]", buf);
@@ -390,7 +390,7 @@ static bool gpiob_setup(enum ap port) {
}
// add misc attributes
- sprintf(buf, "ap-dout-enable:%d", port);
+ sprintf(buf, "dout-enable:%d", port);
attr = create_attribute(buf, MTS_ATTR_MODE_RW);
if (! attr) {
log_error("failed to create attribute[%s]", buf);
@@ -400,7 +400,7 @@ static bool gpiob_setup(enum ap port) {
attr->store = mts_attr_store_ap_gpio_pin;
device_attrs[device_attrs_size++] = &attr->attr;
- sprintf(buf, "ap-reset:%d", port);
+ sprintf(buf, "reset:%d", port);
attr = create_attribute(buf, MTS_ATTR_MODE_RW);
if (! attr) {
log_error("failed to create attribute[%s]", buf);