天嵌 ARM开发社区

 找回密码
 注册
查看: 3515|回复: 5

linux2.6.31触摸屏驱动移植出问题了

[复制链接]
widon1104 发表于 2010-1-3 15:00:08 | 显示全部楼层 |阅读模式
本帖最后由 widon1104 于 2010-1-3 15:24 编辑

就是报错说这个函数implicit declaration....
error: implicit declaration of function `s3c2410_gpio_cfgpin'

widon@widon-laptop:~/Desktop/linux绉绘?/linux-2.6.31_ok$ make uImage
scripts/kconfig/conf -s arch/arm/Kconfig
  CHK     include/linux/version.h
make[1]: 鈥渋nclude/asm-arm/mach-types.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CALL    scripts/checksyscalls.sh
<stdin>:1351:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1407:2: warning: #warning syscall pselect6 not implemented
<stdin>:1411:2: warning: #warning syscall ppoll not implemented
<stdin>:1451:2: warning: #warning syscall epoll_pwait not implemented
  CHK     include/linux/compile.h
  CC      drivers/input/touchscreen/tq2440_ts.o
drivers/input/touchscreen/tq2440_ts.c: In function `tq2440_ts_connect':
drivers/input/touchscreen/tq2440_ts.c:50: error: implicit declaration of function `s3c2410_gpio_cfgpin'
drivers/input/touchscreen/tq2440_ts.c: In function `tq2440ts_init':
drivers/input/touchscreen/tq2440_ts.c:211: warning: left shift count >= width of type
drivers/input/touchscreen/tq2440_ts.c:237: warning: ignoring return value of `input_register_device', declared with attribute warn_unused_result
make[3]: *** [drivers/input/touchscreen/tq2440_ts.o]  1
make[2]: *** [drivers/input/touchscreen]
make[1]: *** [drivers/input]
make: *** [drivers]

串口驱动移植在2.6.31上也有同样的问题
widon@widon-laptop:~/Desktop/linux绉绘?/linux-2.6.31_ok$ make uImage
  CHK     include/linux/version.h
make[1]: 鈥渋nclude/asm-arm/mach-types.h  CHK     i
nclude/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CALL    scripts/checksyscalls.sh
<stdin>:1351:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1407:2: warning: #warning syscall pselect6 not implemented
<stdin>:1411:2: warning: #warning syscall ppoll not implemented
<stdin>:1451:2: warning: #warning syscall epoll_pwait not implemented
  CHK     include/linux/compile.h
  CC      drivers/serial/samsung.o
drivers/serial/samsung.c: In function `s3c24xx_serial_startup':
drivers/serial/samsung.c:404: error: implicit declaration of function `s3c2410_gpio_cfgpin'
drivers/serial/samsung.c:405: error: implicit declaration of function `s3c2410_gpio_pullup'
make[2]: *** [drivers/serial/samsung.o]
make[1]: *** [drivers/serial]
make: *** [drivers]
 楼主| widon1104 发表于 2010-1-3 16:18:34 | 显示全部楼层
我知道了
在移植mini2440的驱动到2.6.31的时候,编译提示S3C2410_GPB5、S3C2410_GPB5_OUTPUT等类似的定义缺失。遂在内核中相关的部分arch/arm/mach-2410/include/mach中的头文件寻觅了一番,果然没有这些定义。而在2.6.29中是有这些定义的。

仔细看了一下,发现原来是新版本中采用了新的方式实现这两类定义。

1、引用端口的定义,旧版本直接通过S3C2410_GPmn来定义端口GPIOm的第n个引脚,比如GOIOB的第5个引脚引用为S3C2410_GPB5。在新版本中改为采用S3C2410_GPm(n)的方式,比如GPIOB的第5个引脚就改为S3C2410_GPB(5)。这里的S3C2410_GPm(n)函数在arch/arm/march-2410/include/mach/gpio-nrs.h中定义,共有S3C2410_GPA()~S3C2410_GPH()八组。

2、端口功能配置,比如端口的复用功能、输出或输入。在旧版本中采用的是”S3C2410_GPB_功能“的方式定义,比如S3C2410_GPB5_OUTP,直接把功能加在后面。而新版本中采用了一个宏函数S3C2410_gpio_cfgpin(端口引用, 功能),比如S3C2410_gpio_cfgpin(S3C2410_GPB(5),S3C2410_GPIO_OUTPUT)。关于端口功能的定义可以在arch/arm/march-2410/include/mach/regs-gpio.h中找到,复用功能的定义没有变化,增加了输入输出的定义S3C2410_GPIO_INPUT、S3C2410_GPIO_OUTPUT。以前的直接用宏定义配置,现在变成了需要用函数S3C2410_gpio_cfgpin来实现。这个函数的原型参见arch/arm/march-2410/include/mach/gpio-fns.h。
 楼主| widon1104 发表于 2010-1-3 16:51:12 | 显示全部楼层
不过改了后还是不能用触摸屏,不知道文件系统有什么设置没有
用的是《嵌入式应用开发完全开发》上的文件系统,可以看到qtopia图像
亚瑟王 发表于 2010-1-5 10:48:13 | 显示全部楼层
2个可能,1、没有调用正确的头文件,2结构体变化了。
2.6.31的内核没有去看过。
 楼主| widon1104 发表于 2010-1-6 11:21:41 | 显示全部楼层
用tslib试了哈,改了这个地方后,驱动在linux.2.6.31上一样是可以用的
armzd 发表于 2010-4-27 17:50:09 | 显示全部楼层
应该时库函数或数据结构变了,看看最新版本的补丁
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-10-6 22:28 , Processed in 1.028360 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表