From 16e3d48d8ff84d279483b237c1e509ff1388eca2 Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Tue, 22 Sep 2009 05:23:12 -0500 Subject: 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 Signed-off-by: Nelson Castillo --- arch/arm/plat-s3c24xx/adc.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit v1.2.3