]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ARM: SAMSUNG: Fix mux bit modification in s3c_adc_select
authorHeiko Stuebner <heiko@sntech.de>
Wed, 12 Oct 2011 12:34:11 +0000 (21:34 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Wed, 12 Oct 2011 12:34:41 +0000 (21:34 +0900)
The mux bits in the adccon register should be cleared only
if muxing is really done in ADCCON and not another register.

This patch introduces a conditional for this.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/plat-samsung/adc.c

index ee8deef1948156d02c01423ca1fc6b8f771451e2..7821055a5046ccc84670865e0bb53f6354d7069f 100644 (file)
@@ -98,7 +98,8 @@ static inline void s3c_adc_select(struct adc_device *adc,
 
        client->select_cb(client, 1);
 
-       con &= ~S3C2410_ADCCON_MUXMASK;
+       if (cpu == TYPE_ADCV1 || cpu == TYPE_ADCV2)
+               con &= ~S3C2410_ADCCON_MUXMASK;
        con &= ~S3C2410_ADCCON_STDBM;
        con &= ~S3C2410_ADCCON_STARTMASK;