From patchwork Sat Jul 21 11:20:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Prisk X-Patchwork-Id: 172422 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pb0-f56.google.com (mail-pb0-f56.google.com [209.85.160.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 DEBFC2C03B6 for ; Sat, 21 Jul 2012 21:20:32 +1000 (EST) Received: by pbbro12 with SMTP id ro12sf5244492pbb.11 for ; Sat, 21 Jul 2012 04:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer: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=j4UqY5RExyRbYeDX7sXxXq+ZnoeNa2CkMc015Dwbwgk=; b=5/wpQG3s5Bqbu00puQ8T9JbGhm+mXnRhip5sZj4vWNm5PjgohNRHtQZZxxZZm6XgYE pRvv6Dv3U9qUqVJh6QpcNnanM29lNnDog0M5IAvvPL+zTas4VkVQccYGgJCoJ1DIBYyS 4IR2QHQSIcJKKN3l12Kp/3nwCYMkd4aJwakE0= Received: by 10.68.233.5 with SMTP id ts5mr1331481pbc.20.1342869630827; Sat, 21 Jul 2012 04:20:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.68.233.8 with SMTP id ts8ls5728082pbc.7.gmail; Sat, 21 Jul 2012 04:20:30 -0700 (PDT) Received: by 10.66.84.8 with SMTP id u8mr883736pay.45.1342869630310; Sat, 21 Jul 2012 04:20:30 -0700 (PDT) Received: by 10.66.84.8 with SMTP id u8mr883735pay.45.1342869630299; Sat, 21 Jul 2012 04:20:30 -0700 (PDT) Received: from mta02.xtra.co.nz (mta05.xtra.co.nz. [210.54.141.250]) by gmr-mx.google.com with ESMTP id ir9si3819320pbc.1.2012.07.21.04.20.29; Sat, 21 Jul 2012 04:20:30 -0700 (PDT) Received-SPF: neutral (google.com: 210.54.141.250 is neither permitted nor denied by best guess record for domain of linux@prisktech.co.nz) client-ip=210.54.141.250; Received: from debian6.prisktech.co.nz ([115.188.14.127]) by mta02.xtra.co.nz with ESMTP id <20120721112027.NKME8118.mta02.xtra.co.nz@debian6.prisktech.co.nz>; Sat, 21 Jul 2012 23:20:27 +1200 From: Tony Prisk To: Alessandro Zumoo , Alan Cox Cc: Tony Prisk , Grant Likely , Rob Herring , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, VT8500 mailing list , Greg Kroah-Hartman , linux-serial@vger.kernel.org Subject: [rtc-linux] [PATCHv2 1/2] ARM: vt8500: Minor update to vt8500-rtc for devicetree support Date: Sat, 21 Jul 2012 23:20:21 +1200 Message-Id: <1342869622-11171-1-git-send-email-linux@prisktech.co.nz> X-Mailer: git-send-email 1.7.2.5 X-Original-Sender: linux@prisktech.co.nz X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 210.54.141.250 is neither permitted nor denied by best guess record for domain of linux@prisktech.co.nz) smtp.mail=linux@prisktech.co.nz 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: , Signed-off-by: Tony Prisk Acked-by: Arnd Bergmann --- v2: Split single patch into seperate patches. Correct documentation. .../devicetree/bindings/rtc/vt8500-rtc.txt | 14 ++++++++++++++ drivers/rtc/rtc-vt8500.c | 8 ++++++++ 2 files changed, 22 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/rtc/vt8500-rtc.txt diff --git a/Documentation/devicetree/bindings/rtc/vt8500-rtc.txt b/Documentation/devicetree/bindings/rtc/vt8500-rtc.txt new file mode 100644 index 0000000..c764d4d --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/vt8500-rtc.txt @@ -0,0 +1,14 @@ +* VIA VT8500 and Wondermedia WM8xxx SoC Real-time clock (RTC) Controller + +Required properties: +- compatible : "via,vt8500-rtc" +- reg : Address range of the rtc registers +- interrupt: Should contain the rtc interrupt number + +Example: + + rtc@d8100000 { + compatible = "via,vt8500-rtc"; + reg = <0xd8100000 0x2c>; + interrupts = <48>; + }; diff --git a/drivers/rtc/rtc-vt8500.c b/drivers/rtc/rtc-vt8500.c index 9e94fb1..d21fcd3 100644 --- a/drivers/rtc/rtc-vt8500.c +++ b/drivers/rtc/rtc-vt8500.c @@ -23,6 +23,7 @@ #include #include #include +#include /* * Register definitions @@ -302,12 +303,18 @@ static int __devexit vt8500_rtc_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id vt8500_rtc_ids[] = { + { .compatible = "via,vt8500-rtc", }, + {} +}; + static struct platform_driver vt8500_rtc_driver = { .probe = vt8500_rtc_probe, .remove = __devexit_p(vt8500_rtc_remove), .driver = { .name = "vt8500-rtc", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(vt8500_rtc_ids), }, }; @@ -317,3 +324,4 @@ MODULE_AUTHOR("Alexey Charkov "); MODULE_DESCRIPTION("VIA VT8500 SoC Realtime Clock Driver (RTC)"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:vt8500-rtc"); +MODULE_DEVICE_TABLE(of, vt8500_rtc_ids);