Message ID | 1418040187-5372-1-git-send-email-pang.xunlei@linaro.org |
---|---|
State | Accepted |
Headers | show
Return-Path: <rtc-linux+bncBDP5TRNE3AARBLVHS2SAKGQEYFXXMZA@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pd0-x23b.google.com (mail-pd0-x23b.google.com [IPv6:2607:f8b0:400e:c02::23b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3BED31400E2 for <incoming@patchwork.ozlabs.org>; Mon, 8 Dec 2014 23:04:00 +1100 (AEDT) Received: by mail-pd0-f187.google.com with SMTP id fp1sf350114pdb.14 for <incoming@patchwork.ozlabs.org>; Mon, 08 Dec 2014 04:03:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:to:cc:subject:date:message-id:x-original-sender :x-original-authentication-results:reply-to:content-type:precedence :mailing-list:list-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe; bh=30Z3E7wbfbh3YgB8iOfd/BhOxPzKV4iSxZbV+aMgeOU=; b=ZuSVbbMSVIiJC5e7BlRJJFYyU29VWupa4p+Ixj4Ec2uPd9rjZ5QGmoRMJACo6dHzn1 2ZQRBa95UPnGhu7sM7eAuemc8O6JMClm3V+SlfxpS6o3YTbZW7VU4ZotnVEauZqZaZ57 Bgs8YIsjTvO0efVJTuawbg+tQRFCji+7slqigfUyUE/JXJyfhfBSElZCrVP5dek7WQj3 uvXof84WMYdZhYvAQoUQ+AdlhMZp3OjYQw4TV9QHHAK3ruIKM5/tTBGFgGGa/N2jWtPE M6Jb2u3KkQu8h35GiB637s54Ip04nEiLTXoF70NXVLA2gFeY0c2d4u6EuqF84p/sJDu+ L3Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:reply-to :content-type:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe; bh=30Z3E7wbfbh3YgB8iOfd/BhOxPzKV4iSxZbV+aMgeOU=; b=deTbkhfANRC7Z7BkhMTG9Etl3weV4j2ZWtUMmfKFTKtl7AvWVBs9EElFdstLsHEcLI C2gVKQ46U1BGShqoLQQekWfuXVyl8PVl/DdZQmeoghp/FRi5panoMyIlVOn7zaG8O8iR UJkUOdxfp2rSu7wDtQhsx1o95gROGVlJhCsRRUo7ybk+PwaPtrDyCIQ7fL1XaSkKzxdw fLy6Q9axut8oJYoU5fKJRcHQBqV1Yoy94vj+J3i0mcsR+xTFsbDpR4khMVTdj8wdxvFp xg9k0n/LM2FiQwE/Pf0iMdKgHb9OxzXWMSuVHHIpXctsV3bAZsBU1acQrIIm19FK6nW5 rB9w== X-Received: by 10.182.250.130 with SMTP id zc2mr212851obc.3.1418040238481; Mon, 08 Dec 2014 04:03:58 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.182.79.228 with SMTP id m4ls1018593obx.9.gmail; Mon, 08 Dec 2014 04:03:58 -0800 (PST) X-Received: by 10.182.29.101 with SMTP id j5mr27832542obh.32.1418040238020; Mon, 08 Dec 2014 04:03:58 -0800 (PST) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com. [209.85.192.178]) by gmr-mx.google.com with ESMTPS id dg8si2673415pdb.1.2014.12.08.04.03.57 for <rtc-linux@googlegroups.com> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Dec 2014 04:03:57 -0800 (PST) Received-SPF: pass (google.com: domain of pang.xunlei@linaro.org designates 209.85.192.178 as permitted sender) client-ip=209.85.192.178; Received: by mail-pd0-f178.google.com with SMTP id g10so5095848pdj.9 for <rtc-linux@googlegroups.com>; Mon, 08 Dec 2014 04:03:57 -0800 (PST) X-Gm-Message-State: ALoCoQmNwkhOPTTsCUtCJ5F3aPc/ztaqwmzeJ+Kk8cKTxPv4M9mBR/H9EoOqxRXem6PXPgzr5vc4 X-Received: by 10.70.5.68 with SMTP id q4mr20501431pdq.116.1418040237719; Mon, 08 Dec 2014 04:03:57 -0800 (PST) Received: from localhost.localdomain ([210.21.223.3]) by mx.google.com with ESMTPSA id c3sm31180790pdi.96.2014.12.08.04.03.53 for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Dec 2014 04:03:57 -0800 (PST) From: Xunlei Pang <pang.xunlei@linaro.org> To: linux-kernel@vger.kernel.org Cc: rtc-linux@googlegroups.com, Alessandro Zummo <a.zummo@towertech.it>, John Stultz <john.stultz@linaro.org>, Arnd Bergmann <arnd.bergmann@linaro.org>, Xunlei Pang <pang.xunlei@linaro.org> Subject: [rtc-linux] [PATCH 1/2] rtc/ab8500: set uie_unsupported flag Date: Mon, 8 Dec 2014 20:03:06 +0800 Message-Id: <1418040187-5372-1-git-send-email-pang.xunlei@linaro.org> X-Mailer: git-send-email 1.9.1 X-Original-Sender: pang.xunlei@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of pang.xunlei@linaro.org designates 209.85.192.178 as permitted sender) smtp.mail=pang.xunlei@linaro.org Reply-To: rtc-linux@googlegroups.com Content-Type: text/plain; charset=UTF-8 Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: <rtc-linux.googlegroups.com> X-Google-Group-Id: 712029733259 List-Post: <http://groups.google.com/group/rtc-linux/post>, <mailto:rtc-linux@googlegroups.com> List-Help: <http://groups.google.com/support/>, <mailto:rtc-linux+help@googlegroups.com> List-Archive: <http://groups.google.com/group/rtc-linux Sender: rtc-linux@googlegroups.com List-Subscribe: <http://groups.google.com/group/rtc-linux/subscribe>, <mailto:rtc-linux+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+712029733259+unsubscribe@googlegroups.com>, <http://groups.google.com/group/rtc-linux/subscribe> |
diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c index 727e2f5..866e0ef 100644 --- a/drivers/rtc/rtc-ab8500.c +++ b/drivers/rtc/rtc-ab8500.c @@ -504,6 +504,8 @@ static int ab8500_rtc_probe(struct platform_device *pdev) return err; } + rtc->uie_unsupported = 1; + return 0; }
Currently, ab8500 doesn't set uie_unsupported of rtc_device, while it doesn't support UIE, see ab8500_rtc_set_alarm(). Thus, when going through rtc_update_irq_enable()->rtc_timer_enqueue(), there's a chance it has an alarm timer1 queued before which is going to fired, so this update timer2 will be queued because it isn't the leftmost one, which means rtc_timer_enqueue() will return 0. This will result in two problems: 1) UIE EMUL will not be used. 2) When the alarm timer1 is fired, in rtc_timer_do_work() timer2 will fail to set the alarm time, so this rtc will disfunctional due to timer2 with the earliest expires in the timerqueue. So, rtc drivers must set this flag if they don't support UIE. Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org> --- drivers/rtc/rtc-ab8500.c | 2 ++ 1 file changed, 2 insertions(+)