All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Kukjin Kim <kgene.kim@samsung.com>, 'Ben Dooks' <ben-linux@fluff.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	"Heiko Stübner" <heiko@sntech.de>
Subject: [PATCH 2/5] s3c-adc: Fix mux bit modification in s3c_adc_select
Date: Mon, 10 Oct 2011 21:48:50 +0200	[thread overview]
Message-ID: <201110102148.50392.heiko@sntech.de> (raw)
In-Reply-To: <201110102146.51694.heiko@sntech.de>

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>
---
 arch/arm/plat-samsung/adc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

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

WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] s3c-adc: Fix mux bit modification in s3c_adc_select
Date: Mon, 10 Oct 2011 21:48:50 +0200	[thread overview]
Message-ID: <201110102148.50392.heiko@sntech.de> (raw)
In-Reply-To: <201110102146.51694.heiko@sntech.de>

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>
---
 arch/arm/plat-samsung/adc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

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

  parent reply	other threads:[~2011-10-10 19:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10 19:46 [PATCH v3 0/5] S3C2443/S3C2416: Implement support for ADC Heiko Stübner
2011-10-10 19:46 ` Heiko Stübner
2011-10-10 19:47 ` [PATCH 1/5] S3C2443/S3C2416: Add adc registers Heiko Stübner
2011-10-10 19:47   ` Heiko Stübner
2011-10-10 19:48 ` Heiko Stübner [this message]
2011-10-10 19:48   ` [PATCH 2/5] s3c-adc: Fix mux bit modification in s3c_adc_select Heiko Stübner
2011-10-10 19:49 ` [PATCH 3/5] S3C24XX: Allow overriding of adc device name Heiko Stübner
2011-10-10 19:49   ` Heiko Stübner
2011-10-10 19:50 ` [PATCH 4/5] s3c-adc: Add support for S3C2443 Heiko Stübner
2011-10-10 19:50   ` Heiko Stübner
2011-10-10 19:51 ` [PATCH 5/5] s3c-adc: Add support for S3C2416/S3C2450 Heiko Stübner
2011-10-10 19:51   ` Heiko Stübner
2011-10-14  7:13 ` [PATCH v3 0/5] S3C2443/S3C2416: Implement support for ADC Kukjin Kim
2011-10-14  7:13   ` Kukjin Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201110102148.50392.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=ben-linux@fluff.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.