aboutsummaryrefslogtreecommitdiff
path: root/include/linux/kpd.h
diff options
context:
space:
mode:
authorMeizu OpenSource <patchwork@meizu.com>2016-08-15 10:19:42 +0800
committerMeizu OpenSource <patchwork@meizu.com>2016-08-15 10:19:42 +0800
commitd2e1446d81725c351dc73a03b397ce043fb18452 (patch)
tree4dbc616b7f92aea39cd697a9084205ddb805e344 /include/linux/kpd.h
first commit
Diffstat (limited to 'include/linux/kpd.h')
-rw-r--r--include/linux/kpd.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/include/linux/kpd.h b/include/linux/kpd.h
new file mode 100644
index 000000000..947fb65d3
--- /dev/null
+++ b/include/linux/kpd.h
@@ -0,0 +1,95 @@
+/* alps/ALPS_SW/TRUNK/MAIN/alps/kernel/include/linux/kpd.h
+ *
+ * (C) Copyright 2009
+ * MediaTek <www.MediaTek.com>
+ *
+ * MT6516 Sensor IOCTL & data structure
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __KPD_H__
+#define __KPD_H__
+
+#include <linux/ioctl.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/input.h>
+#include <linux/workqueue.h>
+#include <linux/timer.h>
+#include <linux/interrupt.h>
+#include <linux/fs.h>
+#include <linux/miscdevice.h>
+#include <linux/platform_device.h>
+#include <linux/earlysuspend.h>
+#include <linux/aee.h>
+
+#ifdef CONFIG_MTK_SMARTBOOK_SUPPORT
+#include <linux/sbsuspend.h> /* smartbook */
+#endif
+
+#include <asm/atomic.h>
+#include <asm/uaccess.h>
+
+#include <mach/hal_pub_kpd.h>
+
+#define KPD_AUTOTEST KPD_YES
+#define KPD_DEBUG KPD_YES
+
+#if KPD_AUTOTEST
+#define PRESS_OK_KEY _IO('k', 1)
+#define RELEASE_OK_KEY _IO('k', 2)
+#define PRESS_MENU_KEY _IO('k', 3)
+#define RELEASE_MENU_KEY _IO('k', 4)
+#define PRESS_UP_KEY _IO('k', 5)
+#define RELEASE_UP_KEY _IO('k', 6)
+#define PRESS_DOWN_KEY _IO('k', 7)
+#define RELEASE_DOWN_KEY _IO('k', 8)
+#define PRESS_LEFT_KEY _IO('k', 9)
+#define RELEASE_LEFT_KEY _IO('k', 10)
+#define PRESS_RIGHT_KEY _IO('k', 11)
+#define RELEASE_RIGHT_KEY _IO('k', 12)
+#define PRESS_HOME_KEY _IO('k', 13)
+#define RELEASE_HOME_KEY _IO('k', 14)
+#define PRESS_BACK_KEY _IO('k', 15)
+#define RELEASE_BACK_KEY _IO('k', 16)
+#define PRESS_CALL_KEY _IO('k', 17)
+#define RELEASE_CALL_KEY _IO('k', 18)
+#define PRESS_ENDCALL_KEY _IO('k', 19)
+#define RELEASE_ENDCALL_KEY _IO('k', 20)
+#define PRESS_VLUP_KEY _IO('k', 21)
+#define RELEASE_VLUP_KEY _IO('k', 22)
+#define PRESS_VLDOWN_KEY _IO('k', 23)
+#define RELEASE_VLDOWN_KEY _IO('k', 24)
+#define PRESS_FOCUS_KEY _IO('k', 25)
+#define RELEASE_FOCUS_KEY _IO('k', 26)
+#define PRESS_CAMERA_KEY _IO('k', 27)
+#define RELEASE_CAMERA_KEY _IO('k', 28)
+#define PRESS_POWER_KEY _IO('k', 30)
+#define RELEASE_POWER_KEY _IO('k', 31)
+#endif
+#define SET_KPD_KCOL _IO('k', 29)
+
+
+#define KPD_SAY "kpd: "
+#if KPD_DEBUG
+#define kpd_print(fmt, arg...) printk(KPD_SAY fmt, ##arg)
+#else
+#define kpd_print(fmt, arg...) do {} while (0)
+#endif
+
+
+#endif /* __KPD_H__ */