aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-03-04 12:28:26 -0500
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-07-04 09:50:29 -0400
commitcca8d0596c4c7acb371ea1bc5eee9b404b30516a (patch)
tree95de8f13d8c8634303add8a14a01661995959244 /drivers/clocksource
parent3e29b5543f9250bb358169cff0594f58284ece74 (diff)
clocksource: sh_mtu2: Add DT support
Document DT bindings and parse them in the MTU2 driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/sh_mtu2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
index b0c229f4b4c6..3d88698cf2b8 100644
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -23,6 +23,7 @@
23#include <linux/ioport.h> 23#include <linux/ioport.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/of.h>
26#include <linux/platform_device.h> 27#include <linux/platform_device.h>
27#include <linux/pm_domain.h> 28#include <linux/pm_domain.h>
28#include <linux/pm_runtime.h> 29#include <linux/pm_runtime.h>
@@ -500,11 +501,18 @@ static const struct platform_device_id sh_mtu2_id_table[] = {
500}; 501};
501MODULE_DEVICE_TABLE(platform, sh_mtu2_id_table); 502MODULE_DEVICE_TABLE(platform, sh_mtu2_id_table);
502 503
504static const struct of_device_id sh_mtu2_of_table[] __maybe_unused = {
505 { .compatible = "renesas,mtu2" },
506 { }
507};
508MODULE_DEVICE_TABLE(of, sh_mtu2_of_table);
509
503static struct platform_driver sh_mtu2_device_driver = { 510static struct platform_driver sh_mtu2_device_driver = {
504 .probe = sh_mtu2_probe, 511 .probe = sh_mtu2_probe,
505 .remove = sh_mtu2_remove, 512 .remove = sh_mtu2_remove,
506 .driver = { 513 .driver = {
507 .name = "sh_mtu2", 514 .name = "sh_mtu2",
515 .of_match_table = of_match_ptr(sh_mtu2_of_table),
508 }, 516 },
509 .id_table = sh_mtu2_id_table, 517 .id_table = sh_mtu2_id_table,
510}; 518};