Chinaunix首页 | 论坛 | 博客
  • 博客访问: 13030462
  • 博文数量: 1293
  • 博客积分: 13501
  • 博客等级: 上将
  • 技术积分: 17974
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-08 18:11
文章分类

全部博文(1293)

文章存档

2019年(1)

2018年(1)

2016年(118)

2015年(257)

2014年(128)

2013年(222)

2012年(229)

2011年(337)

分类: LINUX

2011-06-22 17:41:38

# cd /opt/EmbedSky/linux-2.6.30.4/drivers/input/keyboard

# vim Kconfig

 

if INPUT_KEYBOARD

+++++

config EmbedSky_BUTTONS
    tristate "TQ2440/SKY2440 buttons"
    depends on ARCH_S3C2440
    default y
    help
          EmbedSky TQ2440/SKY2440 buttons.   

+++++

 

# vim Makefile

 

obj-$(CONFIG_KEYBOARD_LOCOMO)        += locomokbd.o

++++
obj-$(CONFIG_EmbedSky_BUTTONS)        += EmbedSky_buttons.o

++++
obj-$(CONFIG_KEYBOARD_NEWTON)        += newtonkbd.o

 

 

[root@localhost linux-2.6.30.4]# make menuconfig

Device Drivers  --->  

Input device support  ---> 

         [*]   Keyboards  --->    

                  --- Keyboards                                                                                                                             

                      TQ2440/SKY2440 buttons     

 

[root@localhost linux-2.6.30.4]# make SUBDIR=drivers/input/keyboard/ modules

 

  CC [M]  drivers/input/keyboard/EmbedSky_buttons.o
drivers/input/keyboard/EmbedSky_buttons.c:16:32: error: asm/arch/regs-gpio.h: No such file or directory
drivers/input/keyboard/EmbedSky_buttons.c:17:26: error: asm/hardware.h: No such file or directory
drivers/input/keyboard/EmbedSky_buttons.c:34: error: 'S3C2410_GPF1' undeclared here (not in a function)
drivers/input/keyboard/EmbedSky_buttons.c:34: error: 'S3C2410_GPF1_EINT1' undeclared here (not in a function)
drivers/input/keyboard/EmbedSky_buttons.c:35: error: 'S3C2410_GPF4' undeclared here (not in a function)
drivers/input/keyboard/EmbedSky_buttons.c:35: error: 'S3C2410_GPF4_EINT4' undeclared here (not in a function)
drivers/input/keyboard/EmbedSky_buttons.c:36: error: 'S3C2410_GPF2' undeclared here (not in a function)
drivers/input/keyboard/EmbedSky_buttons.c:36: error: 'S3C2410_GPF2_EINT2' undeclared here (not in a function)
drivers/input/keyboard/EmbedSky_buttons.c:37: error: 'S3C2410_GPF0' undeclared here (not in a function)
drivers/input/keyboard/EmbedSky_buttons.c:37: error: 'S3C2410_GPF0_EINT0' undeclared here (not in a function)
drivers/input/keyboard/EmbedSky_buttons.c: In function 'buttons_interrupt':
drivers/input/keyboard/EmbedSky_buttons.c:54: error: implicit declaration of function 's3c2410_gpio_getpin'
drivers/input/keyboard/EmbedSky_buttons.c: In function 'EmbedSky_buttons_open':
drivers/input/keyboard/EmbedSky_buttons.c:76: error: implicit declaration of function 's3c2410_gpio_cfgpin'
drivers/input/keyboard/EmbedSky_buttons.c:78: warning: passing argument 3 of 'request_irq' makes integer from pointer without a cast
drivers/input/keyboard/EmbedSky_buttons.c: In function 'EmbedSky_buttons_init':
drivers/input/keyboard/EmbedSky_buttons.c:194: error: implicit declaration of function 'class_device_create'
drivers/input/keyboard/EmbedSky_buttons.c: In function 'EmbedSky_buttons_exit':
drivers/input/keyboard/EmbedSky_buttons.c:207: error: implicit declaration of function 'class_device_destroy'
make[3]: *** [drivers/input/keyboard/EmbedSky_buttons.o] 错误 1
make[2]: *** [drivers/input/keyboard] 错误 2
make[1]: *** [drivers/input] 错误 2
make: *** [drivers] 错误 2

 

你应该是拷贝的2.6.25.8中的GPIO的驱动到2.6.30.4的内核中,而两者的驱动源码有差别的,特别是注册驱动时的API上。

 

[root@localhost linux-2.6.30.4]# vim drivers/input/keyboard/EmbedSky_buttons.c

阅读(3638) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~