From fb49c8b3238fec0f79535303e90e909ccc058059 Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Sat, 24 Oct 2009 03:04:55 -0500 Subject: 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 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 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; } -- cgit v1.2.3