GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 1 | /* |
Guan Xuetao | 2809e80 | 2011-05-26 16:43:27 +0800 | [diff] [blame] | 2 | * RTC driver code specific to PKUnity SoC and UniCore ISA |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 3 | * |
| 4 | * Maintained by GUAN Xue-tao <gxt@mprc.pku.edu.cn> |
| 5 | * Copyright (C) 2001-2010 Guan Xuetao |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | */ |
| 11 | |
| 12 | #include <linux/module.h> |
| 13 | #include <linux/fs.h> |
| 14 | #include <linux/string.h> |
| 15 | #include <linux/init.h> |
| 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/interrupt.h> |
| 18 | #include <linux/rtc.h> |
| 19 | #include <linux/bcd.h> |
| 20 | #include <linux/clk.h> |
| 21 | #include <linux/log2.h> |
| 22 | #include <linux/slab.h> |
| 23 | #include <linux/uaccess.h> |
| 24 | #include <linux/io.h> |
| 25 | |
| 26 | #include <asm/irq.h> |
| 27 | #include <mach/hardware.h> |
| 28 | |
| 29 | static struct resource *puv3_rtc_mem; |
| 30 | |
| 31 | static int puv3_rtc_alarmno = IRQ_RTCAlarm; |
| 32 | static int puv3_rtc_tickno = IRQ_RTC; |
| 33 | |
| 34 | static DEFINE_SPINLOCK(puv3_rtc_pie_lock); |
| 35 | |
| 36 | /* IRQ Handlers */ |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 37 | static irqreturn_t puv3_rtc_alarmirq(int irq, void *id) |
| 38 | { |
| 39 | struct rtc_device *rdev = id; |
| 40 | |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 41 | writel(readl(RTC_RTSR) | RTC_RTSR_AL, RTC_RTSR); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 42 | rtc_update_irq(rdev, 1, RTC_AF | RTC_IRQF); |
| 43 | return IRQ_HANDLED; |
| 44 | } |
| 45 | |
| 46 | static irqreturn_t puv3_rtc_tickirq(int irq, void *id) |
| 47 | { |
| 48 | struct rtc_device *rdev = id; |
| 49 | |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 50 | writel(readl(RTC_RTSR) | RTC_RTSR_HZ, RTC_RTSR); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 51 | rtc_update_irq(rdev, 1, RTC_PF | RTC_IRQF); |
| 52 | return IRQ_HANDLED; |
| 53 | } |
| 54 | |
| 55 | /* Update control registers */ |
Sangjung Woo | 1fbc4c4 | 2013-11-12 15:11:00 -0800 | [diff] [blame] | 56 | static void puv3_rtc_setaie(struct device *dev, int to) |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 57 | { |
| 58 | unsigned int tmp; |
| 59 | |
Sangjung Woo | 1fbc4c4 | 2013-11-12 15:11:00 -0800 | [diff] [blame] | 60 | dev_dbg(dev, "%s: aie=%d\n", __func__, to); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 61 | |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 62 | tmp = readl(RTC_RTSR) & ~RTC_RTSR_ALE; |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 63 | |
| 64 | if (to) |
| 65 | tmp |= RTC_RTSR_ALE; |
| 66 | |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 67 | writel(tmp, RTC_RTSR); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | static int puv3_rtc_setpie(struct device *dev, int enabled) |
| 71 | { |
| 72 | unsigned int tmp; |
| 73 | |
Chen Gang | c863810 | 2014-05-03 13:07:57 +0800 | [diff] [blame] | 74 | dev_dbg(dev, "%s: pie=%d\n", __func__, enabled); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 75 | |
| 76 | spin_lock_irq(&puv3_rtc_pie_lock); |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 77 | tmp = readl(RTC_RTSR) & ~RTC_RTSR_HZE; |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 78 | |
| 79 | if (enabled) |
| 80 | tmp |= RTC_RTSR_HZE; |
| 81 | |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 82 | writel(tmp, RTC_RTSR); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 83 | spin_unlock_irq(&puv3_rtc_pie_lock); |
| 84 | |
| 85 | return 0; |
| 86 | } |
| 87 | |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 88 | /* Time read/write */ |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 89 | static int puv3_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) |
| 90 | { |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 91 | rtc_time_to_tm(readl(RTC_RCNR), rtc_tm); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 92 | |
Sangjung Woo | 1fbc4c4 | 2013-11-12 15:11:00 -0800 | [diff] [blame] | 93 | dev_dbg(dev, "read time %02x.%02x.%02x %02x/%02x/%02x\n", |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 94 | rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday, |
| 95 | rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); |
| 96 | |
| 97 | return 0; |
| 98 | } |
| 99 | |
| 100 | static int puv3_rtc_settime(struct device *dev, struct rtc_time *tm) |
| 101 | { |
| 102 | unsigned long rtc_count = 0; |
| 103 | |
Sangjung Woo | 1fbc4c4 | 2013-11-12 15:11:00 -0800 | [diff] [blame] | 104 | dev_dbg(dev, "set time %02d.%02d.%02d %02d/%02d/%02d\n", |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 105 | tm->tm_year, tm->tm_mon, tm->tm_mday, |
| 106 | tm->tm_hour, tm->tm_min, tm->tm_sec); |
| 107 | |
| 108 | rtc_tm_to_time(tm, &rtc_count); |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 109 | writel(rtc_count, RTC_RCNR); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 110 | |
| 111 | return 0; |
| 112 | } |
| 113 | |
| 114 | static int puv3_rtc_getalarm(struct device *dev, struct rtc_wkalrm *alrm) |
| 115 | { |
| 116 | struct rtc_time *alm_tm = &alrm->time; |
| 117 | |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 118 | rtc_time_to_tm(readl(RTC_RTAR), alm_tm); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 119 | |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 120 | alrm->enabled = readl(RTC_RTSR) & RTC_RTSR_ALE; |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 121 | |
Sangjung Woo | 1fbc4c4 | 2013-11-12 15:11:00 -0800 | [diff] [blame] | 122 | dev_dbg(dev, "read alarm %02x %02x.%02x.%02x %02x/%02x/%02x\n", |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 123 | alrm->enabled, |
| 124 | alm_tm->tm_year, alm_tm->tm_mon, alm_tm->tm_mday, |
| 125 | alm_tm->tm_hour, alm_tm->tm_min, alm_tm->tm_sec); |
| 126 | |
| 127 | return 0; |
| 128 | } |
| 129 | |
| 130 | static int puv3_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) |
| 131 | { |
| 132 | struct rtc_time *tm = &alrm->time; |
| 133 | unsigned long rtcalarm_count = 0; |
| 134 | |
Sangjung Woo | 1fbc4c4 | 2013-11-12 15:11:00 -0800 | [diff] [blame] | 135 | dev_dbg(dev, "puv3_rtc_setalarm: %d, %02x/%02x/%02x %02x.%02x.%02x\n", |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 136 | alrm->enabled, |
| 137 | tm->tm_mday & 0xff, tm->tm_mon & 0xff, tm->tm_year & 0xff, |
| 138 | tm->tm_hour & 0xff, tm->tm_min & 0xff, tm->tm_sec); |
| 139 | |
| 140 | rtc_tm_to_time(tm, &rtcalarm_count); |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 141 | writel(rtcalarm_count, RTC_RTAR); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 142 | |
Chen Gang | 73fa540 | 2014-05-03 13:09:02 +0800 | [diff] [blame] | 143 | puv3_rtc_setaie(dev, alrm->enabled); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 144 | |
| 145 | if (alrm->enabled) |
| 146 | enable_irq_wake(puv3_rtc_alarmno); |
| 147 | else |
| 148 | disable_irq_wake(puv3_rtc_alarmno); |
| 149 | |
| 150 | return 0; |
| 151 | } |
| 152 | |
| 153 | static int puv3_rtc_proc(struct device *dev, struct seq_file *seq) |
| 154 | { |
| 155 | seq_printf(seq, "periodic_IRQ\t: %s\n", |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 156 | (readl(RTC_RTSR) & RTC_RTSR_HZE) ? "yes" : "no"); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 157 | return 0; |
| 158 | } |
| 159 | |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 160 | static const struct rtc_class_ops puv3_rtcops = { |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 161 | .read_time = puv3_rtc_gettime, |
| 162 | .set_time = puv3_rtc_settime, |
| 163 | .read_alarm = puv3_rtc_getalarm, |
| 164 | .set_alarm = puv3_rtc_setalarm, |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 165 | .proc = puv3_rtc_proc, |
| 166 | }; |
| 167 | |
Jingoo Han | 5936fdb | 2013-04-29 16:21:02 -0700 | [diff] [blame] | 168 | static void puv3_rtc_enable(struct device *dev, int en) |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 169 | { |
| 170 | if (!en) { |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 171 | writel(readl(RTC_RTSR) & ~RTC_RTSR_HZE, RTC_RTSR); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 172 | } else { |
| 173 | /* re-enable the device, and check it is ok */ |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 174 | if ((readl(RTC_RTSR) & RTC_RTSR_HZE) == 0) { |
Jingoo Han | 5936fdb | 2013-04-29 16:21:02 -0700 | [diff] [blame] | 175 | dev_info(dev, "rtc disabled, re-enabling\n"); |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 176 | writel(readl(RTC_RTSR) | RTC_RTSR_HZE, RTC_RTSR); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 177 | } |
| 178 | } |
| 179 | } |
| 180 | |
Greg Kroah-Hartman | 5a167f4 | 2012-12-21 13:09:38 -0800 | [diff] [blame] | 181 | static int puv3_rtc_remove(struct platform_device *dev) |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 182 | { |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 183 | puv3_rtc_setpie(&dev->dev, 0); |
Sangjung Woo | 1fbc4c4 | 2013-11-12 15:11:00 -0800 | [diff] [blame] | 184 | puv3_rtc_setaie(&dev->dev, 0); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 185 | |
| 186 | release_resource(puv3_rtc_mem); |
| 187 | kfree(puv3_rtc_mem); |
| 188 | |
| 189 | return 0; |
| 190 | } |
| 191 | |
Greg Kroah-Hartman | 5a167f4 | 2012-12-21 13:09:38 -0800 | [diff] [blame] | 192 | static int puv3_rtc_probe(struct platform_device *pdev) |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 193 | { |
| 194 | struct rtc_device *rtc; |
| 195 | struct resource *res; |
| 196 | int ret; |
| 197 | |
Sangjung Woo | 1fbc4c4 | 2013-11-12 15:11:00 -0800 | [diff] [blame] | 198 | dev_dbg(&pdev->dev, "%s: probe=%p\n", __func__, pdev); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 199 | |
| 200 | /* find the IRQs */ |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 201 | puv3_rtc_tickno = platform_get_irq(pdev, 1); |
| 202 | if (puv3_rtc_tickno < 0) { |
| 203 | dev_err(&pdev->dev, "no irq for rtc tick\n"); |
| 204 | return -ENOENT; |
| 205 | } |
| 206 | |
| 207 | puv3_rtc_alarmno = platform_get_irq(pdev, 0); |
| 208 | if (puv3_rtc_alarmno < 0) { |
| 209 | dev_err(&pdev->dev, "no irq for alarm\n"); |
| 210 | return -ENOENT; |
| 211 | } |
| 212 | |
Sangjung Woo | 1fbc4c4 | 2013-11-12 15:11:00 -0800 | [diff] [blame] | 213 | dev_dbg(&pdev->dev, "PKUnity_rtc: tick irq %d, alarm irq %d\n", |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 214 | puv3_rtc_tickno, puv3_rtc_alarmno); |
| 215 | |
Alexandre Belloni | 5539ba5 | 2017-08-22 11:48:41 +0200 | [diff] [blame] | 216 | rtc = devm_rtc_allocate_device(&pdev->dev); |
| 217 | if (IS_ERR(rtc)) |
| 218 | return PTR_ERR(rtc); |
| 219 | |
Alexandre Belloni | 60d3455 | 2017-08-22 11:59:07 +0200 | [diff] [blame] | 220 | ret = devm_request_irq(&pdev->dev, puv3_rtc_alarmno, puv3_rtc_alarmirq, |
| 221 | 0, "pkunity-rtc alarm", rtc); |
| 222 | if (ret) { |
| 223 | dev_err(&pdev->dev, "IRQ%d error %d\n", puv3_rtc_alarmno, ret); |
| 224 | return ret; |
| 225 | } |
| 226 | |
| 227 | ret = devm_request_irq(&pdev->dev, puv3_rtc_tickno, puv3_rtc_tickirq, |
| 228 | 0, "pkunity-rtc tick", rtc); |
| 229 | if (ret) { |
| 230 | dev_err(&pdev->dev, "IRQ%d error %d\n", puv3_rtc_tickno, ret); |
| 231 | return ret; |
| 232 | } |
| 233 | |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 234 | /* get the memory region */ |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 235 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 236 | if (res == NULL) { |
| 237 | dev_err(&pdev->dev, "failed to get memory region resource\n"); |
| 238 | return -ENOENT; |
| 239 | } |
| 240 | |
Joe Perches | 28f65c11 | 2011-06-09 09:13:32 -0700 | [diff] [blame] | 241 | puv3_rtc_mem = request_mem_region(res->start, resource_size(res), |
| 242 | pdev->name); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 243 | |
| 244 | if (puv3_rtc_mem == NULL) { |
| 245 | dev_err(&pdev->dev, "failed to reserve memory region\n"); |
| 246 | ret = -ENOENT; |
| 247 | goto err_nores; |
| 248 | } |
| 249 | |
Jingoo Han | 5936fdb | 2013-04-29 16:21:02 -0700 | [diff] [blame] | 250 | puv3_rtc_enable(&pdev->dev, 1); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 251 | |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 252 | /* register RTC and exit */ |
Alexandre Belloni | 5539ba5 | 2017-08-22 11:48:41 +0200 | [diff] [blame] | 253 | rtc->ops = &puv3_rtcops; |
| 254 | ret = rtc_register_device(rtc); |
| 255 | if (ret) { |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 256 | dev_err(&pdev->dev, "cannot attach rtc\n"); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 257 | goto err_nortc; |
| 258 | } |
| 259 | |
| 260 | /* platform setup code should have handled this; sigh */ |
| 261 | if (!device_can_wakeup(&pdev->dev)) |
| 262 | device_init_wakeup(&pdev->dev, 1); |
| 263 | |
| 264 | platform_set_drvdata(pdev, rtc); |
| 265 | return 0; |
| 266 | |
| 267 | err_nortc: |
Jingoo Han | 5936fdb | 2013-04-29 16:21:02 -0700 | [diff] [blame] | 268 | puv3_rtc_enable(&pdev->dev, 0); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 269 | release_resource(puv3_rtc_mem); |
| 270 | |
| 271 | err_nores: |
| 272 | return ret; |
| 273 | } |
| 274 | |
Jingoo Han | 5936fdb | 2013-04-29 16:21:02 -0700 | [diff] [blame] | 275 | #ifdef CONFIG_PM_SLEEP |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 276 | static int ticnt_save; |
| 277 | |
Jingoo Han | 5936fdb | 2013-04-29 16:21:02 -0700 | [diff] [blame] | 278 | static int puv3_rtc_suspend(struct device *dev) |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 279 | { |
| 280 | /* save RTAR for anyone using periodic interrupts */ |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 281 | ticnt_save = readl(RTC_RTAR); |
Jingoo Han | 5936fdb | 2013-04-29 16:21:02 -0700 | [diff] [blame] | 282 | puv3_rtc_enable(dev, 0); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 283 | return 0; |
| 284 | } |
| 285 | |
Jingoo Han | 5936fdb | 2013-04-29 16:21:02 -0700 | [diff] [blame] | 286 | static int puv3_rtc_resume(struct device *dev) |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 287 | { |
Jingoo Han | 5936fdb | 2013-04-29 16:21:02 -0700 | [diff] [blame] | 288 | puv3_rtc_enable(dev, 1); |
GuanXuetao | e5abf78 | 2011-02-26 21:21:18 +0800 | [diff] [blame] | 289 | writel(ticnt_save, RTC_RTAR); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 290 | return 0; |
| 291 | } |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 292 | #endif |
| 293 | |
Jingoo Han | 5936fdb | 2013-04-29 16:21:02 -0700 | [diff] [blame] | 294 | static SIMPLE_DEV_PM_OPS(puv3_rtc_pm_ops, puv3_rtc_suspend, puv3_rtc_resume); |
| 295 | |
Guan Xuetao | b3a0aa3 | 2011-12-28 09:24:29 +0800 | [diff] [blame] | 296 | static struct platform_driver puv3_rtc_driver = { |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 297 | .probe = puv3_rtc_probe, |
Greg Kroah-Hartman | 5a167f4 | 2012-12-21 13:09:38 -0800 | [diff] [blame] | 298 | .remove = puv3_rtc_remove, |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 299 | .driver = { |
| 300 | .name = "PKUnity-v3-RTC", |
Jingoo Han | 5936fdb | 2013-04-29 16:21:02 -0700 | [diff] [blame] | 301 | .pm = &puv3_rtc_pm_ops, |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 302 | } |
| 303 | }; |
| 304 | |
Guan Xuetao | b3a0aa3 | 2011-12-28 09:24:29 +0800 | [diff] [blame] | 305 | module_platform_driver(puv3_rtc_driver); |
GuanXuetao | 02b2ee1 | 2011-01-15 18:19:03 +0800 | [diff] [blame] | 306 | |
| 307 | MODULE_DESCRIPTION("RTC Driver for the PKUnity v3 chip"); |
| 308 | MODULE_AUTHOR("Hu Dongliang"); |
| 309 | MODULE_LICENSE("GPL v2"); |