在Android的内核更换触摸屏驱动程序 [英] Replacing Touchscreen driver in Android Kernel

查看:2221
本文介绍了在Android的内核更换触摸屏驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我适应一个姜饼内核为我定制电路板。我试图取代使用片上ADC控制器(三星S5PV210处理器)的电阻式触摸屏。在我的设计,我需要通过eGalaxyTouch驱动程序支持电容控制器。它连接到USB。驱动程序可以从make xconfig的菜单轻松启用。因为我加了一些痕迹的串行控制台上,我可以看到内核启动期间,安装和我看到它安装和连接/断开USB连接线时自行卸载它有点工作。但它不会做在Android用户界面什么。它是一种的HID类型设备。问题是,它并没有勾到适当的Andr​​oid触摸屏的软件层。我必须有想念的东西。必须有别的东西叫给力这个HID将连接到另一个软件层管理的触摸屏。

I'm adapting a Gingerbread kernel for my custom board. I'm trying to replace a resistive touch screen that uses an on-chip ADC controller (S5PV210 processor from Samsung). In my design, I need a capacitive controller supported by eGalaxyTouch driver. It's connected to the USB. The driver can be easily enabled from the "make xconfig" menu. It somewhat works since I added some traces on the serial console and I can see it installing during the kernel boot and I see it install and uninstall itself when connecting/disconnecting the USB cable. But it doesn't do anything in the Android user interface. It is an HID type device. The problem is it does not hook-up to the proper Android touchscreen software layer. I must have miss something. There must be something else to call to force this HID to be connected to another software layer managing the touchscreen.

触摸屏驱动程序位于内核/驱动器/输入/触摸屏。还有一个在内核/驱动器/输入一些code连胜。

The touchscreen drivers are located at kernel/drivers/input/touchscreen. There is also some code straight in kernel/drivers/input.

如何到HID设备连接到Android触摸屏层任何线索?我看他们是如何做到老的电阻之一,并通过HID,因为这是一个定制的设备配合ADC集成在CPU中它不这样做,它不会通过USB接口。

Any clues on how to link that HID device to the Android Touchscreen layer? I look how they did the old resistive one and it is not done through an HID because it's a "custom made" device with ADCs integrated in the CPU and it's not going through USB.

推荐答案

我成功整合了触摸屏驱动程序。下面是步骤,一个粗略的想法只是给了它是如何工作的谁也面临同样的问题,其他人的想法。

I succeeded to integrate the touchscreen driver. Here is a rough idea of the steps just to give an idea of how it works for the others who would face the same kind of problem.

先删除原来的触摸屏驱动程序,以prevent冲突(make xconfig的)

First remove the original touchscreen driver to prevent conflict (make xconfig)

最初,我不工作尽管它已经通过触摸屏制造商提供的驱动程序。我决定尝试eGalax触摸屏驱动程序已经在内核树。这是一个模块的驱​​动程序。 这是不够的,以使在化妆xconfig的模块的设备驱动程序。是的,这将允许编译.ko文件。但它不会告诉建筑物脚本做什么用的file.ko,他们就不会结束与目标系统的内核去。所以,你必须通过添加的东西到构建脚本采取行动或手动复制file.ko在适当的根/模块的位置,然后添加模块的加载与在init的insmod的/modules/file.ko命令。 RC文件。不要忘记设置正确的特权/模块和模块/ file.ko使用chmod命令。

Originally, I had a driver that doesn't work eventhough it was provided by the touchscreen manufacturer. I decided to try the eGalax touchscreen driver already in the Kernel tree. This is a module driver. It is not enough to enable "module device drivers" in the make xconfig. Yes, it will allow to compile the .ko files. but it will not tell the building script what to do with the file.ko and they will not end up going with the kernel in the target system. So you have to take action by adding stuff to the build script or manually copy the file.ko in the proper root/modules location and add the loading of the module with the "insmod /modules/file.ko" command in the init.rc file. Don't forget to set the proper privileged to /modules and modules/file.ko with chmod command.

在其基本的工作,除了没有涉及到这个问题的一些小问题(司机是一个稍微不同的芯片位摆放不同,很容易修复)。

After that it basically worked, except for some minor problems not related to that question (the driver was for a slightly different chip with bits placed differently, easy to fix).

这篇关于在Android的内核更换触摸屏驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆