summaryrefslogtreecommitdiffstats
path: root/sensors/k3dh.h
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2013-12-28 14:10:40 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-06-07 00:37:42 +0200
commitb2105ed1d5afdb12e03aac0f0898d778346f9e5c (patch)
tree1f5d153834f9c398340417c95ef9fc406734b65d /sensors/k3dh.h
parent6ee4785334cc25c4e11ea4b28cb3dd3292609a4c (diff)
downloaddevice_samsung_n7000-b2105ed1d5afdb12e03aac0f0898d778346f9e5c.zip
device_samsung_n7000-b2105ed1d5afdb12e03aac0f0898d778346f9e5c.tar.gz
device_samsung_n7000-b2105ed1d5afdb12e03aac0f0898d778346f9e5c.tar.bz2
SMDK4210 Sensors
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'sensors/k3dh.h')
-rw-r--r--sensors/k3dh.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/sensors/k3dh.h b/sensors/k3dh.h
new file mode 100644
index 0000000..2c2ad0d
--- /dev/null
+++ b/sensors/k3dh.h
@@ -0,0 +1,41 @@
+/*
+ * STMicroelectronics k3dh acceleration sensor driver
+ *
+ * Copyright (C) 2010 Samsung Electronics Co.Ltd
+ *
+ * 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
+ * (at your option) any later version.
+ *
+ * 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.
+ */
+
+#ifndef __K3DH_ACC_HEADER__
+#define __K3DH__ACC_HEADER__
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+
+extern struct class *sec_class;
+
+struct k3dh_acceldata {
+ __s16 x;
+ __s16 y;
+ __s16 z;
+};
+
+/* dev info */
+#define ACC_DEV_NAME "accelerometer"
+
+/* k3dh ioctl command label */
+#define K3DH_IOCTL_BASE 'a'
+#define K3DH_IOCTL_SET_DELAY _IOW(K3DH_IOCTL_BASE, 0, int64_t)
+#define K3DH_IOCTL_GET_DELAY _IOR(K3DH_IOCTL_BASE, 1, int64_t)
+#define K3DH_IOCTL_READ_ACCEL_XYZ _IOR(K3DH_IOCTL_BASE, 8, \
+ struct k3dh_acceldata)
+#define K3DH_IOCTL_SET_ENABLE _IOW(K3DH_IOCTL_BASE, 9, int)
+#endif