From patchwork Sun Jun 17 13:45:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 165339 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-wg0-f56.google.com (mail-wg0-f56.google.com [74.125.82.56]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 73826B7136 for ; Sun, 17 Jun 2012 23:45:53 +1000 (EST) Received: by mail-wg0-f56.google.com with SMTP id ds11sf2434494wgb.11 for ; Sun, 17 Jun 2012 06:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:from:to:cc:subject:date:message-id :x-mailer:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=Xj3qhieqlEuQaMKGj+bUjaHam7lxU9wAQg2vu6Y/n9k=; b=XnKKzegr3I7Z26ZnaMGEQ/2BgzR/z3VXUkqtQf8TvTpHHLngA5n5mHSQkrmkFtbstI KK15fnmCZFdaAxj9m9vKhvG0dct/K+n00tO/qY/E1eUMAhY3QLhJpLd+0dYA0ZV5VoYT p5klm3MLkDvhVmfESUzR3xHXckr959iE/zJd0= Received: by 10.216.150.205 with SMTP id z55mr256184wej.85.1339940752804; Sun, 17 Jun 2012 06:45:52 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.14.28.130 with SMTP id g2ls746069eea.7.gmail; Sun, 17 Jun 2012 06:45:52 -0700 (PDT) Received: by 10.14.28.65 with SMTP id f41mr3360793eea.11.1339940752204; Sun, 17 Jun 2012 06:45:52 -0700 (PDT) Received: by 10.14.28.65 with SMTP id f41mr3360792eea.11.1339940752183; Sun, 17 Jun 2012 06:45:52 -0700 (PDT) Received: from eu1sys200aog107.obsmtp.com (eu1sys200aog107.obsmtp.com. [207.126.144.123]) by gmr-mx.google.com with SMTP id v14si14677890eef.2.2012.06.17.06.45.32 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 17 Jun 2012 06:45:52 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.123 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.123; Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob107.postini.com ([207.126.147.11]) with SMTP ID DSNKT93fe/d7CF2a1atg9ATHr0kGY/v7FG8J@postini.com; Sun, 17 Jun 2012 13:45:51 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 8A2999E; Sun, 17 Jun 2012 13:37:09 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id CD67312AF; Sun, 17 Jun 2012 13:45:28 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 4E6D7A8065; Sun, 17 Jun 2012 15:45:22 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Sun, 17 Jun 2012 15:45:27 +0200 From: Linus Walleij To: Andrew Morton Cc: Alessandro Zummo , , Bengt Jonsson , Linus Walleij Subject: [rtc-linux] [PATCH 2/2] rtc/ab8500: Remove fix for AB8500 ED version Date: Sun, 17 Jun 2012 15:45:24 +0200 Message-ID: <1339940724-6963-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.9.2 MIME-Version: 1.0 X-Original-Sender: linus.walleij@stericsson.com X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 207.126.144.123 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , From: Bengt Jonsson AB8500 ED (Early Drop) is no longer supported by the kernel. Signed-off-by: Bengt Jonsson Signed-off-by: Linus Walleij --- drivers/rtc/rtc-ab8500.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c index 60e43ab..5268d9d 100644 --- a/drivers/rtc/rtc-ab8500.c +++ b/drivers/rtc/rtc-ab8500.c @@ -88,22 +88,17 @@ static int ab8500_rtc_read_time(struct device *dev, struct rtc_time *tm) if (retval < 0) return retval; - /* Early AB8500 chips will not clear the rtc read request bit */ - if (abx500_get_chip_id(dev) == 0) { - usleep_range(1000, 1000); - } else { - /* Wait for some cycles after enabling the rtc read in ab8500 */ - while (time_before(jiffies, timeout)) { - retval = abx500_get_register_interruptible(dev, - AB8500_RTC, AB8500_RTC_READ_REQ_REG, &value); - if (retval < 0) - return retval; - - if (!(value & RTC_READ_REQUEST)) - break; - - usleep_range(1000, 5000); - } + /* Wait for some cycles after enabling the rtc read in ab8500 */ + while (time_before(jiffies, timeout)) { + retval = abx500_get_register_interruptible(dev, + AB8500_RTC, AB8500_RTC_READ_REQ_REG, &value); + if (retval < 0) + return retval; + + if (!(value & RTC_READ_REQUEST)) + break; + + usleep_range(1000, 5000); } /* Read the Watchtime registers */