Go to the documentation of this file. 1 #ifndef _MATRIX_KEYPAD_H
2 #define _MATRIX_KEYPAD_H
4 #include <linux/types.h>
5 #include <linux/input.h>
8 #define MATRIX_MAX_ROWS 32
9 #define MATRIX_MAX_COLS 32
11 #define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\
12 (((col) & (MATRIX_MAX_COLS - 1)) << 16) |\
15 #define KEY_ROW(k) (((k) >> 24) & 0xff)
16 #define KEY_COL(k) (((k) >> 16) & 0xff)
17 #define KEY_VAL(k) ((k) & 0xffff)
19 #define MATRIX_SCAN_CODE(row, col, row_shift) (((row) << (row_shift)) + (col))
79 const char *keymap_name,
80 unsigned int rows,
unsigned int cols,
82 struct input_dev *input_dev);