S5pv210 之sate210 android4.0 linux kernel 触摸屏通道选择

  sate210 用的是触摸屏通道1,看一下数据手册有说明

TSSEL [17] Touch screen selection
0 = Touch screen 0 (AIN2~AIN5)
1 = Touch screen 1 (AIN6~AIN9)
This bit exists only in TSADCCON0.
Note: An access to TSADCCON1 bits is prohibited when TSSEL
bit is 0, and an access to TSADCCON0 bits except TSSEL is
prohibited when TSSEL bit is 1. An access to TSSEL bit is
always permitted.

 

 

查询一下TSSEL关键字有

root@android2012-desktop:~/S5PV210-ICS/samsung_android_kernel_3.0# grep -r TSSEL *

arch/arm/plat-samsung/adc.c: tmp |= S3C64XX_ADCCON_TSSEL;
arch/arm/plat-samsung/adc.c: tmp |= S3C64XX_ADCCON_TSSEL;
arch/arm/plat-samsung/include/plat/regs-adc.h:#define S3C64XX_ADCCON_TSSEL (1<<17)

#if defined(CONFIG_S3C_DEV_ADC1)
adc->regs -= 0x1000;
tmp = readl(adc->regs + S3C2410_ADCCON);
tmp |= S3C64XX_ADCCON_TSSEL;
writel(tmp, adc->regs + S3C2410_ADCCON);
adc->regs += 0x1000;
#endif

这样就可以知道在smdkv210_android_defconfig 文件增加CONFIG_S3C_DEV_ADC1定义即可

如下

#
# for sate210 touch channel 1 = Touch screen 1 (AIN6~AIN9)
#
CONFIG_S3C_DEV_ADC1=y

 

先测试一下,看看效果如何。

你可能感兴趣的:(S5pv210 之sate210 android4.0 linux kernel 触摸屏通道选择)