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

rtc: stmp3xxx: Add simple binding for the stmp3xxx-rtc

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: rtc-linux@googlegroups.com
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

authored by

Marek Vasut and committed by
Shawn Guo
dd8d20a3 e1d4f23e

+24
+16
Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
··· 1 + * STMP3xxx/i.MX28 Time Clock controller 2 + 3 + Required properties: 4 + - compatible: should be one of the following. 5 + * "fsl,stmp3xxx-rtc" 6 + - reg: physical base address of the controller and length of memory mapped 7 + region. 8 + - interrupts: rtc alarm interrupt 9 + 10 + Example: 11 + 12 + rtc@80056000 { 13 + compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc"; 14 + reg = <0x80056000 2000>; 15 + interrupts = <29>; 16 + };
+8
drivers/rtc/rtc-stmp3xxx.c
··· 25 25 #include <linux/interrupt.h> 26 26 #include <linux/rtc.h> 27 27 #include <linux/slab.h> 28 + #include <linux/of_device.h> 28 29 29 30 #include <mach/common.h> 30 31 ··· 266 265 #define stmp3xxx_rtc_resume NULL 267 266 #endif 268 267 268 + static const struct of_device_id rtc_dt_ids[] = { 269 + { .compatible = "fsl,stmp3xxx-rtc", }, 270 + { /* sentinel */ } 271 + }; 272 + MODULE_DEVICE_TABLE(of, rtc_dt_ids); 273 + 269 274 static struct platform_driver stmp3xxx_rtcdrv = { 270 275 .probe = stmp3xxx_rtc_probe, 271 276 .remove = stmp3xxx_rtc_remove, ··· 280 273 .driver = { 281 274 .name = "stmp3xxx-rtc", 282 275 .owner = THIS_MODULE, 276 + .of_match_table = rtc_dt_ids, 283 277 }, 284 278 }; 285 279