Commit | Line | Data |
---|---|---|
6fa3eb70 S |
1 | /* alps/ALPS_SW/TRUNK/MAIN/alps/kernel/include/linux/kpd.h |
2 | * | |
3 | * (C) Copyright 2009 | |
4 | * MediaTek <www.MediaTek.com> | |
5 | * | |
6 | * MT6516 Sensor IOCTL & data structure | |
7 | * | |
8 | * This program is free software; you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License as published by | |
10 | * the Free Software Foundation; either version 2 of the License, or | |
11 | * (at your option) any later version. | |
12 | * | |
13 | * This program is distributed in the hope that it will be useful, | |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with this program; if not, write to the Free Software | |
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 | */ | |
22 | ||
23 | #ifndef __KPD_H__ | |
24 | #define __KPD_H__ | |
25 | ||
26 | #include <linux/ioctl.h> | |
27 | #include <linux/init.h> | |
28 | #include <linux/module.h> | |
29 | #include <linux/kernel.h> | |
30 | #include <linux/input.h> | |
31 | #include <linux/workqueue.h> | |
32 | #include <linux/timer.h> | |
33 | #include <linux/interrupt.h> | |
34 | #include <linux/fs.h> | |
35 | #include <linux/miscdevice.h> | |
36 | #include <linux/platform_device.h> | |
37 | #include <linux/earlysuspend.h> | |
38 | #include <linux/aee.h> | |
39 | ||
40 | #ifdef CONFIG_MTK_SMARTBOOK_SUPPORT | |
41 | #include <linux/sbsuspend.h> /* smartbook */ | |
42 | #endif | |
43 | ||
44 | #include <asm/atomic.h> | |
45 | #include <asm/uaccess.h> | |
46 | ||
47 | #include <mach/hal_pub_kpd.h> | |
48 | ||
49 | #define KPD_AUTOTEST KPD_YES | |
50 | #define KPD_DEBUG KPD_YES | |
51 | ||
52 | #if KPD_AUTOTEST | |
53 | #define PRESS_OK_KEY _IO('k', 1) | |
54 | #define RELEASE_OK_KEY _IO('k', 2) | |
55 | #define PRESS_MENU_KEY _IO('k', 3) | |
56 | #define RELEASE_MENU_KEY _IO('k', 4) | |
57 | #define PRESS_UP_KEY _IO('k', 5) | |
58 | #define RELEASE_UP_KEY _IO('k', 6) | |
59 | #define PRESS_DOWN_KEY _IO('k', 7) | |
60 | #define RELEASE_DOWN_KEY _IO('k', 8) | |
61 | #define PRESS_LEFT_KEY _IO('k', 9) | |
62 | #define RELEASE_LEFT_KEY _IO('k', 10) | |
63 | #define PRESS_RIGHT_KEY _IO('k', 11) | |
64 | #define RELEASE_RIGHT_KEY _IO('k', 12) | |
65 | #define PRESS_HOME_KEY _IO('k', 13) | |
66 | #define RELEASE_HOME_KEY _IO('k', 14) | |
67 | #define PRESS_BACK_KEY _IO('k', 15) | |
68 | #define RELEASE_BACK_KEY _IO('k', 16) | |
69 | #define PRESS_CALL_KEY _IO('k', 17) | |
70 | #define RELEASE_CALL_KEY _IO('k', 18) | |
71 | #define PRESS_ENDCALL_KEY _IO('k', 19) | |
72 | #define RELEASE_ENDCALL_KEY _IO('k', 20) | |
73 | #define PRESS_VLUP_KEY _IO('k', 21) | |
74 | #define RELEASE_VLUP_KEY _IO('k', 22) | |
75 | #define PRESS_VLDOWN_KEY _IO('k', 23) | |
76 | #define RELEASE_VLDOWN_KEY _IO('k', 24) | |
77 | #define PRESS_FOCUS_KEY _IO('k', 25) | |
78 | #define RELEASE_FOCUS_KEY _IO('k', 26) | |
79 | #define PRESS_CAMERA_KEY _IO('k', 27) | |
80 | #define RELEASE_CAMERA_KEY _IO('k', 28) | |
81 | #define PRESS_POWER_KEY _IO('k', 30) | |
82 | #define RELEASE_POWER_KEY _IO('k', 31) | |
83 | #endif | |
84 | #define SET_KPD_KCOL _IO('k', 29) | |
85 | ||
86 | ||
87 | #define KPD_SAY "kpd: " | |
88 | #if KPD_DEBUG | |
89 | #define kpd_print(fmt, arg...) printk(KPD_SAY fmt, ##arg) | |
90 | #else | |
91 | #define kpd_print(fmt, arg...) do {} while (0) | |
92 | #endif | |
93 | ||
94 | ||
95 | #endif /* __KPD_H__ */ |