Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308987
b: refs/heads/master
c: 0108c4f
h: refs/heads/master
i:
  308985: 55a1259
  308983: 4d2ecac
v: v3
  • Loading branch information
Viresh Kumar authored and Linus Torvalds committed May 29, 2012
1 parent d68a6c7 commit e79f81b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c20342230ff370c397fc4a9c4c1e7a91964bb66
refs/heads/master: 0108c4ff62a0ee324c58175ff6b7000865023498
17 changes: 17 additions & 0 deletions trunk/Documentation/devicetree/bindings/rtc/spear-rtc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
* SPEAr RTC

Required properties:
- compatible : "st,spear600-rtc"
- reg : Address range of the rtc registers
- interrupt-parent: Should be the phandle for the interrupt controller
that services interrupts for this device
- interrupt: Should contain the rtc interrupt number

Example:

rtc@fc000000 {
compatible = "st,spear600-rtc";
reg = <0xfc000000 0x1000>;
interrupt-parent = <&vic1>;
interrupts = <12>;
};
10 changes: 10 additions & 0 deletions trunk/drivers/rtc/rtc-spear.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/slab.h>
Expand Down Expand Up @@ -519,6 +520,14 @@ static void spear_rtc_shutdown(struct platform_device *pdev)
clk_disable(config->clk);
}

#ifdef CONFIG_OF
static const struct of_device_id spear_rtc_id_table[] = {
{ .compatible = "st,spear600-rtc" },
{}
};
MODULE_DEVICE_TABLE(of, spear_rtc_id_table);
#endif

static struct platform_driver spear_rtc_driver = {
.probe = spear_rtc_probe,
.remove = __devexit_p(spear_rtc_remove),
Expand All @@ -527,6 +536,7 @@ static struct platform_driver spear_rtc_driver = {
.shutdown = spear_rtc_shutdown,
.driver = {
.name = "rtc-spear",
.of_match_table = of_match_ptr(spear_rtc_id_table),
},
};

Expand Down

0 comments on commit e79f81b

Please sign in to comment.