aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorVasily Khoruzhick <anarsoul@gmail.com>2009-09-22 05:23:12 -0500
committerNelson Castillo <arhuaco@freaks-unidos.net>2009-09-22 23:08:02 -0500
commit16e3d48d8ff84d279483b237c1e509ff1388eca2 (patch)
tree57a193947a08c390a219c27b04c6c11fbeaf015a /arch
parentf4ad756aceabef95fea74609de81375ee8efc6c5 (diff)
s3c24xx: introduce s3c-adc delay
Without this patch we cannot make the s3c2410/s3c2440 touchscreen driver work. Is this delay device-dependant? Is there a better way to do this? We specify the delay value (S3C2410_ADCDLY). Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
Diffstat (limited to 'arch')
-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 03429b2a27f..a9eec95f70d 100644
--- a/arch/arm/plat-s3c24xx/adc.c
+++ b/arch/arm/plat-s3c24xx/adc.c
@@ -58,6 +58,7 @@ struct adc_device {
void __iomem *regs;
unsigned int prescale;
+ unsigned int delay;
int irq;
};
@@ -247,6 +248,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) {
@@ -286,6 +288,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");
@@ -341,6 +344,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;
}