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: 198334 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ea0-f184.google.com (mail-ea0-f184.google.com [209.85.215.184]) (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 27E9D2C0082 for ; Mon, 12 Nov 2012 19:43:01 +1100 (EST) Received: by mail-ea0-f184.google.com with SMTP id 1sf137834eaa.11 for ; Mon, 12 Nov 2012 00:42:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer:x-sa-exim-connect-ip:x-sa-exim-mail-from :x-sa-exim-scanned:x-ptx-original-recipient: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=oCn3mQw862Kv8yQBy4OswXJOHWs7BYnwXCukILo6h6Y=; b=a/McQMcaCmoS7ZF4YfcX5D6fNUJlf9I5lQXHWCj+TZgBCQP3+/7HNTJ4LaMaXCguqN qR69ti7uHYa7OhknE8qJTV3VMFwTFc5eCXGlXeHa7ZM7NBF3TMtDRSPt/XM0s0ptKJDE zgCCzSjp44KHFoGADrZbbdPGzzLGOeXuDBacCRn5GXWhrojPR0AuEQyFhXhKuGoSpXCs x7z7FWmhaECvYjtBkQH0/DuWOPFuJ5svf9P14cAFPqaisdExM/nQIZoxyvsq3xNjb6x8 9bXfsB+IynBt/VIMHhSIGs7oA2uSvqThyYP5AkiZN1RhLGl06Pc4SrJOhkSJ4rdhGZBU zg8A== Received: by 10.216.228.26 with SMTP id e26mr642895weq.24.1352709776903; Mon, 12 Nov 2012 00:42:56 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.14.198.201 with SMTP id v49ls4052411een.0.gmail; Mon, 12 Nov 2012 00:42:56 -0800 (PST) Received: by 10.14.216.197 with SMTP id g45mr19165683eep.3.1352709776311; Mon, 12 Nov 2012 00:42:56 -0800 (PST) Received: by 10.14.216.197 with SMTP id g45mr19165682eep.3.1352709776301; Mon, 12 Nov 2012 00:42:56 -0800 (PST) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de. [2001:6f8:1178:4:290:27ff:fe1d:cc33]) by gmr-mx.google.com with ESMTPS id z47si1521343eel.0.2012.11.12.00.42.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Nov 2012 00:42:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of sha@pengutronix.de designates 2001:6f8:1178:4:290:27ff:fe1d:cc33 as permitted sender) client-ip=2001:6f8:1178:4:290:27ff:fe1d:cc33; 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 Cc: Alessandro Zummo , kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, Shawn Guo , Andrew Morton , Sascha Hauer Subject: [rtc-linux] [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: rtc-linux@googlegroups.com X-Original-Sender: s.hauer@pengutronix.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of sha@pengutronix.de designates 2001:6f8:1178:4:290:27ff:fe1d:cc33 as permitted sender) smtp.mail=sha@pengutronix.de 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: , 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), };