From patchwork Mon Feb 21 23:55:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 83896 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-vx0-f184.google.com (mail-vx0-f184.google.com [209.85.220.184]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 11411B716A for ; Tue, 22 Feb 2011 10:56:01 +1100 (EST) Received: by mail-vx0-f184.google.com with SMTP id 37sf1276020vxa.11 for ; Mon, 21 Feb 2011 15:56:01 -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=tO18ItpPEcMDcPU6STP9Roy7U7OX1TNmj3rd5rJ7Kgk=; b=Pm9/OXyawvCsoFiESgwDL0go9yK8LdDfMnLwoisHr3tuuN9lWksgE/Kqgq+UNRMGxa vht1XiytFzqkZcJlz7B3VdpAqQ9MjrhVG3ar2Kzs4CjH10+H9fNc2hzJi85ZL3DYIHtT xtYYx/PX9WCHZMnwsh3wvB7M9nIkD1jW1MB7I= 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=RUyQaaSeAiLxBDStxOXPbQqsbBpIVRb3GJ3oxIR+0y4Pzpjnfc6g9fQLRpSeMxiYUy f/oEN0yOfWjrJoY2opTPhlnhFz2s2eyF07QL3iAH1Hys7eXVQKX/i/ZMMGGJ0GzUWzoc fBUAhvHxMxp5BUSbh5zw8tsK5WwZ2UcM0qv0U= Received: by 10.220.199.193 with SMTP id et1mr179261vcb.5.1298332560646; Mon, 21 Feb 2011 15:56:00 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.220.89.83 with SMTP id d19ls1693053vcm.5.p; Mon, 21 Feb 2011 15:56:00 -0800 (PST) Received: by 10.220.171.20 with SMTP id f20mr516277vcz.23.1298332560058; Mon, 21 Feb 2011 15:56:00 -0800 (PST) Received: by 10.220.171.20 with SMTP id f20mr516275vcz.23.1298332560038; Mon, 21 Feb 2011 15:56:00 -0800 (PST) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by gmr-mx.google.com with ESMTPS id t10si897139vcc.11.2011.02.21.15.55.58 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Feb 2011 15:55:59 -0800 (PST) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.150 as permitted sender) client-ip=32.97.110.150; Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e32.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p1LNjRGC025866 for ; Mon, 21 Feb 2011 16:45:27 -0700 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p1LNtq4j120290 for ; Mon, 21 Feb 2011 16:55:52 -0700 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p1LNtpe0003600 for ; Mon, 21 Feb 2011 16:55:52 -0700 Received: from kernel.beaverton.ibm.com (kernel.beaverton.ibm.com [9.47.67.96]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p1LNtpa5003579; Mon, 21 Feb 2011 16:55:51 -0700 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id 126681E7510; Mon, 21 Feb 2011 15:55:51 -0800 (PST) From: John Stultz To: LKML Cc: John Stultz , Thomas Gleixner , Alessandro Zummo , Marcelo Roberto Jimenez , rtc-linux@googlegroups.com Subject: [rtc-linux] [PATCH 10/10] RTC: Fix up rtc.txt documentation to reflect changes to generic rtc layer Date: Mon, 21 Feb 2011 15:55:38 -0800 Message-Id: <1298332538-31216-11-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1298332538-31216-1-git-send-email-john.stultz@linaro.org> References: <1298332538-31216-1-git-send-email-john.stultz@linaro.org> X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.150 as permitted sender) smtp.mail=jstultz@us.ibm.com 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: , Now that the genric RTC layer handles much of the RTC functionality, the rtc.txt documentation needs to be updated to remove outdated information. CC: Thomas Gleixner CC: Alessandro Zummo CC: Marcelo Roberto Jimenez CC: rtc-linux@googlegroups.com Signed-off-by: John Stultz --- Documentation/rtc.txt | 29 ++++++++++------------------- 1 files changed, 10 insertions(+), 19 deletions(-) diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt index 9104c10..2501604 100644 --- a/Documentation/rtc.txt +++ b/Documentation/rtc.txt @@ -178,38 +178,29 @@ RTC class framework, but can't be supported by the older driver. setting the longer alarm time and enabling its IRQ using a single request (using the same model as EFI firmware). - * RTC_UIE_ON, RTC_UIE_OFF ... if the RTC offers IRQs, it probably - also offers update IRQs whenever the "seconds" counter changes. - If needed, the RTC framework can emulate this mechanism. + * RTC_UIE_ON, RTC_UIE_OFF ... if the RTC offers IRQs, the RTC framework + will emulate this mechanism. - * RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET, RTC_IRQP_READ ... another - feature often accessible with an IRQ line is a periodic IRQ, issued - at settable frequencies (usually 2^N Hz). + * RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET, RTC_IRQP_READ ... these icotls + are emulated via a kernel hrtimer. In many cases, the RTC alarm can be a system wake event, used to force Linux out of a low power sleep state (or hibernation) back to a fully operational state. For example, a system could enter a deep power saving state until it's time to execute some scheduled tasks. -Note that many of these ioctls need not actually be implemented by your -driver. The common rtc-dev interface handles many of these nicely if your -driver returns ENOIOCTLCMD. Some common examples: +Note that many of these ioctls are handled by the common rtc-dev interface. +Some common examples: * RTC_RD_TIME, RTC_SET_TIME: the read_time/set_time functions will be called with appropriate values. - * RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET, RTC_WKALM_RD: the - set_alarm/read_alarm functions will be called. + * RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET, RTC_WKALM_RD: gets or sets + the alarm rtc_timer. May call the set_alarm driver function. - * RTC_IRQP_SET, RTC_IRQP_READ: the irq_set_freq function will be called - to set the frequency while the framework will handle the read for you - since the frequency is stored in the irq_freq member of the rtc_device - structure. Your driver needs to initialize the irq_freq member during - init. Make sure you check the requested frequency is in range of your - hardware in the irq_set_freq function. If it isn't, return -EINVAL. If - you cannot actually change the frequency, do not define irq_set_freq. + * RTC_IRQP_SET, RTC_IRQP_READ: These are emulated by the generic code. - * RTC_PIE_ON, RTC_PIE_OFF: the irq_set_state function will be called. + * RTC_PIE_ON, RTC_PIE_OFF: These are also emulated by the generic code. If all else fails, check out the rtc-test.c driver!