android_kernel_xiaomi_sm8350/include/asm-arm/arch-pxa/pxa27x_keypad.h
Eric Miao d7416f9eaa Input: pxa27x_keypad - introduce pxa27x_keypad_config()
Introduce pxa27x_keypad_config() for keypad registers configuration
and remove the reg_kpc, reg_kprec from platform data structure
so that configurations of keypad registers can be centralized to a
single function.

It can also be re-used when resuming.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-01-31 00:58:52 -05:00

21 lines
468 B
C

#ifndef __ASM_ARCH_PXA27x_KEYPAD_H
#define __ASM_ARCH_PXA27x_KEYPAD_H
#include <linux/input.h>
#define MAX_MATRIX_KEY_ROWS (8)
#define MAX_MATRIX_KEY_COLS (8)
struct pxa27x_keypad_platform_data {
/* code map for the matrix keys */
unsigned int matrix_key_rows;
unsigned int matrix_key_cols;
unsigned int *matrix_key_map;
int matrix_key_map_size;
};
#define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val))
#endif /* __ASM_ARCH_PXA27x_KEYPAD_H */