0001
0002
0003
0004
0005 #ifndef __KEYPAD_OMAP_H
0006 #define __KEYPAD_OMAP_H
0007
0008 #ifndef CONFIG_ARCH_OMAP1
0009 #warning Please update the board to use matrix-keypad driver
0010 #define omap_readw(reg) 0
0011 #define omap_writew(val, reg) do {} while (0)
0012 #endif
0013 #include <linux/input/matrix_keypad.h>
0014
0015 struct omap_kp_platform_data {
0016 int rows;
0017 int cols;
0018 const struct matrix_keymap_data *keymap_data;
0019 bool rep;
0020 unsigned long delay;
0021 bool dbounce;
0022
0023 unsigned int *row_gpios;
0024 unsigned int *col_gpios;
0025 };
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #define GROUP_SHIFT 14
0036 #define GROUP_0 (0 << GROUP_SHIFT)
0037 #define GROUP_1 (1 << GROUP_SHIFT)
0038 #define GROUP_2 (2 << GROUP_SHIFT)
0039 #define GROUP_3 (3 << GROUP_SHIFT)
0040 #define GROUP_MASK GROUP_3
0041 #if KEY_MAX & GROUP_MASK
0042 #error Group bits in conflict with keynum bits
0043 #endif
0044
0045
0046 #endif
0047