From patchwork Mon Nov 12 08:42:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 1726771 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 76FFD3FCAE for ; Mon, 12 Nov 2012 08:44:54 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TXpbh-0002wm-9n; Mon, 12 Nov 2012 08:43:01 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TXpbd-0002w8-Nc for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2012 08:42:58 +0000 Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1TXpbZ-0000bE-8k; Mon, 12 Nov 2012 09:42:53 +0100 Received: from sha by dude.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1TXpbX-00025a-T9; Mon, 12 Nov 2012 09:42:51 +0100 From: Sascha Hauer To: rtc-linux@googlegroups.com Subject: [PATCH resend] rtc: i.MX dryice: Add devicetree support Date: Mon, 12 Nov 2012 09:42:50 +0100 Message-Id: <1352709770-5919-1-git-send-email-s.hauer@pengutronix.de> X-Mailer: git-send-email 1.7.10.4 X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121112_034258_030903_48595531 X-CRM114-Status: GOOD ( 18.45 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Alessandro Zummo , Sascha Hauer , kernel@pengutronix.de, Andrew Morton , Shawn Guo , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add devicetree probing, fixing some whitespace damage along the way. Signed-off-by: Sascha Hauer Reviewed-by: Shawn Guo --- Just a resend with Andrew Morton on Cc since I got no reaction from the RTC Maintainer. Documentation/devicetree/bindings/rtc/imx-di.txt | 19 +++++++++++++++++++ drivers/rtc/rtc-imxdi.c | 12 +++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/rtc/imx-di.txt diff --git a/Documentation/devicetree/bindings/rtc/imx-di.txt b/Documentation/devicetree/bindings/rtc/imx-di.txt new file mode 100644 index 0000000..42b92b5 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/imx-di.txt @@ -0,0 +1,19 @@ +* i.MX25 dryice Real Time Clock controller + +This RTC is part of the i.MX25 dryice module. Documentation for this +unit is not publically available. This binding only makes use of the +RTC. + +Required properties: +- compatible: should be "fsl,imx25-rtc" +- reg: physical base address of the controller and length of memory mapped + region. +- interrupts: interrupt source for the dryice module + +Example: + + dryice@53ffc000 { + compatible = "fsl,imx25-dryice", "fsl,imx25-rtc"; + reg = <0x53ffc000 0x4000>; + interrupts = <25>; + }; diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c index 891cd6c..b2fe920 100644 --- a/drivers/rtc/rtc-imxdi.c +++ b/drivers/rtc/rtc-imxdi.c @@ -493,11 +493,17 @@ static int __devexit dryice_rtc_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id of_dryice_rtc_match[] = { + { .compatible = "fsl,imx25-rtc", }, + { }, +}; + static struct platform_driver dryice_rtc_driver = { .driver = { - .name = "imxdi_rtc", - .owner = THIS_MODULE, - }, + .name = "imxdi_rtc", + .owner = THIS_MODULE, + .of_match_table = of_dryice_rtc_match, + }, .remove = __devexit_p(dryice_rtc_remove), };