From patchwork Mon Dec 8 12:03:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "pang.xunlei" X-Patchwork-Id: 41997 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8BAA7202E0 for ; Mon, 8 Dec 2014 12:04:28 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id gd6sf2329121lab.4 for ; Mon, 08 Dec 2014 04:04:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=qABOy3YEFX5XhFP1XyuADf6n5edp+0XG0cmHnZBRmOs=; b=UWYkdn9NNyibrls/TYcrVDGtV2GdOYPQuX5o4QTDA+xGtxSVom94cm5e56Jwo0Xcow RBLR3/cxt7oUOHg++iv9lZQR3g0eK39UTyzHVkpaRNfIubxImmE9jL9slcYWIY5p7s0b 9QtYI/UOKz8h88Ds+4s5h2fEn5Yag5T9zuR86+LwPAw6IBujNPWUEyqoS4q7WaQs0C62 0ACAhyQZcyfYC3wtphkCAkEDRPOYZwikWf6wcBStP3KDr/7BOlL6mDvQgyoutWAZwjfM J+1BpxFFLyhqLuzlUHM+tCR+eSbNKZI70hbfSni4ZfQbQe8rVppL9HM21GEuV/3W78cr lZJg== X-Gm-Message-State: ALoCoQkpaxlwtGmqiGwGNfznidEybUTvimidW9VNdV4N2VJadjjszxsTvaZY5WXuaVObALqBM5As X-Received: by 10.112.142.36 with SMTP id rt4mr6161899lbb.3.1418040267359; Mon, 08 Dec 2014 04:04:27 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.227 with SMTP id 3ls700282lax.49.gmail; Mon, 08 Dec 2014 04:04:27 -0800 (PST) X-Received: by 10.112.52.73 with SMTP id r9mr15754484lbo.15.1418040267189; Mon, 08 Dec 2014 04:04:27 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id k10si28319851lam.2.2014.12.08.04.04.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Dec 2014 04:04:27 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id q1so3906695lam.33 for ; Mon, 08 Dec 2014 04:04:27 -0800 (PST) X-Received: by 10.112.173.202 with SMTP id bm10mr15596379lbc.74.1418040267060; Mon, 08 Dec 2014 04:04:27 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp591147lbc; Mon, 8 Dec 2014 04:04:26 -0800 (PST) X-Received: by 10.70.134.10 with SMTP id pg10mr20138089pdb.47.1418040265506; Mon, 08 Dec 2014 04:04:25 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hl9si54605456pac.146.2014.12.08.04.04.00 for ; Mon, 08 Dec 2014 04:04:25 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755319AbaLHMD7 (ORCPT + 27 others); Mon, 8 Dec 2014 07:03:59 -0500 Received: from mail-pd0-f178.google.com ([209.85.192.178]:33645 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752358AbaLHMD6 (ORCPT ); Mon, 8 Dec 2014 07:03:58 -0500 Received: by mail-pd0-f178.google.com with SMTP id g10so5009885pdj.23 for ; Mon, 08 Dec 2014 04:03:57 -0800 (PST) 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 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Dec 2014 04:03:57 -0800 (PST) From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: rtc-linux@googlegroups.com, Alessandro Zummo , John Stultz , Arnd Bergmann , Xunlei Pang Subject: [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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pang.xunlei@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- drivers/rtc/rtc-ab8500.c | 2 ++ 1 file changed, 2 insertions(+) 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; }