summaryrefslogtreecommitdiff
path: root/io-module/mts_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io-module/mts_io.c')
-rw-r--r--io-module/mts_io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index f47e2ea..aad181f 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -253,19 +253,19 @@ static DEVICE_ATTR_RO_MTS(dev_attr_reset, "reset", mts_attr_show_gpio_pin);
static ssize_t mts_attr_store_radio_reset(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
- int value;
+ int value; /* 0 = normal reset; -1 = forced reset */
int err;
struct gpio_pin *pin;
if (sscanf(buf, "%i", &value) != 1) {
return -EINVAL;
}
- if (value != 0) {
+ if (value != 0 && value != -1) {
return -EINVAL;
}
/* check reset timings is enabled */
- if (NULL != timings_data) {
+ if (value != -1 && NULL != timings_data) {
/* check reset timer is started */
if (radio_reset_timer_is_start == 1) {
log_info("radio reset timer is running. \n");