矩阵键盘驱动源文件:
kernel/drivers/input/touchscreen/keyboard/s3c-keypad.c
kernel/drivers/input/touchscreen/keyboard/s3c-keypad.h
kernel/arch/arm/mach-s5pv210/mach-smdkc110.c
kernel/arch/arm/plat-s5p/devs.c
首先,make menuconfig,
Device Drivers --->
Input device support --->
Keyboards --->
< *> S3C keypad support
注意,手动配置menuconfig后,需要手动将.config覆盖到arch/arm/configs下的
s5pv210_android_defconfig文件,否则脚本自动会将该文件覆盖到内核根目录下。
然后,在mach-smdkc110.c中配置矩阵键盘的IO口:
void s3c_setup_keypad_cfg_gpio(int rows, int columns)
{
unsigned int gpio;
unsigned int end;
end = S5PV210_GPH3(rows);
/* Set all the necessary GPH2 pins to special-function 0 */
for (gpio = S5PV210_GPH3(0); gpio < end; gpio++)
{
s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
s3c_gpio_setpull(gpio, S3C_GPIO_PULL