summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2014-10-08 15:30:24 -0500
committerMike Fiore <mfiore@multitech.com>2014-10-08 15:30:24 -0500
commit44f859e243f646f3d2bd9540027816e3b4981ab9 (patch)
tree591634acb576d39b888d2131de84c6002a11e774
parentddb473a94114a6de7f0ec0dbd3a90021b2baa87f (diff)
downloadmts-io-44f859e243f646f3d2bd9540027816e3b4981ab9.tar.gz
mts-io-44f859e243f646f3d2bd9540027816e3b4981ab9.tar.bz2
mts-io-44f859e243f646f3d2bd9540027816e3b4981ab9.zip
mts_io: init: add registering of gpio pins back to __init, shouldn't have been removed
-rw-r--r--io-module/mts_io.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index 0710345..6ce8981 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -476,6 +476,7 @@ static void cleanup(void)
static int __init mts_io_init(void)
{
+ struct gpio_pin *pin;
int ret;
int port_index;
@@ -522,6 +523,13 @@ static int __init mts_io_init(void)
return ret;
}
+ for (pin = gpio_pins; *pin->name; pin++) {
+ ret = gpio_request_one(pin->pin.gpio, pin->pin.flags, pin->pin.label);
+ if (ret) {
+ log_debug("could not request pin %s (%d) but it could have already been requested under a different pin name", pin->name, ret);
+ }
+ }
+
// start the reset handler
reset_callback(NULL);