ARM: SAMSUNG: Add over sampling preventing code
Subsystems (3)
PATCH 1/1 ARM: SAMSUNG: Add over sampling preventing code
From: Dongsoo Ha <[email protected]>
Multiple calling adc by other device have happend over sampling. It can be TS(TouchScreen), in the issue, while the adc is approaching. This commit is preventing code for over sampling.
Signed-off-by Dongsoo Ha <[email protected]>
Signed-off-by Huisung Kang <[email protected]>
--- arch/arm/plat-samsung/adc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/plat-samsung/adc.c +2 -1
@@ -297,7 +297,8 @@ static irqreturn_t s3c_adc_irq(int irq, void *pw) data1 =readl (adc->regs +S3C2410_ADCDAT1 );adc_dbg (adc,"read %d: 0x%04x, 0x%04x\n" , client->nr_samples, data0, data1); - client->nr_samples--; +if (client->nr_samples >0 ) + client->nr_samples--;if (cpu ==TYPE_ADCV1 || cpu ==TYPE_ADCV11 ) { data0 &=0x3ff ;
Signature · 1 line
1.7.1