九鼎创展论坛中文版English
登录 | 立即注册 设为首页收藏本站 切换到宽版
查看: 5273|回复: 3
打印 上一主题 下一主题

关于修改触摸屏通道的问题.

[复制链接]
跳转到指定楼层
楼主
发表于 2012-7-20 17:44:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
自己的板子的触摸使用的是TOUCH SCREEN 1通道. 因为X210ii的触摸使用的是TOUCH SCREEN 0通道, 现在想基于基于X210ii的代码, 将其修改为使用通道1.

自己做了些尝试, 但没有成功, 不知道是否遗漏了什么地方, 请指点.
自己的修改如下:

1. 修改了s3c_ts_resource[], 使用通道1
static struct resource s3c_ts_resource[] = {
    [0] = {
        .start = S3C_PA_ADC1,
        .end   = S3C_PA_ADC1 + SZ_4K - 1,
        .flags = IORESOURCE_MEM,
    },
    [1] = {
        .start = IRQ_PENDN1,
        .end   = IRQ_PENDN1,
        .flags = IORESOURCE_IRQ,
    },
    [2] = {
        .start = IRQ_ADC1,
        .end   = IRQ_ADC1,
        .flags = IORESOURCE_IRQ,
    }
};

2. 修改了s3c_ts_probe(),

writel(readl(ts_base0 + S3C_ADCCON) | (0x0 << 17), ts_base0 + S3C_ADCCON);
修改为:
writel(readl(ts_base0 + S3C_ADCCON) | (0x1 << 17), ts_base0 + S3C_ADCCON);


编译后, 烧写到X210ii的开发板, 启动到一半停止了. 最后的消息是:
[    2.031384] S5PC11X HPD Driver, (c) 2009 Samsung Electronics
[    2.037253] S5PC11X CEC Driver, (c) 2009 Samsung Electronics



回复

使用道具 举报

沙发
发表于 2012-7-22 13:23:57 | 只看该作者
帮你顶一下
你这个应该是电阻屏的驱动吧,我这几天在看电容屏的驱动,是用系统的I2C接口,关于resource的话系统已经初始化,并且会预先创建几个adapter(和通道数有关系的),应该不需要我们修改了,我们修改的应该是设备驱动层,将设备名称和定义和资源中的一致,然后获取一个adapter就可以使用了吧,I2C是这样的,不晓得电阻屏的驱动架构是不是这样子的。
回复 支持 反对

使用道具 举报

板凳
发表于 2012-7-24 17:36:45 | 只看该作者
好好看下这句话:There are two set of touch screen interfaces, namely, AIN[5] ~ AIN[2] for touch screen 0 and AIN[9] ~ AIN[6] for
touch screen 1. There are separate switches for XP, XM, YP and YM control and separate registers to interface
with two touch screens. They share one analog digital converter, so interfacing with the two touch screens should
be performed in turn. TSSEL bit of TSADCCON0 register is used to select which touch screen is connected to the
ADC. Therefore, you must set ‘1’ to TSSEL before an access to TSADCCON1. Similarly, you must set ‘0’ to
TSSEL before an access to TSADCCON0.
An access to TSADCCON1 bits is prohibited when TSSEL bit is ‘0’, and an access to TSADCCON0 bits except
TSSEL is also prohibited when TSSEL bit is ‘1’.An access to TSSEL bit is always permitted.
回复 支持 反对

使用道具 举报

地板
发表于 2012-8-6 12:37:29 | 只看该作者
X210ii 的電容屏接口沒有電源和接地腳, 你們是怎樣供電給電容屏驅動ic的?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|深圳市九鼎创展科技官方论坛 ( 粤ICP备11028681号-2  

GMT+8, 2024-5-19 16:48 , Processed in 0.018715 second(s), 17 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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