aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorNick Bowler <nbowler@elliptictech.com>2012-07-30 17:41:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 20:25:19 -0400
commit8dccaf0607b3e047680952d0baf4da0486fbbcc1 (patch)
tree54761d376b0f00d52dd0d078e7fef71ef2697741 /drivers/rtc
parent0a25bf40d8ea9aeb8412666a7bc8ab95b4cddcb1 (diff)
drivers/rtc/rtc-pcf8563.c: add device tree support
Set the of_match_table for this driver so that devices can be described in the device tree. Signed-off-by: Nick Bowler <nbowler@elliptictech.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-pcf8563.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 24a9d6a9c72d..c2fe426a6ef2 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -19,6 +19,7 @@
19#include <linux/rtc.h> 19#include <linux/rtc.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/of.h>
22 23
23#define DRV_VERSION "0.4.3" 24#define DRV_VERSION "0.4.3"
24 25
@@ -285,10 +286,19 @@ static const struct i2c_device_id pcf8563_id[] = {
285}; 286};
286MODULE_DEVICE_TABLE(i2c, pcf8563_id); 287MODULE_DEVICE_TABLE(i2c, pcf8563_id);
287 288
289#ifdef CONFIG_OF
290static const struct of_device_id pcf8563_of_match[] __devinitconst = {
291 { .compatible = "nxp,pcf8563" },
292 {}
293};
294MODULE_DEVICE_TABLE(of, pcf8563_of_match);
295#endif
296
288static struct i2c_driver pcf8563_driver = { 297static struct i2c_driver pcf8563_driver = {
289 .driver = { 298 .driver = {
290 .name = "rtc-pcf8563", 299 .name = "rtc-pcf8563",
291 .owner = THIS_MODULE, 300 .owner = THIS_MODULE,
301 .of_match_table = of_match_ptr(pcf8563_of_match),
292 }, 302 },
293 .probe = pcf8563_probe, 303 .probe = pcf8563_probe,
294 .remove = pcf8563_remove, 304 .remove = pcf8563_remove,