Host:Ubuntu-12.04
Target:Tiny6410
简介:移植LCD驱动程序,其实是copy啦~
移植LCD驱动的基本思路是拿来主义,最大感受是:被友臂的资料给坑了。一线触摸屏控制方式与其他方式有很大不同,内核资料提供的mini6410_backlight.c也不是真正的背光控制,真正的背光控制被mini6410_1wire_host.c劫持了。详细内容可以看这篇帖子http://www.arm9home.net/read.php?tid-14273.html。
总体过程可以分为以下几步:
1、修改mach-mini6410.c及相关头文件,添加fb信息。
2、拷贝与触摸屏相关的dev-ts-mini6410.c、ts.h、regs-adc.h、mini6410_1wire_host.c到相关目录。
3、完整拷贝友臂提供的linux-2.6.38源码下的drivers/video/samsung目录到新源码。
以下是patch记录。
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 5552e04..01ad86d 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -107,9 +107,9 @@ config MACH_MINI6410
select S3C_DEV_USB_HOST
select S3C_DEV_NAND
select S3C_DEV_FB
+ select S3C_DEV_RTC
select S3C64XX_SETUP_FB_24BPP
select SAMSUNG_DEV_ADC
- select SAMSUNG_DEV_TS /*一定要去掉,不然报错*/
help
Machine support for the FriendlyARM MINI6410
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index cfc0b99..c3523ee 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -61,3 +61,4 @@ obj-$(CONFIG_MACH_WLF_CRAGG_6410) += mach-crag6410.o mach-crag6410-module.o
obj-y += dev-uart.o
obj-y += dev-audio.o
obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o
+obj-$(CONFIG_TOUCHSCREEN_MINI6410) += dev-ts-mini6410.o //添加部分
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c //自行比对
index 1bc85c3..e432d74 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -23,6 +23,7 @@
#include
#include
#include
+#include
#include
#include
@@ -32,6 +33,7 @@
#include
#include
#include
+#include
#include
#include
@@ -40,7 +42,7 @@
#include
#include
#include
-#include
+//#include
#include
#include
以下是直接copy 的文件。
diff --git a/arch/arm/mach-s3c64xx/dev-ts-mini6410.c
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-*.h /*懒人原则,全部拷贝,从a-p*/
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-lcd.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-fb.h /*不想看的话就把整个reg-x.h都拷贝过去吧*/
diff --git a/arch/arm/mach-s3c64xx/include/mach/ts.h
diff --git a/arch/arm/plat-samsung/include/plat/regs-adc.h
diff --git a/drivers/input/touchscreen/mini6410-ts.c
diff --git a/drivers/input/touchscreen/mini6410_1wire_host.c
diff --git a/drivers/input/touchscreen/ts-if.c
diff --git a/drivers/video/samsung/** /*全部拷贝,并修改video目录下的Kconfig、Makefile文件*/
最后一步,配置内核,启动nfs,看到小企鹅。。
