summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-stmp3xxx.c
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-06-26 16:29:27 +0800
committerShawn Guo <shawn.guo@linaro.org>2012-07-03 13:22:36 +0800
commitdd8d20a3f32a7ba37526f5b4dfd4d35a93e5342f (patch)
tree03975eb19e0629c7e5eb1af83fe8d32a4818769b /drivers/rtc/rtc-stmp3xxx.c
parente1d4f23ec0688f58b7d60265f38e1cbe8c3a4432 (diff)
downloadop-kernel-dev-dd8d20a3f32a7ba37526f5b4dfd4d35a93e5342f.zip
op-kernel-dev-dd8d20a3f32a7ba37526f5b4dfd4d35a93e5342f.tar.gz
rtc: stmp3xxx: Add simple binding for the stmp3xxx-rtc
Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: devicetree-discuss@lists.ozlabs.org Cc: Grant Likely <grant.likely@secretlab.ca> Cc: rtc-linux@googlegroups.com Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'drivers/rtc/rtc-stmp3xxx.c')
-rw-r--r--drivers/rtc/rtc-stmp3xxx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-stmp3xxx.c b/drivers/rtc/rtc-stmp3xxx.c
index 1028786..739ef556 100644
--- a/drivers/rtc/rtc-stmp3xxx.c
+++ b/drivers/rtc/rtc-stmp3xxx.c
@@ -25,6 +25,7 @@
#include <linux/interrupt.h>
#include <linux/rtc.h>
#include <linux/slab.h>
+#include <linux/of_device.h>
#include <mach/common.h>
@@ -265,6 +266,12 @@ static int stmp3xxx_rtc_resume(struct platform_device *dev)
#define stmp3xxx_rtc_resume NULL
#endif
+static const struct of_device_id rtc_dt_ids[] = {
+ { .compatible = "fsl,stmp3xxx-rtc", },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, rtc_dt_ids);
+
static struct platform_driver stmp3xxx_rtcdrv = {
.probe = stmp3xxx_rtc_probe,
.remove = stmp3xxx_rtc_remove,
@@ -273,6 +280,7 @@ static struct platform_driver stmp3xxx_rtcdrv = {
.driver = {
.name = "stmp3xxx-rtc",
.owner = THIS_MODULE,
+ .of_match_table = rtc_dt_ids,
},
};
OpenPOWER on IntegriCloud