linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Prisk <linux@prisktech.co.nz>
To: Alessandro Zumoo <a.zummo@towertech.it>, Alan Cox <alan@linux.intel.com>
Cc: Tony Prisk <linux@prisktech.co.nz>,
	Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <rob.herring@calxeda.com>,
	rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org,
	VT8500 mailing list 
	<vt8500-wm8505-linux-kernel@googlegroups.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-serial@vger.kernel.org
Subject: [PATCHv2 1/2] ARM: vt8500: Minor update to vt8500-rtc for devicetree support
Date: Sat, 21 Jul 2012 23:20:21 +1200	[thread overview]
Message-ID: <1342869622-11171-1-git-send-email-linux@prisktech.co.nz> (raw)

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
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 <linux/bcd.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/of.h>
 
 /*
  * 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 <alchark@gmail.com>");
 MODULE_DESCRIPTION("VIA VT8500 SoC Realtime Clock Driver (RTC)");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:vt8500-rtc");
+MODULE_DEVICE_TABLE(of, vt8500_rtc_ids);
-- 
1.7.2.5


             reply	other threads:[~2012-07-21 11:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-21 11:20 Tony Prisk [this message]
2012-07-21 11:20 ` [PATCH 2/2] ARM: vt8500: Minor update to vt8500-uart for devicetree support Tony Prisk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342869622-11171-1-git-send-email-linux@prisktech.co.nz \
    --to=linux@prisktech.co.nz \
    --cc=a.zummo@towertech.it \
    --cc=alan@linux.intel.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=rtc-linux@googlegroups.com \
    --cc=vt8500-wm8505-linux-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).