input: cm3629: Add Capella CM3629 proximity/light sensor for HTC
HTC kernel version: evitaul-jb-crc-3.4.10-ec474a3
Change-Id: I8322aa5bf0b6f9934c21686da27a0f3466016184
diff --git a/include/linux/capella_cm3602.h b/include/linux/capella_cm3602.h
new file mode 100644
index 0000000..dce39c8
--- /dev/null
+++ b/include/linux/capella_cm3602.h
@@ -0,0 +1,42 @@
+/* include/linux/capella_cm3602.h
+ *
+ * Copyright (C) 2009 Google, Inc.
+ * Author: Iliyan Malchev <malchev@google.com>
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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 __LINUX_CAPELLA_CM3602_H
+#define __LINUX_CAPELLA_CM3602_H
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+
+#define CAPELLA_CM3602_IOCTL_MAGIC 'c'
+#define CAPELLA_CM3602_IOCTL_GET_ENABLED \
+ _IOR(CAPELLA_CM3602_IOCTL_MAGIC, 1, int *)
+#define CAPELLA_CM3602_IOCTL_ENABLE \
+ _IOW(CAPELLA_CM3602_IOCTL_MAGIC, 2, int *)
+
+#ifdef __KERNEL__
+#define CAPELLA_CM3602 "capella_cm3602"
+#define LS_PWR_ON (1 << 0)
+#define PS_PWR_ON (1 << 1)
+struct capella_cm3602_platform_data {
+ int (*power)(int, uint8_t);
+ int (*enable)(uint8_t);
+ int p_en;
+ int p_out;
+ int irq;
+};
+#endif
+
+#endif