summaryrefslogtreecommitdiff
path: root/io-module/gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'io-module/gpio.c')
-rw-r--r--io-module/gpio.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/io-module/gpio.c b/io-module/gpio.c
index 72c55f6..4a2d963 100644
--- a/io-module/gpio.c
+++ b/io-module/gpio.c
@@ -81,3 +81,18 @@ static ssize_t mts_attr_store_gpio_pin(struct device *dev,
return count;
}
+
+static int reset_gpio_pin(struct gpio_pin *pin, unsigned int delay_ms, unsigned int value)
+{
+ if (!pin) {
+ return -ENODEV;
+ }
+
+ gpio_set_value(pin->pin.gpio, value);
+
+ mdelay(delay_ms);
+
+ gpio_set_value(pin->pin.gpio, !value);
+
+ return 0;
+}