rtc-lpc32xx.c (e644dae645e167d154c0526358940986682a72b0) | rtc-lpc32xx.c (e862e7c4ee52c2d1a0af37a8c3a2bda079042b06) |
---|---|
1/* 2 * Copyright (C) 2010 NXP Semiconductors 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * --- 5 unchanged lines hidden (view full) --- 14#include <linux/kernel.h> 15#include <linux/module.h> 16#include <linux/init.h> 17#include <linux/platform_device.h> 18#include <linux/spinlock.h> 19#include <linux/rtc.h> 20#include <linux/slab.h> 21#include <linux/io.h> | 1/* 2 * Copyright (C) 2010 NXP Semiconductors 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * --- 5 unchanged lines hidden (view full) --- 14#include <linux/kernel.h> 15#include <linux/module.h> 16#include <linux/init.h> 17#include <linux/platform_device.h> 18#include <linux/spinlock.h> 19#include <linux/rtc.h> 20#include <linux/slab.h> 21#include <linux/io.h> |
22#include <linux/of.h> |
|
22 23/* 24 * Clock and Power control register offsets 25 */ 26#define LPC32XX_RTC_UCOUNT 0x00 27#define LPC32XX_RTC_DCOUNT 0x04 28#define LPC32XX_RTC_MATCH0 0x08 29#define LPC32XX_RTC_MATCH1 0x0C --- 351 unchanged lines hidden (view full) --- 381 .restore = lpc32xx_rtc_resume 382}; 383 384#define LPC32XX_RTC_PM_OPS (&lpc32xx_rtc_pm_ops) 385#else 386#define LPC32XX_RTC_PM_OPS NULL 387#endif 388 | 23 24/* 25 * Clock and Power control register offsets 26 */ 27#define LPC32XX_RTC_UCOUNT 0x00 28#define LPC32XX_RTC_DCOUNT 0x04 29#define LPC32XX_RTC_MATCH0 0x08 30#define LPC32XX_RTC_MATCH1 0x0C --- 351 unchanged lines hidden (view full) --- 382 .restore = lpc32xx_rtc_resume 383}; 384 385#define LPC32XX_RTC_PM_OPS (&lpc32xx_rtc_pm_ops) 386#else 387#define LPC32XX_RTC_PM_OPS NULL 388#endif 389 |
390#ifdef CONFIG_OF 391static const struct of_device_id lpc32xx_rtc_match[] = { 392 { .compatible = "nxp,lpc3220-rtc" }, 393 { } 394}; 395MODULE_DEVICE_TABLE(of, lpc32xx_rtc_match); 396#endif 397 |
|
389static struct platform_driver lpc32xx_rtc_driver = { 390 .probe = lpc32xx_rtc_probe, 391 .remove = __devexit_p(lpc32xx_rtc_remove), 392 .driver = { 393 .name = RTC_NAME, 394 .owner = THIS_MODULE, | 398static struct platform_driver lpc32xx_rtc_driver = { 399 .probe = lpc32xx_rtc_probe, 400 .remove = __devexit_p(lpc32xx_rtc_remove), 401 .driver = { 402 .name = RTC_NAME, 403 .owner = THIS_MODULE, |
395 .pm = LPC32XX_RTC_PM_OPS | 404 .pm = LPC32XX_RTC_PM_OPS, 405 .of_match_table = of_match_ptr(lpc32xx_rtc_match), |
396 }, 397}; 398 399module_platform_driver(lpc32xx_rtc_driver); 400 401MODULE_AUTHOR("Kevin Wells <wellsk40@gmail.com"); 402MODULE_DESCRIPTION("RTC driver for the LPC32xx SoC"); 403MODULE_LICENSE("GPL"); 404MODULE_ALIAS("platform:rtc-lpc32xx"); | 406 }, 407}; 408 409module_platform_driver(lpc32xx_rtc_driver); 410 411MODULE_AUTHOR("Kevin Wells <wellsk40@gmail.com"); 412MODULE_DESCRIPTION("RTC driver for the LPC32xx SoC"); 413MODULE_LICENSE("GPL"); 414MODULE_ALIAS("platform:rtc-lpc32xx"); |