summaryrefslogtreecommitdiff
path: root/include/linux/m4sensorhub
diff options
context:
space:
mode:
authorDoug Zobel <dzobel1@motorola.com>2013-11-15 14:29:07 -0600
committerJames Wylder <jwylder@motorola.com>2014-03-05 17:46:52 -0600
commitd2a782003a6047da120a33e6f8ee6fd33bb825d6 (patch)
tree8d20bd4ecda62a06e98993c4108456bc1acb0d0b /include/linux/m4sensorhub
parent32fd2d36d2464056d4522a9c02797b7c2b2e884f (diff)
downloadolio-linux-3.10-d2a782003a6047da120a33e6f8ee6fd33bb825d6.tar.xz
olio-linux-3.10-d2a782003a6047da120a33e6f8ee6fd33bb825d6.zip
CW integration and minnow bringup
* create minnow machine type * create Android makefile * add pre-commit syntax check * enable -Werror * Add drivers: CPCAP, TPS65xxx, m4sensorhub, atmxt, lm3535, usb gadget, minnow display, TI 12xx wireless Change-Id: I7962f5e1256715f2452aed5a62a4f2f2383d5046
Diffstat (limited to 'include/linux/m4sensorhub')
-rw-r--r--include/linux/m4sensorhub/MemMapAccelSensor.h29
-rw-r--r--include/linux/m4sensorhub/MemMapAudio.h29
-rw-r--r--include/linux/m4sensorhub/MemMapCompassSensor.h30
-rw-r--r--include/linux/m4sensorhub/MemMapDownload.h51
-rw-r--r--include/linux/m4sensorhub/MemMapFusionSensor.h37
-rw-r--r--include/linux/m4sensorhub/MemMapGesture.h46
-rw-r--r--include/linux/m4sensorhub/MemMapGyroSensor.h29
-rw-r--r--include/linux/m4sensorhub/MemMapLog.h49
-rw-r--r--include/linux/m4sensorhub/MemMapPassive.h26
-rw-r--r--include/linux/m4sensorhub/MemMapPedometer.h34
-rw-r--r--include/linux/m4sensorhub/MemMapPressureSensor.h29
-rw-r--r--include/linux/m4sensorhub/MemMapTempSensor.h26
-rw-r--r--include/linux/m4sensorhub/m4sensorhub_bank_enum.h51
-rw-r--r--include/linux/m4sensorhub/m4sensorhub_irqs.h78
-rw-r--r--include/linux/m4sensorhub/m4sensorhub_reg_enum.h160
-rw-r--r--include/linux/m4sensorhub/m4sensorhub_registers.h33
16 files changed, 737 insertions, 0 deletions
diff --git a/include/linux/m4sensorhub/MemMapAccelSensor.h b/include/linux/m4sensorhub/MemMapAccelSensor.h
new file mode 100644
index 00000000000..5ba43e340e5
--- /dev/null
+++ b/include/linux/m4sensorhub/MemMapAccelSensor.h
@@ -0,0 +1,29 @@
+/*********************************************************************
+*
+* Copyright (C) 2012 Motorola, Inc.
+*
+**********************************************************************
+
+File : MemMapAccelSensor.h
+Purpose :
+**********************************************************************/
+#ifndef __MEMMAP_ACCELSENSOR_H__
+#define __MEMMAP_ACCELSENSOR_H__
+/****************************** Defines *******************************/
+typedef struct memMapAccel {
+ u8 version;
+ u8 testCmd;
+ u16 dummy; /* Align to 32-bit boundary */
+ s32 x;
+ s32 y;
+ s32 z;
+} sAccelData;
+
+/**************************** Globals ********************************/
+
+
+/***************************** Prototypes *****************************/
+
+
+
+#endif /* __MEMMAP_ACCELSENSOR_H__ */
diff --git a/include/linux/m4sensorhub/MemMapAudio.h b/include/linux/m4sensorhub/MemMapAudio.h
new file mode 100644
index 00000000000..4a874beac39
--- /dev/null
+++ b/include/linux/m4sensorhub/MemMapAudio.h
@@ -0,0 +1,29 @@
+/*********************************************************************
+*
+* Copyright (C) 2012 Motorola, Inc.
+*
+**********************************************************************
+
+File : MemMapAudio.h
+Purpose :
+**********************************************************************/
+#ifndef __MEMMAP_AUDIO_H__
+#define __MEMMAP_AUDIO_H__
+/****************************** Defines *******************************/
+typedef struct memMapAudio {
+ u8 version;
+ u8 enable;
+ u16 dummy;
+ u32 totalPackets;
+} sAudioData;
+
+#define AUDIO_BUFFER_SIZE 800
+/**************************** Globals ********************************/
+
+
+/***************************** Prototypes *****************************/
+
+
+
+#endif /* __MEMMAP_AUDIO_H__ */
+
diff --git a/include/linux/m4sensorhub/MemMapCompassSensor.h b/include/linux/m4sensorhub/MemMapCompassSensor.h
new file mode 100644
index 00000000000..a4da37d43b1
--- /dev/null
+++ b/include/linux/m4sensorhub/MemMapCompassSensor.h
@@ -0,0 +1,30 @@
+/*********************************************************************
+*
+* Copyright (C) 2012 Motorola, Inc.
+*
+**********************************************************************
+
+File : MemMapCompassSensor.h
+Purpose :
+**********************************************************************/
+#ifndef __MEMMAP_COMPASSSENSOR_H__
+#define __MEMMAP_COMPASSSENSOR_H__
+/****************************** Defines *******************************/
+typedef struct memMapCompass {
+ u8 version;
+ u8 testCmd;
+ u16 dummy; /* Align to 32-bit boundary */
+ s32 x;
+ s32 y;
+ s32 z;
+ s8 accuracy;
+} sCompassData;
+
+/**************************** Globals ********************************/
+
+
+/***************************** Prototypes *****************************/
+
+
+
+#endif /* __MEMMAP_COMPASSSENSOR_H__ */
diff --git a/include/linux/m4sensorhub/MemMapDownload.h b/include/linux/m4sensorhub/MemMapDownload.h
new file mode 100644
index 00000000000..526a917c0b9
--- /dev/null
+++ b/include/linux/m4sensorhub/MemMapDownload.h
@@ -0,0 +1,51 @@
+/*********************************************************************
+*
+* Copyright (C) 2012 Motorola, Inc.
+*
+**********************************************************************
+File : MemMapDownload.h
+Purpose :
+**********************************************************************/
+#ifndef __MEMMAP_DOWNLOAD_H__
+#define __MEMMAP_DOWNLOAD_H__
+/****************************** Defines *******************************/
+
+/* These enums and defines need to match up with the enums
+ * in m4sensorhub_client_ioctl.h
+ */
+
+#define M4SH_DL_FILENAME_SIZE 16
+#define M4SH_DL_PACKET_SIZE 100
+
+enum download_error_codes {
+ DOWNLOAD_SUCCESS,
+ DOWNLOAD_ERROR_GET_CHECKSUM,
+ DOWNLOAD_ERROR_OPEN_FILE,
+ DOWNLOAD_ERROR_WRITE_FILE,
+ DOWNLOAD_ERROR_CLOSE_FILE,
+ DOWNLOAD_ERROR_DELETE_FILE,
+ DOWNLOAD_ERROR_INVALID_SIZE,
+ /*internal error code for M4<==>Kernel*/
+ DOWNLOAD_ERROR_SEND_CMD = 0x80,
+ DOWNLOAD_ERROR_DATA_CHECKSUM,
+};
+
+enum downloadCmds {
+ DOWNLOAD_CMD_GET_CHECKSUM,
+ DOWNLOAD_CMD_OPEN_FILE,
+ DOWNLOAD_CMD_WRITE_FILE,
+ DOWNLOAD_CMD_CLOSE_FILE,
+ DOWNLOAD_CMD_DELETE_FILE,
+};
+
+typedef struct memMapDownload {
+ u8 version;
+ u8 command;
+ u8 status;
+ u8 size;
+ u32 checksum;
+ u8 filename[M4SH_DL_FILENAME_SIZE];
+ u8 packet[M4SH_DL_PACKET_SIZE];
+} sDownload;
+
+#endif /*__MEMMAP_DOWNLOAD_H__*/
diff --git a/include/linux/m4sensorhub/MemMapFusionSensor.h b/include/linux/m4sensorhub/MemMapFusionSensor.h
new file mode 100644
index 00000000000..2d4c2bfb56f
--- /dev/null
+++ b/include/linux/m4sensorhub/MemMapFusionSensor.h
@@ -0,0 +1,37 @@
+/*********************************************************************
+*
+* Copyright (C) 2012 Motorola, Inc.
+*
+**********************************************************************
+
+File : MemMapFusionSensor.h
+Purpose :
+**********************************************************************/
+#ifndef __MEMMAP_FUSIONSENSOR_H__
+#define __MEMMAP_FUSIONSENSOR_H__
+/****************************** Defines *******************************/
+typedef struct memMapFusion {
+ u8 version;
+ u8 testCmd;
+ u16 dummy;
+ s32 eulerPitch;
+ s32 eulerRoll;
+ s32 eulerYaw;
+ s32 localX;
+ s32 localY;
+ s32 localZ;
+ s32 worldX;
+ s32 worldY;
+ s32 worldZ;
+ s16 heading;
+ s8 heading_accuracy;
+} sFusionData;
+
+/**************************** Globals ********************************/
+
+
+/***************************** Prototypes *****************************/
+
+
+
+#endif /* __MEMMAP_FUSIONSENSOR_H__ */
diff --git a/include/linux/m4sensorhub/MemMapGesture.h b/include/linux/m4sensorhub/MemMapGesture.h
new file mode 100644
index 00000000000..9480a42ae11
--- /dev/null
+++ b/include/linux/m4sensorhub/MemMapGesture.h
@@ -0,0 +1,46 @@
+/*********************************************************************
+*
+* Copyright (C) 2012 Motorola, Inc.
+*
+**********************************************************************
+
+File : MemMapGesture.h
+Purpose :
+**********************************************************************/
+#ifndef __MEMMAP_GESTURE_H__
+#define __MEMMAP_GESTURE_H__
+/********************************** Defines **************************/
+typedef struct memMapGesture {
+ u8 version;
+ u8 gesture1;
+ u8 confidence1;
+ s8 value1;
+ u8 gesture2;
+ u8 confidence2;
+ s8 value2;
+ u8 gesture3;
+ u8 confidence3;
+ s8 value3;
+} sGestureData;
+
+typedef enum {
+ GESTURE_NONE,
+ GESTURE_VIEW,
+ GESTURE_WRIST_ROTATE,
+ GESTURE_TAP,
+ GESTURE_HANDSHAKE,
+ GESTURE_HANDWAVE,
+ GESTURE_FISTBUMP,
+ GESTURE_WATCH_ON,
+ GESTURE_WATCH_OFF,
+ GESTURE_TILT_SCROLL,
+ GESTURE_MAX
+} eGestureType;
+
+/********************************** Globals **************************/
+
+/********************************** Prototypes ***********************/
+
+
+
+#endif /* __MEMMAP_GESTURE_H__ */
diff --git a/include/linux/m4sensorhub/MemMapGyroSensor.h b/include/linux/m4sensorhub/MemMapGyroSensor.h
new file mode 100644
index 00000000000..af2f46574cd
--- /dev/null
+++ b/include/linux/m4sensorhub/MemMapGyroSensor.h
@@ -0,0 +1,29 @@
+/*********************************************************************
+*
+* Copyright (C) 2012 Motorola, Inc.
+*
+**********************************************************************
+
+File : MemMapGyroSensor.h
+Purpose :
+**********************************************************************/
+#ifndef __MEMMAP_GYROSENSOR_H__
+#define __MEMMAP_GYROSENSOR_H__
+/****************************** Defines *******************************/
+typedef struct memMapGyro {
+ u8 version;
+ u8 testCmd;
+ u16 dummy; /* Align to 32-bit boundary */
+ s32 x;
+ s32 y;
+ s32 z;
+} sGyroData;
+
+/**************************** Globals ********************************/
+
+
+/***************************** Prototypes *****************************/
+
+
+
+#endif /* __MEMMAP_GYROSENSOR_H__*/
diff --git a/include/linux/m4sensorhub/MemMapLog.h b/include/linux/m4sensorhub/MemMapLog.h
new file mode 100644
index 00000000000..390053900ca
--- /dev/null
+++ b/include/linux/m4sensorhub/MemMapLog.h
@@ -0,0 +1,49 @@
+/*********************************************************************
+*
+* Copyright (C) 2012 Motorola, Inc.
+*
+**********************************************************************
+File : MemMapLog.h
+Purpose :
+**********************************************************************/
+#ifndef __MEMMAP_LOG_H__
+#define __MEMMAP_LOG_H__
+/****************************** Defines *******************************/
+struct memMapLog {
+ u64 logEnable;
+ u8 isLogImmediate;
+};
+
+#define LOG_MAX 20
+#define LOG_LEVELS_MAX 4
+
+static char acLogTags[LOG_MAX][40] = {
+ "LOG_GENERAL",
+ "LOG_TIMER",
+ "LOG_ACCEL",
+ "LOG_TEMPERATURE",
+ "LOG_PRESSURE",
+ "LOG_PEDOMETER",
+ "LOG_TCMD",
+ "LOG_GYRO",
+ "LOG_COMPASS",
+ "LOG_FUSION",
+ "LOG_METS",
+ "LOG_GESTURE",
+ "LOG_POWER",
+ "LOG_CORRELATION",
+ "LOG_GPS",
+ "LOG_DL",
+ "LOG_AUDIO",
+ "LOG_DISP",
+ "LOG_WRIST",
+ "LOG_PASSIVE"
+};
+
+static char acLogLevels[LOG_LEVELS_MAX][15] = {
+ "LOG_DISABLE",
+ "LOG_ERROR",
+ "LOG_VERBOSE",
+ "LOG_DEBUG"
+};
+#endif /* __MEMMAP_LOG_H__ */
diff --git a/include/linux/m4sensorhub/MemMapPassive.h b/include/linux/m4sensorhub/MemMapPassive.h
new file mode 100644
index 00000000000..3d2c016b1ed
--- /dev/null
+++ b/include/linux/m4sensorhub/MemMapPassive.h
@@ -0,0 +1,26 @@
+/*********************************************************************
+*
+* Copyright (C) 2012 Motorola, Inc.
+*
+**********************************************************************
+
+File : MemMapPassive.h
+Purpose :
+**********************************************************************/
+#ifndef __MEMMAP_PASSIVE_H__
+#define __MEMMAP_PASSIVE_H__
+/********************************** Defines **************************/
+
+#define MAX_PASSIVE_BUFFERS 12
+
+typedef struct memMapPassive {
+ u32 timestamp[MAX_PASSIVE_BUFFERS];
+ u32 steps[MAX_PASSIVE_BUFFERS];
+ u32 mets[MAX_PASSIVE_BUFFERS];
+ u32 floorsClimbed[MAX_PASSIVE_BUFFERS];
+} sPassive;
+
+/********************************** Globals ***************************/
+
+/********************************** Prototypes ************************/
+#endif
diff --git a/include/linux/m4sensorhub/MemMapPedometer.h b/include/linux/m4sensorhub/MemMapPedometer.h
new file mode 100644
index 00000000000..129acee157d
--- /dev/null
+++ b/include/linux/m4sensorhub/MemMapPedometer.h
@@ -0,0 +1,34 @@
+/*********************************************************************
+*
+* Copyright (C) 2012 Motorola, Inc.
+*
+**********************************************************************
+
+File : Pedometer.h
+Purpose :
+**********************************************************************/
+#ifndef __PEDOMETER_H__
+#define __PEDOMETER_H__
+/****************************** Defines *******************************/
+typedef struct memMapPedometer {
+ u8 version;
+ u8 testCmd;
+ u16 totalSteps;
+ u32 totatDistance;
+ u32 currentSpeed;
+ u8 activity;
+} sPedoData;
+
+typedef enum {
+ WALK,
+ JOG,
+ RUN
+} eActivity;
+/**************************** Globals ********************************/
+
+
+/***************************** Prototypes *****************************/
+
+
+
+#endif /* __PEDOMETER_H__ */
diff --git a/include/linux/m4sensorhub/MemMapPressureSensor.h b/include/linux/m4sensorhub/MemMapPressureSensor.h
new file mode 100644
index 00000000000..9c192a26447
--- /dev/null
+++ b/include/linux/m4sensorhub/MemMapPressureSensor.h
@@ -0,0 +1,29 @@
+/*********************************************************************
+*
+* Copyright (C) 2012 Motorola, Inc.
+*
+**********************************************************************
+
+File : MemMapPressureSensor.h
+Purpose :
+**********************************************************************/
+#ifndef __PRESS_SENSOR_H__
+#define __PRESS_SENSOR_H__
+/****************************** Defines *******************************/
+typedef struct memMapPressure {
+ u8 version;
+ u8 dummy; /* Align the boundary */
+ u16 sampleRate;
+ u32 pressure;
+ s32 referenceAltitude;
+ u32 seaLevelPressure;
+ s32 absoluteAltitude;
+ s16 temperature;
+} sPressureData;
+
+/**************************** Globals ********************************/
+
+
+/***************************** Prototypes *****************************/
+
+#endif
diff --git a/include/linux/m4sensorhub/MemMapTempSensor.h b/include/linux/m4sensorhub/MemMapTempSensor.h
new file mode 100644
index 00000000000..51fad5d13e5
--- /dev/null
+++ b/include/linux/m4sensorhub/MemMapTempSensor.h
@@ -0,0 +1,26 @@
+/*********************************************************************
+*
+* Copyright (C) 2012 Motorola, Inc.
+*
+**********************************************************************
+
+File : MemMapTempSensor.h
+Purpose :
+**********************************************************************/
+#ifndef __MEMMAP_TEMPSENSOR_H__
+#define __MEMMAP_TEMPSENSOR_H__
+/****************************** Defines *******************************/
+typedef struct memMapTemp {
+ u8 version;
+ u8 testCmd;
+ s16 extrnlTemp;
+ s16 intrnlTemp;
+} sTempData;
+
+/**************************** Globals ********************************/
+
+
+/***************************** Prototypes *****************************/
+
+
+#endif
diff --git a/include/linux/m4sensorhub/m4sensorhub_bank_enum.h b/include/linux/m4sensorhub/m4sensorhub_bank_enum.h
new file mode 100644
index 00000000000..46844ed0b6a
--- /dev/null
+++ b/include/linux/m4sensorhub/m4sensorhub_bank_enum.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2013, Motorola, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/***************************** WARNING ******************************
+ * *
+ * DO NOT EDIT THIS FILE *
+ * *
+ * This is an auto-generated file based on register maps in the *
+ * M4 Sensor Hub source tree. *
+ * *
+ ***************************** WARNING *****************************/
+
+enum m4sensorhub_type {
+ M4SH_TYPE_ACCEL,
+ M4SH_TYPE_TEMP,
+ M4SH_TYPE_GENERAL,
+ M4SH_TYPE_PRESSURE,
+ M4SH_TYPE_PEDOMETER,
+ M4SH_TYPE_TCMD,
+ M4SH_TYPE_LOG,
+ M4SH_TYPE_FUSION,
+ M4SH_TYPE_COMPASS,
+ M4SH_TYPE_GYRO,
+ M4SH_TYPE_METS,
+ M4SH_TYPE_USERSETTINGS,
+ M4SH_TYPE_POWER,
+ M4SH_TYPE_LOCATION,
+ M4SH_TYPE_DOWNLOAD,
+ M4SH_TYPE_AUDIO,
+ M4SH_TYPE_TIMEPIECE,
+ M4SH_TYPE_WRIST,
+ M4SH_TYPE_GESTURE,
+ M4SH_TYPE_PASSIVE,
+
+ M4SH_TYPE__NUM
+};
+
diff --git a/include/linux/m4sensorhub/m4sensorhub_irqs.h b/include/linux/m4sensorhub/m4sensorhub_irqs.h
new file mode 100644
index 00000000000..c41c5c5ed89
--- /dev/null
+++ b/include/linux/m4sensorhub/m4sensorhub_irqs.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2012, Motorola, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __M4SENSORHUB_IRQS_H__
+#define __M4SENSORHUB_IRQS_H__
+
+#define M4SH_IRQ_INT0_INDEX 0
+#define M4SH_IRQ_INT1_INDEX 8
+
+/* Keep name mapping in m4sensorhub-irq.c 'irq_name' synchronized */
+enum m4sensorhub_irqs {
+ /* 1st supported interrupt */
+ M4SH_IRQ__START,
+
+ /* INT0 0x01: Pressure interrupt */
+ M4SH_IRQ_PRESSURE_DATA_READY = M4SH_IRQ_INT0_INDEX,
+
+ /* INT0 0x02: Temperature interrupt */
+ M4SH_IRQ_TMP_DATA_READY,
+
+ /* INT0 0x04: Gyro interrupt */
+ M4SH_IRQ_GYRO_DATA_READY,
+
+ /* INT0 0x80: Pedometer interrupt */
+ M4SH_IRQ_PEDOMETER_DATA_READY,
+
+ /* INT0 0x10: Compass data interrupt */
+ M4SH_IRQ_COMPASS_DATA_READY,
+
+ /* INT0 0x20: Fusion data interrupt */
+ M4SH_IRQ_FUSION_DATA_READY,
+
+ /* INT0 0x40: Accel data interrupt */
+ M4SH_IRQ_ACCEL_DATA_READY,
+
+ /* INT0 0x80: Gesture interrupt */
+ M4SH_IRQ_GESTURE_DETECTED,
+
+ /* INT1 0x01 : still mode interrupt */
+ M4SH_IRQ_STILL_DETECTED = M4SH_IRQ_INT1_INDEX,
+
+ /* INT1 0x02 : motion detected interrupt */
+ M4SH_IRQ_MOTION_DETECTED,
+
+ /* INT1 0x04 : activity change interrupt */
+ M4SH_IRQ_ACTIVITY_CHANGE,
+
+ /* INT1 0x08 : download command complete interrupt */
+ M4SH_IRQ_DLCMD_RESP_READY,
+
+ /* INT1 0x10 : mic data ready interrupt */
+ M4SH_IRQ_MIC_DATA_READY,
+
+ /* INT1 0x20 : wrist command interrupt */
+ M4SH_IRQ_WRIST_READY,
+
+ /* INT1 0x40 : passive buffer full */
+ M4SH_IRQ_PASSIVE_BUFFER_FULL,
+
+ /* Number of allocated interrupts */
+ M4SH_IRQ__NUM
+};
+#endif /* __M4SENSORHUB_IRQS_H__ */
+
diff --git a/include/linux/m4sensorhub/m4sensorhub_reg_enum.h b/include/linux/m4sensorhub/m4sensorhub_reg_enum.h
new file mode 100644
index 00000000000..09e3a9496c5
--- /dev/null
+++ b/include/linux/m4sensorhub/m4sensorhub_reg_enum.h
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2013, Motorola, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/***************************** WARNING ******************************
+ * *
+ * DO NOT EDIT THIS FILE *
+ * *
+ * This is an auto-generated file based on register maps in the *
+ * M4 Sensor Hub source tree. *
+ * *
+ ***************************** WARNING *****************************/
+
+enum m4sensorhub_reg {
+ M4SH_REG_ACCEL_VERSION,
+ M4SH_REG_ACCEL_DUMMY, /* Align the boundary */
+ M4SH_REG_ACCEL_SAMPLERATE,
+ M4SH_REG_ACCEL_X,
+ M4SH_REG_ACCEL_Y,
+ M4SH_REG_ACCEL_Z,
+ M4SH_REG_ACCEL_SCALEDMAGSQUARED,
+ M4SH_REG_ACCEL_MAGNITUDE,
+ M4SH_REG_ACCEL_TILT,
+ M4SH_REG_ACCEL_ORIENTATION,
+ M4SH_REG_TEMP_VERSION,
+ M4SH_REG_TEMP_DUMMY, /* Align the boundary */
+ M4SH_REG_TEMP_SAMPLERATE,
+ M4SH_REG_TEMP_EXTRNLTEMP,
+ M4SH_REG_TEMP_INTRNLTEMP,
+ M4SH_REG_GENERAL_UTC,
+ M4SH_REG_GENERAL_LOCALTIMEZONE,
+ M4SH_REG_GENERAL_VERSION, /* M4 software version */
+ M4SH_REG_GENERAL_INTERRUPT0ENABLE,
+ M4SH_REG_GENERAL_INTERRUPT1ENABLE,
+ M4SH_REG_GENERAL_INTERRUPT0STATUS,
+ M4SH_REG_GENERAL_INTERRUPT1STATUS,
+ M4SH_REG_PRESSURE_VERSION,
+ M4SH_REG_PRESSURE_DUMMY, /* Align the boundary */
+ M4SH_REG_PRESSURE_SAMPLERATE,
+ M4SH_REG_PRESSURE_PRESSURE,
+ M4SH_REG_PRESSURE_REFERENCEALTITUDE,
+ M4SH_REG_PRESSURE_SEALEVELPRESSURE,
+ M4SH_REG_PRESSURE_ABSOLUTEALTITUDE,
+ M4SH_REG_PRESSURE_TEMPERATURE,
+ M4SH_REG_PRESSURE_ISVALID,
+ M4SH_REG_PEDOMETER_VERSION,
+ M4SH_REG_PEDOMETER_TESTCMD,
+ M4SH_REG_PEDOMETER_ACTIVITY,
+ M4SH_REG_PEDOMETER_EQUIPMENTTYPE,
+ M4SH_REG_PEDOMETER_TOTALSTEPS,
+ M4SH_REG_PEDOMETER_FLOORSCLIMBED,
+ M4SH_REG_PEDOMETER_TOTATDISTANCE,
+ M4SH_REG_PEDOMETER_CURRENTSPEED,
+ M4SH_REG_PEDOMETER_REPORTEDDISTANCE,
+ M4SH_REG_PEDOMETER_USERDISTANCE,
+ M4SH_REG_TCMD_OPCODE,
+ M4SH_REG_LOG_LOGENABLE,
+ M4SH_REG_LOG_ISLOGIMMEDIATE,
+ M4SH_REG_FUSION_VERSION,
+ M4SH_REG_FUSION_DUMMY,
+ M4SH_REG_FUSION_SAMPLERATE,
+ M4SH_REG_FUSION_EULERPITCH,
+ M4SH_REG_FUSION_EULERROLL,
+ M4SH_REG_FUSION_EULERYAW,
+ M4SH_REG_FUSION_LOCALX,
+ M4SH_REG_FUSION_LOCALY,
+ M4SH_REG_FUSION_LOCALZ,
+ M4SH_REG_FUSION_WORLDX,
+ M4SH_REG_FUSION_WORLDY,
+ M4SH_REG_FUSION_WORLDZ,
+ M4SH_REG_FUSION_HEADING,
+ M4SH_REG_FUSION_HEADING_ACCURACY,
+ M4SH_REG_COMPASS_VERSION,
+ M4SH_REG_COMPASS_DUMMY, /* Align the boundary */
+ M4SH_REG_COMPASS_SAMPLERATE,
+ M4SH_REG_COMPASS_X,
+ M4SH_REG_COMPASS_Y,
+ M4SH_REG_COMPASS_Z,
+ M4SH_REG_COMPASS_ACCURACY,
+ M4SH_REG_GYRO_VERSION,
+ M4SH_REG_GYRO_DUMMY, /* Align the boundary */
+ M4SH_REG_GYRO_SAMPLERATE,
+ M4SH_REG_GYRO_X,
+ M4SH_REG_GYRO_Y,
+ M4SH_REG_GYRO_Z,
+ M4SH_REG_METS_VERSION,
+ M4SH_REG_METS_METSACTIVITY,
+ M4SH_REG_METS_MSSAMPLETIME,
+ M4SH_REG_METS_METS,
+ M4SH_REG_METS_CALORIES,
+ M4SH_REG_USERSETTINGS_VERSION,
+ M4SH_REG_USERSETTINGS_USERAGE,
+ M4SH_REG_USERSETTINGS_USERGENDER,
+ M4SH_REG_USERSETTINGS_USERHEIGHT,
+ M4SH_REG_USERSETTINGS_USERWEIGHT,
+ M4SH_REG_USERSETTINGS_SCREENSTATUS,
+ M4SH_REG_USERSETTINGS_RTCRESET,
+ M4SH_REG_POWER_VERSION,
+ M4SH_REG_POWER_DUMMY,
+ M4SH_REG_POWER_STILLMODETIMEOUT,
+ M4SH_REG_POWER_MOTIONDURATION,
+ M4SH_REG_POWER_MOTIONTHRESHOLD,
+ M4SH_REG_POWER_NOMOTIONDURATION,
+ M4SH_REG_POWER_NOMOTIONTHRESHOLD,
+ M4SH_REG_LOCATION_VERSION,
+ M4SH_REG_LOCATION_SOURCE,
+ M4SH_REG_LOCATION_SPEED,
+ M4SH_REG_LOCATION_LATITUDE,
+ M4SH_REG_LOCATION_LONGITUDE,
+ M4SH_REG_LOCATION_ALTITUDE,
+ M4SH_REG_DOWNLOAD_COMMAND,
+ M4SH_REG_DOWNLOAD_STATUS,
+ M4SH_REG_DOWNLOAD_SIZE,
+ M4SH_REG_DOWNLOAD_CHECKSUM,
+ M4SH_REG_DOWNLOAD_FILENAME,
+ M4SH_REG_DOWNLOAD_PACKET,
+ M4SH_REG_AUDIO_VERSION,
+ M4SH_REG_AUDIO_ENABLE,
+ M4SH_REG_AUDIO_DUMMY,
+ M4SH_REG_AUDIO_TOTALPACKETS,
+ M4SH_REG_TIMEPIECE_VERSION,
+ M4SH_REG_TIMEPIECE_ENABLE, /* 0: host control 1: sensorhub control */
+ M4SH_REG_TIMEPIECE_SAMPLERATE,
+ M4SH_REG_TIMEPIECE_OFFSETSTEPS,
+ M4SH_REG_WRIST_VERSION,
+ M4SH_REG_WRIST_ENABLE,
+ M4SH_REG_WRIST_INTERRUPTREASON,
+ M4SH_REG_WRIST_HOSTRESPONSE,
+ M4SH_REG_WRIST_FMONCHIP,
+ M4SH_REG_WRIST_FMONFILE,
+ M4SH_REG_GESTURE_VERSION,
+ M4SH_REG_GESTURE_GESTURE1,
+ M4SH_REG_GESTURE_CONFIDENCE1,
+ M4SH_REG_GESTURE_VALUE1,
+ M4SH_REG_GESTURE_GESTURE2,
+ M4SH_REG_GESTURE_CONFIDENCE2,
+ M4SH_REG_GESTURE_VALUE2,
+ M4SH_REG_GESTURE_GESTURE3,
+ M4SH_REG_GESTURE_CONFIDENCE3,
+ M4SH_REG_GESTURE_VALUE3,
+ M4SH_REG_PASSIVE_TIMESTAMP,
+ M4SH_REG_PASSIVE_STEPS,
+ M4SH_REG_PASSIVE_METS,
+ M4SH_REG_PASSIVE_FLOORSCLIMBED,
+ M4SH_REG__INVALID, /* Marker for invalid register */
+ M4SH_REG__NUM = M4SH_REG__INVALID /* Number of registers */
+};
diff --git a/include/linux/m4sensorhub/m4sensorhub_registers.h b/include/linux/m4sensorhub/m4sensorhub_registers.h
new file mode 100644
index 00000000000..f33bef2f66e
--- /dev/null
+++ b/include/linux/m4sensorhub/m4sensorhub_registers.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012, Motorola, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __M4SENSORHUB_MEMMAP_H__
+#define __M4SENSORHUB_MEMMAP_H__
+
+#include "m4sensorhub_bank_enum.h"
+#include "m4sensorhub_reg_enum.h"
+
+#ifdef __KERNEL__
+
+/* Global (kernel) definitions */
+
+#define M4SH_MAX_REG_SIZE 2048
+#define M4SH_MAX_STACK_BUF_SIZE 32
+#define m4sh_no_mask NULL
+
+#endif /*__KERNEL__ */
+#endif /*__M4SENSORHUB_MEMMAP_H__ */