Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Daniel Mack and committed by
Haojian Zhuang
9020b7cc 0d7614f0

+25
+14
Documentation/devicetree/bindings/rtc/pxa-rtc.txt
··· 1 + * PXA RTC 2 + 3 + PXA specific RTC driver. 4 + 5 + Required properties: 6 + - compatible : Should be "marvell,pxa-rtc" 7 + 8 + Examples: 9 + 10 + rtc@40900000 { 11 + compatible = "marvell,pxa-rtc"; 12 + reg = <0x40900000 0x3c>; 13 + interrupts = <30 31>; 14 + };
+11
drivers/rtc/rtc-pxa.c
··· 27 27 #include <linux/interrupt.h> 28 28 #include <linux/io.h> 29 29 #include <linux/slab.h> 30 + #include <linux/of.h> 31 + #include <linux/of_device.h> 30 32 31 33 #include <mach/hardware.h> 32 34 ··· 398 396 return 0; 399 397 } 400 398 399 + #ifdef CONFIG_OF 400 + static struct of_device_id pxa_rtc_dt_ids[] = { 401 + { .compatible = "marvell,pxa-rtc" }, 402 + {} 403 + }; 404 + MODULE_DEVICE_TABLE(of, pxa_rtc_dt_ids); 405 + #endif 406 + 401 407 #ifdef CONFIG_PM 402 408 static int pxa_rtc_suspend(struct device *dev) 403 409 { ··· 435 425 .remove = __exit_p(pxa_rtc_remove), 436 426 .driver = { 437 427 .name = "pxa-rtc", 428 + .of_match_table = of_match_ptr(pxa_rtc_dt_ids), 438 429 #ifdef CONFIG_PM 439 430 .pm = &pxa_rtc_pm_ops, 440 431 #endif