diff options
Diffstat (limited to 'io-module/mts_io.c')
-rw-r--r-- | io-module/mts_io.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c index f3b79d5..1122127 100644 --- a/io-module/mts_io.c +++ b/io-module/mts_io.c @@ -47,7 +47,7 @@ #include "mts_io.h" -#define DRIVER_VERSION "v1.3.3" +#define DRIVER_VERSION "v1.3.3.8" #define DRIVER_AUTHOR "James Maki <jmaki@multitech.com>" #define DRIVER_DESC "MTS-IO Controller" #define DRIVER_NAME "mts-io" @@ -503,7 +503,7 @@ static ssize_t mts_attr_show_radio_reset_backoff_seconds(struct device *dev, if (strcmp(attr->attr.name, "radio-reset-backoff-seconds") == 0) { if (radio_reset_timer_is_start == 1) { - value = sprintf(buf, "%d", (timings_data_stop_seconds - time_now_secs())); + value = sprintf(buf, "%u", (timings_data_stop_seconds - time_now_secs())); } else { value = sprintf(buf, "%d", 0); } @@ -881,9 +881,11 @@ static int __init mts_io_init(void) } 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); + log_info("MTS: name %s: capability=%x, DEVICE_CAPA=%d",pin->name,pin->capability,id_eeprom.capa[DEVICE_CAPA_INDEX(pin->capability)]); + if (pin->capability == 0 || DEVICE_CAPA(id_eeprom.capa,pin->capability)) { + 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); } } |