summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2014-04-24 10:47:45 -0500
committerMike Fiore <mfiore@multitech.com>2014-04-24 10:47:45 -0500
commit6eaa68729d0b3faa2af805b2c065c05a823c5ecc (patch)
treed672b56599084a7ff8aec2276acc6772bb169bc5
parentec92fa999d5efb9ba0a9bba169b18bcce80a4f2b (diff)
downloadcdp-io-controller-6eaa68729d0b3faa2af805b2c065c05a823c5ecc.tar.gz
cdp-io-controller-6eaa68729d0b3faa2af805b2c065c05a823c5ecc.tar.bz2
cdp-io-controller-6eaa68729d0b3faa2af805b2c065c05a823c5ecc.zip
mts-io: add mts_eeprom.h to separate out eeprom information
this is useful because mts_io.h now includes kernel headers and can't be included in userspace apps
-rw-r--r--io-module/mts_eeprom.h28
-rw-r--r--io-module/mts_io.h25
2 files changed, 29 insertions, 24 deletions
diff --git a/io-module/mts_eeprom.h b/io-module/mts_eeprom.h
new file mode 100644
index 0000000..56b2871
--- /dev/null
+++ b/io-module/mts_eeprom.h
@@ -0,0 +1,28 @@
+#ifndef __MTS_EEPROM_H
+#define __MTS_EEPROM_H
+
+/* on-board EEPROM */
+struct mts_id_eeprom_layout {
+ char vendor_id[32];
+ char product_id[32];
+ char device_id[32];
+ char hw_version[32];
+ uint8_t mac_addr[6];
+ char imei[32];
+ uint8_t capa[32];
+ uint8_t mac_bluetooth[6];
+ uint8_t mac_wifi[6];
+ uint8_t reserved[302];
+};
+
+/* daughter card EEPROM */
+struct mts_dc_eeprom_layout {
+ char vendor_id[32];
+ char product_id[32];
+ char device_id[32];
+ char hw_version[32];
+ uint8_t mac_addr[6];
+ uint8_t reserved[378];
+};
+
+#endif
diff --git a/io-module/mts_io.h b/io-module/mts_io.h
index 0af81f2..783438a 100644
--- a/io-module/mts_io.h
+++ b/io-module/mts_io.h
@@ -9,6 +9,7 @@
#endif
#endif
+#include <linux/mts_eeprom.h>
#include <linux/gpio.h>
#define MTS_ATTR_MODE_RW S_IWUSR | S_IRUGO
@@ -91,30 +92,6 @@ do { \
#define CAPA_BLUETOOTH DEVICE_CAPA_VALUE(1, 7)
#define CAPA_WIFI DEVICE_CAPA_VALUE(1, 6)
-/* on-board EEPROM */
-struct mts_id_eeprom_layout {
- char vendor_id[32];
- char product_id[32];
- char device_id[32];
- char hw_version[32];
- uint8_t mac_addr[6];
- char imei[32];
- uint8_t capa[32];
- uint8_t mac_bluetooth[6];
- uint8_t mac_wifi[6];
- uint8_t reserved[302];
-};
-
-/* daughter card EEPROM */
-struct mts_dc_eeprom_layout {
- char vendor_id[32];
- char product_id[32];
- char device_id[32];
- char hw_version[32];
- uint8_t mac_addr[6];
- uint8_t reserved[378];
-};
-
// GPIO pin types:input, output, open drain (1 = high Z, 0 = output low)
enum {
GPIO_DIR_INPUT,