Chinaunix首页 | 论坛 | 博客
  • 博客访问: 801119
  • 博文数量: 489
  • 博客积分: 475
  • 博客等级: 下士
  • 技术积分: 3087
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-08 16:28
文章分类

全部博文(489)

文章存档

2013年(7)

2012年(301)

2011年(181)

分类:

2011-12-22 20:38:26

原文地址:触摸屏驱动 作者:luozhiyong131

内核里没有完善的触摸屏驱动,可以用我们提供的触摸屏驱动有三个文件:s3c2410_ts.c, s3c2440_adc.c, s3c2440adc.h

s3c2410_ts.c 拷贝到drivers/input/touchscreen 目录下,修改该目录下Kconfig文件,在第14 行加入:

config TOUCHSCREEN_S3C2410

tristate "Samsung S3C2410 touchscreen input driver"

depends on INPUT && S3C2440_ADC

help

      Say Y here if you have the s3c2410 touchscreen.

      If unsure, say N.

      To compile this driver as a module, choose M here: the

      module will be called s3c2410_ts.

修改同目录下Makefile 文件,在第9 行加入:

obj-$(CONFIG_TOUCHSCREEN_S3C2410) += s3c2410_ts.o

s3c2440_adc.c, s3c2440adc.h 拷贝到drivers/char 目录下,修改同目录下Kconfig 文件,在第7 行加入:

config S3C2440_ADC

bool "ADC driver for S3C2440 development boards"

help

this is ADC driver for S3C2440 development boards

Notes: the touch-screen-driver required this option

 

修改同目录下Makefile 文件,在第12 行加入:

obj-$(CONFIG_S3C2440_ADC) += s3c2440_adc.o

 

配置内核,支持触摸屏:

Device Drivers --->

Character devices --->

[*] ADC driver for S3C2440 development boards

Input devices support --->

<*> Event interface

[*] Touchscreens --->

<*> Samsung S3C2410 touchscreen input driver

启动时输出:

s3c2410 TouchScreen successfully loaded

input: s3c2410 TouchScreen as /class/input/input0

 

补丁文件

文件: linux-2.6.31.touch.rar
大小: 171KB
下载: 下载

阅读(356) | 评论(0) | 转发(0) |
0

上一篇:s3c2440_ov9650.c

下一篇:s3c2440adc.h

给主人留下些什么吧!~~