summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-10-03 17:31:15 -0500
committerJohn Klug <john.klug@multitech.com>2019-10-03 17:31:15 -0500
commitace6855ee90434b77bdf99f915804584251a6ea1 (patch)
tree96e16f29a8985e462ce6aaf9384174479eaa70c0
parent6edda2b3a73cbf41f6f92055d8949a4095f24d33 (diff)
downloadmts-io-ace6855ee90434b77bdf99f915804584251a6ea1.tar.gz
mts-io-ace6855ee90434b77bdf99f915804584251a6ea1.tar.bz2
mts-io-ace6855ee90434b77bdf99f915804584251a6ea1.zip
MTCAP 0.2 hardware revision with optional battery4.1.4
-rw-r--r--configure.ac2
-rw-r--r--io-module/mts-io.c9
-rw-r--r--io-module/mts_capab.c3
-rw-r--r--io-module/mts_eeprom.h1
-rw-r--r--io-module/mts_io_module.h5
-rwxr-xr-xio-tool/mts-io-sysfs2
-rw-r--r--io-tool/mts-io-sysfs-inc.sh2
7 files changed, 12 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index e5e16b0..97499a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([mts-io], [1.6.0])
+AC_INIT([mts-io], [4.1.4])
AC_CONFIG_SRCDIR([util/mts_util_lora2_reset.c])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER([config.h])
diff --git a/io-module/mts-io.c b/io-module/mts-io.c
index 5e557fd..954da63 100644
--- a/io-module/mts-io.c
+++ b/io-module/mts-io.c
@@ -3,10 +3,7 @@
*
* Copyright (C) 2014 by Multi-Tech Systems
* Copyright (C) 2016 by Multi-Tech Systems
- *
- * Authors: James Maki <jmaki@multitech.com>
- * Jesse Gilles <jgilles@multitech.com>
- * Mike Fiore <mfiore@multitech.com>
+ * Copyright (C) 2019 by Multi-Tech Systems
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -649,7 +646,8 @@ mts_id_eeprom_load(void)
log_debug("mts_id_eeprom: noradio=%d",noradio);
if (((tmp=HW_VERSION_MTCAP_0_0),strncmp(id_eeprom.hw_version, tmp, strlen(tmp)) == 0) ||
- ((tmp=HW_VERSION_MTCAP_0_1),strncmp(id_eeprom.hw_version, tmp, strlen(tmp)) == 0)) {
+ ((tmp=HW_VERSION_MTCAP_0_1),strncmp(id_eeprom.hw_version, tmp, strlen(tmp)) == 0) ||
+ ((tmp=HW_VERSION_MTCAP_0_2),strncmp(id_eeprom.hw_version, tmp, strlen(tmp)) == 0)) {
/* See if we have no radio, and if so, prune out the stuff that follows */
if(noradio) {
struct attribute **ap = mtcap_0_0_platform_attribute_group.attrs;
@@ -864,6 +862,7 @@ mts_id_eeprom_load(void)
log_info("capa-wifi: %s", DEVICE_CAPA(id_eeprom.capa, CAPA_WIFI) ? "yes" : "no");
log_info("capa-bluetooth: %s", DEVICE_CAPA(id_eeprom.capa, CAPA_BLUETOOTH) ? "yes" : "no");
log_info("capa-lora: %s", DEVICE_CAPA(id_eeprom.capa, CAPA_LORA) ? "yes" : "no");
+ log_info("capa-battery: %s", DEVICE_CAPA(id_eeprom.capa, CAPA_BATTERY) ? "yes" : "no");
if (DEVICE_CAPA(id_eeprom.capa, CAPA_BLUETOOTH)) {
log_info("mac-bluetooth: %02X:%02X:%02X:%02X:%02X:%02X",
diff --git a/io-module/mts_capab.c b/io-module/mts_capab.c
index 8495d87..17c505a 100644
--- a/io-module/mts_capab.c
+++ b/io-module/mts_capab.c
@@ -25,6 +25,7 @@ static struct capab_map_s capabilities_map[] = {
{ CAPA_BLUETOOTH, "bluetooth"},
{ CAPA_WIFI, "wifi"},
{ CAPA_LORA, "lora"},
+ { CAPA_BATTERY, "battery"},
};
static ssize_t capab_show_value(struct device *dev, struct device_attribute *at, char *buf) {
@@ -48,6 +49,7 @@ static DEVICE_ATTR_RO_MTS(capa_attr_adc, "adc", capab_show_value);
static DEVICE_ATTR_RO_MTS(capa_attr_bt, "bluetooth", capab_show_value);
static DEVICE_ATTR_RO_MTS(capa_attr_wifi, "wifi", capab_show_value);
static DEVICE_ATTR_RO_MTS(capa_attr_lora, "lora", capab_show_value);
+static DEVICE_ATTR_RO_MTS(capa_attr_battery, "battery", capab_show_value);
static struct attribute *mts_capa_attributes[] = {
&capa_attr_gps.attr,
@@ -57,6 +59,7 @@ static struct attribute *mts_capa_attributes[] = {
&capa_attr_bt.attr,
&capa_attr_wifi.attr,
&capa_attr_lora.attr,
+ &capa_attr_battery.attr,
NULL,
};
diff --git a/io-module/mts_eeprom.h b/io-module/mts_eeprom.h
index 478a107..8e1d76c 100644
--- a/io-module/mts_eeprom.h
+++ b/io-module/mts_eeprom.h
@@ -64,4 +64,5 @@ do { \
/* Used for rs9113 detection in Conduit 0.1 and others */
#define CAPA_WIFI DEVICE_CAPA_VALUE(1, 6)
#define CAPA_LORA DEVICE_CAPA_VALUE(1, 3) // on-board lora
+#define CAPA_BATTERY DEVICE_CAPA_VALUE(1, 4) // 1st battery type
#endif /* __MTS_EEPROM_H */
diff --git a/io-module/mts_io_module.h b/io-module/mts_io_module.h
index 41a27e5..6a84d4c 100644
--- a/io-module/mts_io_module.h
+++ b/io-module/mts_io_module.h
@@ -5,8 +5,8 @@
* MTAC cards.
*/
-#define DRIVER_VERSION "v4.1.3"
-#define DRIVER_AUTHOR "James Maki <jmaki@multitech.com>"
+#define DRIVER_VERSION "v4.1.4"
+#define DRIVER_AUTHOR "Multitech Systems"
#define DRIVER_DESC "MTS-IO Controller"
#define DRIVER_NAME "mts-io"
#define DEBUG 0
@@ -37,6 +37,7 @@
#define HW_VERSION_MTCDTIPHP_0_0 "MTCDTIPHP-0.0"
#define HW_VERSION_MTCAP_0_0 "MTCAP-0.0"
#define HW_VERSION_MTCAP_0_1 "MTCAP-0.1"
+#define HW_VERSION_MTCAP_0_2 "MTCAP-0.2"
#define HW_VERSION_MTHS_0_0 "MTHS-0.0"
#define HW_VERSION_MTHS_0_1 "MTHS-0.1"
diff --git a/io-tool/mts-io-sysfs b/io-tool/mts-io-sysfs
index a7f7455..db1e6eb 100755
--- a/io-tool/mts-io-sysfs
+++ b/io-tool/mts-io-sysfs
@@ -4,8 +4,6 @@
#
# Copyright (C) 2010 by Multi-Tech Systems
#
-# Author: James Maki <jmaki@multitech.com>
-#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
diff --git a/io-tool/mts-io-sysfs-inc.sh b/io-tool/mts-io-sysfs-inc.sh
index cec9943..3731b1b 100644
--- a/io-tool/mts-io-sysfs-inc.sh
+++ b/io-tool/mts-io-sysfs-inc.sh
@@ -4,8 +4,6 @@
#
# Copyright (C) 2010 by Multi-Tech Systems
#
-# Author: James Maki <jmaki@multitech.com>
-#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or