-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Input: add matrix keypad driver for Cirrus EP93xx
This is a keyboard driver for the Cirrus Logic EP93xx keypad matrix peripheral. This driver is based on the pxa27x_keypad driver. [dtor@mail.ru: Plug in input_dev->keycode so keymap can be changed from userspace.] Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
- Loading branch information
H Hartley Sweeten
authored and
Dmitry Torokhov
committed
Apr 19, 2009
1 parent
864fe73
commit e06003a
Showing
4 changed files
with
523 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h | ||
*/ | ||
|
||
#ifndef __ASM_ARCH_EP93XX_KEYPAD_H | ||
#define __ASM_ARCH_EP93XX_KEYPAD_H | ||
|
||
#define MAX_MATRIX_KEY_ROWS (8) | ||
#define MAX_MATRIX_KEY_COLS (8) | ||
|
||
/* flags for the ep93xx_keypad driver */ | ||
#define EP93XX_KEYPAD_DISABLE_3_KEY (1<<0) /* disable 3-key reset */ | ||
#define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */ | ||
#define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */ | ||
#define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */ | ||
#define EP93XX_KEYPAD_KDIV (1<<4) /* 1/4 clock or 1/16 clock */ | ||
#define EP93XX_KEYPAD_AUTOREPEAT (1<<5) /* enable key autorepeat */ | ||
|
||
/** | ||
* struct ep93xx_keypad_platform_data - platform specific device structure | ||
* @matrix_key_rows: number of rows in the keypad matrix | ||
* @matrix_key_cols: number of columns in the keypad matrix | ||
* @matrix_key_map: array of keycodes defining the keypad matrix | ||
* @matrix_key_map_size: ARRAY_SIZE(matrix_key_map) | ||
* @debounce: debounce start count; terminal count is 0xff | ||
* @prescale: row/column counter pre-scaler load value | ||
* @flags: see above | ||
*/ | ||
struct ep93xx_keypad_platform_data { | ||
unsigned int matrix_key_rows; | ||
unsigned int matrix_key_cols; | ||
unsigned int *matrix_key_map; | ||
int matrix_key_map_size; | ||
unsigned int debounce; | ||
unsigned int prescale; | ||
unsigned int flags; | ||
}; | ||
|
||
/* macro for creating the matrix_key_map table */ | ||
#define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val)) | ||
|
||
#endif /* __ASM_ARCH_EP93XX_KEYPAD_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.