mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-08 14:23:19 +00:00
RTC: add DT bindings to pxa-rtc
This patch adds generic device tree bindings to the PXA RTC driver. Documentation for bindings were also added. Signed-off-by: Daniel Mack <zonque@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Alessandro Zummo <a.zummo@towertech.it> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
This commit is contained in:
parent
0d7614f09c
commit
9020b7cc27
14
Documentation/devicetree/bindings/rtc/pxa-rtc.txt
Normal file
14
Documentation/devicetree/bindings/rtc/pxa-rtc.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
* PXA RTC
|
||||||
|
|
||||||
|
PXA specific RTC driver.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : Should be "marvell,pxa-rtc"
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
rtc@40900000 {
|
||||||
|
compatible = "marvell,pxa-rtc";
|
||||||
|
reg = <0x40900000 0x3c>;
|
||||||
|
interrupts = <30 31>;
|
||||||
|
};
|
@ -27,6 +27,8 @@
|
|||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
#include <linux/of_device.h>
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
|
|
||||||
@ -396,6 +398,14 @@ static int __exit pxa_rtc_remove(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_OF
|
||||||
|
static struct of_device_id pxa_rtc_dt_ids[] = {
|
||||||
|
{ .compatible = "marvell,pxa-rtc" },
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, pxa_rtc_dt_ids);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
static int pxa_rtc_suspend(struct device *dev)
|
static int pxa_rtc_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
@ -425,6 +435,7 @@ static struct platform_driver pxa_rtc_driver = {
|
|||||||
.remove = __exit_p(pxa_rtc_remove),
|
.remove = __exit_p(pxa_rtc_remove),
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "pxa-rtc",
|
.name = "pxa-rtc",
|
||||||
|
.of_match_table = of_match_ptr(pxa_rtc_dt_ids),
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
.pm = &pxa_rtc_pm_ops,
|
.pm = &pxa_rtc_pm_ops,
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user