summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@stericsson.com>2011-10-18 11:16:07 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:06:05 +0200
commitef46524884b91447e5d785ca64a0444f165dbbe1 (patch)
tree7ec5e561e3e40f841423c7303d7acc44e1b21a83 /include
parent7d1bd90be3854842014fbdff89f1751df9cd5567 (diff)
hwmon: add st lsm303dlh driver
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/lsm303dlh.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/include/linux/lsm303dlh.h b/include/linux/lsm303dlh.h
new file mode 100644
index 00000000000..d9fd6148198
--- /dev/null
+++ b/include/linux/lsm303dlh.h
@@ -0,0 +1,56 @@
+/*
+ * lsm303dlh.h
+ * ST 3-Axis Accelerometer/Magnetometer header file
+ *
+ * Copyright (C) 2010 STMicroelectronics
+ * Author: Carmine Iascone (carmine.iascone@st.com)
+ * Author: Matteo Dameno (matteo.dameno@st.com)
+ *
+ * Copyright (C) 2010 STEricsson
+ * Author: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
+ * Updated:Preetham Rao Kaskurthi <preetham.rao@stericsson.com>
+ *
+ * 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 __LSM303DLH_H__
+#define __LSM303DLH_H__
+
+#include <linux/ioctl.h>
+
+#ifdef __KERNEL__
+struct lsm303dlh_platform_data {
+
+ /* name of device for regulator */
+
+ const char *name_a; /* acelerometer name */
+ const char *name_m; /* magnetometer name */
+
+ /* interrupt data */
+ u32 irq_a1; /* interrupt line 1 of accelrometer*/
+ u32 irq_a2; /* interrupt line 2 of accelrometer*/
+ u32 irq_m; /* interrupt line of magnetometer*/
+
+ /* position of x,y and z axis */
+ u8 axis_map_x; /* [0-2] */
+ u8 axis_map_y; /* [0-2] */
+ u8 axis_map_z; /* [0-2] */
+
+ /* orientation of x,y and z axis */
+ u8 negative_x; /* [0-1] */
+ u8 negative_y; /* [0-1] */
+ u8 negative_z; /* [0-1] */
+};
+#endif /* __KERNEL__ */
+
+#endif /* __LSM303DLH_H__ */