s3c-adc: Fix mux bit modification in s3c_adc_select

A patch from »S3C2443/S3C2416: Implement support for ADC« in state Mainline for linux-kernel

From: Heiko Stuebner <heiko@...> Date: Thu, 8 Sep 2011 21:18:49 +0200

Commit-Message

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@...>

Patch-Comment

arch/arm/plat-samsung/adc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)

Statistics

  • 2 lines added
  • 1 lines removed

Changes

------------------------- arch/arm/plat-samsung/adc.c --------------------------
index ee8deef..7821055a 100644
@@ -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;
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...