From patchwork Mon Feb 7 21:16:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Roberto Jimenez X-Patchwork-Id: 82152 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-yx0-f184.google.com (mail-yx0-f184.google.com [209.85.213.184]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id E5E16B7127 for ; Tue, 8 Feb 2011 08:17:11 +1100 (EST) Received: by yxk8 with SMTP id 8sf3129134yxk.11 for ; Mon, 07 Feb 2011 13:17:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:mime-version:x-beenthere:received-spf:from:to :cc:subject:date:message-id:x-mailer:in-reply-to:references :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe:content-type; bh=8BkCwMa32Z9/fA+jNJ/O1pogDdpYU3LPrARtehaXzJE=; b=Cszpbys3RRlWq3VHZj0o7tzUoXTc5XbRgyc+Y4WBstzxYmGB+xbMVnTn72CN5pLViN Dvu5RVETqGFLY1Kp6i2GEvxQOfdpDHL8M2bnk6EneVi0dSxVVUecR/wh8rWLHN36g1VS Lub3jJCYlJi5YVkFhusws/ehZca7Z/bSogk88= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; b=MYxP1rJ+wFfAMF4bhb63TP9B9bSgNAO92XeQf4q7Q0L3Gw7FeOxp+s1Z77bMMKpcWC P+LQhcaaNgunQ8s4lBeBbLj3w4dZ4o/oq9UcA1WaVtkNPixS12+ByAkNprbqU3EK37jn mYuIWdd57oKjfJld6vVW9PO/IkWhkYv83Xc1M= Received: by 10.236.109.19 with SMTP id r19mr219652yhg.23.1297113428117; Mon, 07 Feb 2011 13:17:08 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.150.162.21 with SMTP id k21ls897526ybe.7.p; Mon, 07 Feb 2011 13:17:07 -0800 (PST) Received: by 10.236.108.11 with SMTP id p11mr7453137yhg.5.1297113427295; Mon, 07 Feb 2011 13:17:07 -0800 (PST) Received: by 10.236.108.11 with SMTP id p11mr7453136yhg.5.1297113427268; Mon, 07 Feb 2011 13:17:07 -0800 (PST) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by gmr-mx.google.com with ESMTPS id 68si575549yhl.9.2011.02.07.13.17.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 07 Feb 2011 13:17:07 -0800 (PST) Received-SPF: neutral (google.com: 209.85.213.180 is neither permitted nor denied by best guess record for domain of mroberto@cpti.cetuc.puc-rio.br) client-ip=209.85.213.180; Received: by yxd30 with SMTP id 30so4041082yxd.25 for ; Mon, 07 Feb 2011 13:17:07 -0800 (PST) Received: by 10.150.202.11 with SMTP id z11mr5879773ybf.244.1297113426510; Mon, 07 Feb 2011 13:17:06 -0800 (PST) Received: from localhost.localdomain ([139.82.178.36]) by mx.google.com with ESMTPS id m49sm3208519yha.2.2011.02.07.13.17.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 07 Feb 2011 13:17:05 -0800 (PST) From: Marcelo Roberto Jimenez To: linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com, linux@arm.linux.org.uk Cc: john.stultz@linaro.org, tglx@linutronix.de, a.zummo@towertech.it, Marcelo Roberto Jimenez Subject: [rtc-linux] [PATCH 1/4] RTC: Include information about UIE and PIE in RTC driver proc. Date: Mon, 7 Feb 2011 19:16:05 -0200 Message-Id: <1297113368-27174-2-git-send-email-mroberto@cpti.cetuc.puc-rio.br> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1297113368-27174-1-git-send-email-mroberto@cpti.cetuc.puc-rio.br> References: <1297113368-27174-1-git-send-email-mroberto@cpti.cetuc.puc-rio.br> X-Original-Sender: mroberto@cpti.cetuc.puc-rio.br X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.213.180 is neither permitted nor denied by best guess record for domain of mroberto@cpti.cetuc.puc-rio.br) smtp.mail=mroberto@cpti.cetuc.puc-rio.br Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Generic RTC code is always able to provide the necessary information about update and periodic interrupts. This patch add such information to the proc interface. Signed-off-by: Marcelo Roberto Jimenez --- drivers/rtc/rtc-proc.c | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/rtc/rtc-proc.c b/drivers/rtc/rtc-proc.c index c086fc3..b4ecec0 100644 --- a/drivers/rtc/rtc-proc.c +++ b/drivers/rtc/rtc-proc.c @@ -30,15 +30,15 @@ static int rtc_proc_show(struct seq_file *seq, void *offset) err = rtc_read_time(rtc, &tm); if (err == 0) { seq_printf(seq, - "rtc_time\t: %02d:%02d:%02d\n" - "rtc_date\t: %04d-%02d-%02d\n", + "rtc_time\t\t: %02d:%02d:%02d\n" + "rtc_date\t\t: %04d-%02d-%02d\n", tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); } err = rtc_read_alarm(rtc, &alrm); if (err == 0) { - seq_printf(seq, "alrm_time\t: "); + seq_printf(seq, "alrm_time\t\t: "); if ((unsigned int)alrm.time.tm_hour <= 24) seq_printf(seq, "%02d:", alrm.time.tm_hour); else @@ -52,7 +52,7 @@ static int rtc_proc_show(struct seq_file *seq, void *offset) else seq_printf(seq, "**\n"); - seq_printf(seq, "alrm_date\t: "); + seq_printf(seq, "alrm_date\t\t: "); if ((unsigned int)alrm.time.tm_year <= 200) seq_printf(seq, "%04d-", alrm.time.tm_year + 1900); else @@ -65,13 +65,21 @@ static int rtc_proc_show(struct seq_file *seq, void *offset) seq_printf(seq, "%02d\n", alrm.time.tm_mday); else seq_printf(seq, "**\n"); - seq_printf(seq, "alarm_IRQ\t: %s\n", + seq_printf(seq, "alarm IRQ enabled\t: %s\n", alrm.enabled ? "yes" : "no"); - seq_printf(seq, "alrm_pending\t: %s\n", + seq_printf(seq, "alarm pending\t\t: %s\n", alrm.pending ? "yes" : "no"); + seq_printf(seq, "update IRQ enabled\t: %s\n", + (rtc->uie_rtctimer.enabled) ? "yes" : "no"); + seq_printf(seq, "periodic IRQ enabled\t: %s\n", + (rtc->pie_enabled) ? "yes" : "no"); + seq_printf(seq, "periodic IRQ frequency\t: %d\n", + rtc->irq_freq); + seq_printf(seq, "max user IRQ frequency\t: %d\n", + rtc->max_user_freq); } - seq_printf(seq, "24hr\t\t: yes\n"); + seq_printf(seq, "24hr\t\t\t: yes\n"); if (ops->proc) ops->proc(rtc->dev.parent, seq);