diff options
author | Vasily Khoruzhick <anarsoul@gmail.com> | 2009-10-24 03:04:55 -0500 |
---|---|---|
committer | Lars-Peter Clausen <lars@metafoo.de> | 2009-10-24 15:07:07 +0200 |
commit | f6ed8a40eae91bde1ccd3466f12decbfd2be8943 (patch) | |
tree | ab7bde01ad0f32aacf367672a285a6e397bacabd /arch | |
parent | 74fca6a42863ffacaf7ba6f1936a9f228950f657 (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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-s3c24xx/adc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c24xx/adc.c b/arch/arm/plat-s3c24xx/adc.c index ee1baf11ad9..a30a5311abf 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; }; @@ -264,6 +265,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) { @@ -303,6 +305,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"); @@ -358,6 +361,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; } |