diff options
author | Nelson Castillo <arhuaco@freaks-unidos.net> | 2009-09-18 01:45:39 -0500 |
---|---|---|
committer | Nelson Castillo <arhuaco@freaks-unidos.net> | 2009-09-22 23:08:06 -0500 |
commit | 7ddf2bb46771e10d4cc7da94b3c1210426806def (patch) | |
tree | 01c461e2cbeaf743b11a4832817dab9934895d82 /arch/arm/plat-s3c24xx/adc.c | |
parent | 16e3d48d8ff84d279483b237c1e509ff1388eca2 (diff) |
Make s3c TS driver use s3c-adc API
I had a patch by Vasily Khoruzhick <anarsoul@gmail.com>
in the linux-arm-kernel as a guide for some of the changes.
Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
Diffstat (limited to 'arch/arm/plat-s3c24xx/adc.c')
-rw-r--r-- | arch/arm/plat-s3c24xx/adc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c24xx/adc.c b/arch/arm/plat-s3c24xx/adc.c index a9eec95f70d..9056bcc6c17 100644 --- a/arch/arm/plat-s3c24xx/adc.c +++ b/arch/arm/plat-s3c24xx/adc.c @@ -69,10 +69,19 @@ static LIST_HEAD(adc_pending); #define adc_dbg(_adc, msg...) dev_dbg(&(_adc)->pdev->dev, msg) +#define AUTOPST (S3C2410_ADCTSC_YM_SEN | S3C2410_ADCTSC_YP_SEN | \ + S3C2410_ADCTSC_XP_SEN | S3C2410_ADCTSC_AUTO_PST | \ + S3C2410_ADCTSC_XY_PST(0)) + + static inline void s3c_adc_convert(struct adc_device *adc) { unsigned con = readl(adc->regs + S3C2410_ADCCON); + if (adc->cur->is_ts) + writel(S3C2410_ADCTSC_PULL_UP_DISABLE | AUTOPST, + adc->regs + S3C2410_ADCTSC); + con |= S3C2410_ADCCON_ENABLE_START; writel(con, adc->regs + S3C2410_ADCCON); } |