aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Khoruzhick <anarsoul@gmail.com>2009-10-24 03:04:55 -0500
committerLars-Peter Clausen <lars@metafoo.de>2009-12-15 18:29:31 +0100
commitfb49c8b3238fec0f79535303e90e909ccc058059 (patch)
tree00acb35a43e144129b6bd54be53c2b7f1b1d2337
parent22763c5cf3690a681551162c15d34d935308c8d7 (diff)
s3c24xx: introduce s3c-adc delay
Without this patch we cannot make the s3c2410/s3c2440 touchscreen driver work. This will be done in a different way in upstream kernel. We specify the delay value (S3C2410_ADCDLY). Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
-rw-r--r--arch/arm/plat-s3c24xx/adc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c24xx/adc.c b/arch/arm/plat-s3c24xx/adc.c
index df47322492d..a1dbd0ce59e 100644
--- a/arch/arm/plat-s3c24xx/adc.c
+++ b/arch/arm/plat-s3c24xx/adc.c
@@ -62,6 +62,7 @@ struct adc_device {
void __iomem *regs;
unsigned int prescale;
+ unsigned int delay;
int irq;
};
@@ -307,6 +308,7 @@ static int s3c_adc_probe(struct platform_device *pdev)
adc->pdev = pdev;
adc->prescale = S3C2410_ADCCON_PRSCVL(49);
+ adc->delay = 0x2710;
adc->irq = platform_get_irq(pdev, 1);
if (adc->irq <= 0) {
@@ -346,6 +348,7 @@ static int s3c_adc_probe(struct platform_device *pdev)
writel(adc->prescale | S3C2410_ADCCON_PRSCEN,
adc->regs + S3C2410_ADCCON);
+ writel(adc->delay, adc->regs + S3C2410_ADCDLY);
dev_info(dev, "attached adc driver\n");
@@ -401,6 +404,7 @@ static int s3c_adc_resume(struct platform_device *pdev)
writel(adc->prescale | S3C2410_ADCCON_PRSCEN,
adc->regs + S3C2410_ADCCON);
+ writel(adc->delay, adc->regs + S3C2410_ADCDLY);
return 0;
}