diff options
-rw-r--r-- | Documentation/devicetree/bindings/rtc/twl-rtc.txt | 12 | ||||
-rw-r--r-- | drivers/rtc/rtc-twl.c | 10 |
2 files changed, 20 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/rtc/twl-rtc.txt b/Documentation/devicetree/bindings/rtc/twl-rtc.txt new file mode 100644 index 000000000000..596e0c97be7a --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/twl-rtc.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | * TI twl RTC | ||
2 | |||
3 | The TWL family (twl4030/6030) contains a RTC. | ||
4 | |||
5 | Required properties: | ||
6 | - compatible : Should be twl4030-rtc | ||
7 | |||
8 | Examples: | ||
9 | |||
10 | rtc@0 { | ||
11 | compatible = "ti,twl4030-rtc"; | ||
12 | }; | ||
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index 20687d55e7a7..d43b4f6eb4e4 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c | |||
@@ -550,6 +550,11 @@ static int twl_rtc_resume(struct platform_device *pdev) | |||
550 | #define twl_rtc_resume NULL | 550 | #define twl_rtc_resume NULL |
551 | #endif | 551 | #endif |
552 | 552 | ||
553 | static const struct of_device_id twl_rtc_of_match[] = { | ||
554 | {.compatible = "ti,twl4030-rtc", }, | ||
555 | { }, | ||
556 | }; | ||
557 | MODULE_DEVICE_TABLE(of, twl_rtc_of_match); | ||
553 | MODULE_ALIAS("platform:twl_rtc"); | 558 | MODULE_ALIAS("platform:twl_rtc"); |
554 | 559 | ||
555 | static struct platform_driver twl4030rtc_driver = { | 560 | static struct platform_driver twl4030rtc_driver = { |
@@ -559,8 +564,9 @@ static struct platform_driver twl4030rtc_driver = { | |||
559 | .suspend = twl_rtc_suspend, | 564 | .suspend = twl_rtc_suspend, |
560 | .resume = twl_rtc_resume, | 565 | .resume = twl_rtc_resume, |
561 | .driver = { | 566 | .driver = { |
562 | .owner = THIS_MODULE, | 567 | .owner = THIS_MODULE, |
563 | .name = "twl_rtc", | 568 | .name = "twl_rtc", |
569 | .of_match_table = twl_rtc_of_match, | ||
564 | }, | 570 | }, |
565 | }; | 571 | }; |
566 | 572 | ||