diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-twl.c | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index 6119712cc8de..7cea920ff6ac 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * rtc-twl4030.c -- TWL4030 Real Time Clock interface | 2 | * rtc-twl.c -- TWL Real Time Clock interface |
3 | * | 3 | * |
4 | * Copyright (C) 2007 MontaVista Software, Inc | 4 | * Copyright (C) 2007 MontaVista Software, Inc |
5 | * Author: Alexandre Rusev <source@mvista.com> | 5 | * Author: Alexandre Rusev <source@mvista.com> |
@@ -86,29 +86,29 @@ | |||
86 | /*----------------------------------------------------------------------*/ | 86 | /*----------------------------------------------------------------------*/ |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * Supports 1 byte read from TWL4030 RTC register. | 89 | * Supports 1 byte read from TWL RTC register. |
90 | */ | 90 | */ |
91 | static int twl4030_rtc_read_u8(u8 *data, u8 reg) | 91 | static int twl_rtc_read_u8(u8 *data, u8 reg) |
92 | { | 92 | { |
93 | int ret; | 93 | int ret; |
94 | 94 | ||
95 | ret = twl_i2c_read_u8(TWL4030_MODULE_RTC, data, reg); | 95 | ret = twl_i2c_read_u8(TWL_MODULE_RTC, data, reg); |
96 | if (ret < 0) | 96 | if (ret < 0) |
97 | pr_err("twl4030_rtc: Could not read TWL4030" | 97 | pr_err("twl_rtc: Could not read TWL" |
98 | "register %X - error %d\n", reg, ret); | 98 | "register %X - error %d\n", reg, ret); |
99 | return ret; | 99 | return ret; |
100 | } | 100 | } |
101 | 101 | ||
102 | /* | 102 | /* |
103 | * Supports 1 byte write to TWL4030 RTC registers. | 103 | * Supports 1 byte write to TWL RTC registers. |
104 | */ | 104 | */ |
105 | static int twl4030_rtc_write_u8(u8 data, u8 reg) | 105 | static int twl_rtc_write_u8(u8 data, u8 reg) |
106 | { | 106 | { |
107 | int ret; | 107 | int ret; |
108 | 108 | ||
109 | ret = twl_i2c_write_u8(TWL4030_MODULE_RTC, data, reg); | 109 | ret = twl_i2c_write_u8(TWL_MODULE_RTC, data, reg); |
110 | if (ret < 0) | 110 | if (ret < 0) |
111 | pr_err("twl4030_rtc: Could not write TWL4030" | 111 | pr_err("twl_rtc: Could not write TWL" |
112 | "register %X - error %d\n", reg, ret); | 112 | "register %X - error %d\n", reg, ret); |
113 | return ret; | 113 | return ret; |
114 | } | 114 | } |
@@ -129,7 +129,7 @@ static int set_rtc_irq_bit(unsigned char bit) | |||
129 | 129 | ||
130 | val = rtc_irq_bits | bit; | 130 | val = rtc_irq_bits | bit; |
131 | val &= ~BIT_RTC_INTERRUPTS_REG_EVERY_M; | 131 | val &= ~BIT_RTC_INTERRUPTS_REG_EVERY_M; |
132 | ret = twl4030_rtc_write_u8(val, REG_RTC_INTERRUPTS_REG); | 132 | ret = twl_rtc_write_u8(val, REG_RTC_INTERRUPTS_REG); |
133 | if (ret == 0) | 133 | if (ret == 0) |
134 | rtc_irq_bits = val; | 134 | rtc_irq_bits = val; |
135 | 135 | ||
@@ -145,14 +145,14 @@ static int mask_rtc_irq_bit(unsigned char bit) | |||
145 | int ret; | 145 | int ret; |
146 | 146 | ||
147 | val = rtc_irq_bits & ~bit; | 147 | val = rtc_irq_bits & ~bit; |
148 | ret = twl4030_rtc_write_u8(val, REG_RTC_INTERRUPTS_REG); | 148 | ret = twl_rtc_write_u8(val, REG_RTC_INTERRUPTS_REG); |
149 | if (ret == 0) | 149 | if (ret == 0) |
150 | rtc_irq_bits = val; | 150 | rtc_irq_bits = val; |
151 | 151 | ||
152 | return ret; | 152 | return ret; |
153 | } | 153 | } |
154 | 154 | ||
155 | static int twl4030_rtc_alarm_irq_enable(struct device *dev, unsigned enabled) | 155 | static int twl_rtc_alarm_irq_enable(struct device *dev, unsigned enabled) |
156 | { | 156 | { |
157 | int ret; | 157 | int ret; |
158 | 158 | ||
@@ -164,7 +164,7 @@ static int twl4030_rtc_alarm_irq_enable(struct device *dev, unsigned enabled) | |||
164 | return ret; | 164 | return ret; |
165 | } | 165 | } |
166 | 166 | ||
167 | static int twl4030_rtc_update_irq_enable(struct device *dev, unsigned enabled) | 167 | static int twl_rtc_update_irq_enable(struct device *dev, unsigned enabled) |
168 | { | 168 | { |
169 | int ret; | 169 | int ret; |
170 | 170 | ||
@@ -177,7 +177,7 @@ static int twl4030_rtc_update_irq_enable(struct device *dev, unsigned enabled) | |||
177 | } | 177 | } |
178 | 178 | ||
179 | /* | 179 | /* |
180 | * Gets current TWL4030 RTC time and date parameters. | 180 | * Gets current TWL RTC time and date parameters. |
181 | * | 181 | * |
182 | * The RTC's time/alarm representation is not what gmtime(3) requires | 182 | * The RTC's time/alarm representation is not what gmtime(3) requires |
183 | * Linux to use: | 183 | * Linux to use: |
@@ -185,23 +185,23 @@ static int twl4030_rtc_update_irq_enable(struct device *dev, unsigned enabled) | |||
185 | * - Months are 1..12 vs Linux 0-11 | 185 | * - Months are 1..12 vs Linux 0-11 |
186 | * - Years are 0..99 vs Linux 1900..N (we assume 21st century) | 186 | * - Years are 0..99 vs Linux 1900..N (we assume 21st century) |
187 | */ | 187 | */ |
188 | static int twl4030_rtc_read_time(struct device *dev, struct rtc_time *tm) | 188 | static int twl_rtc_read_time(struct device *dev, struct rtc_time *tm) |
189 | { | 189 | { |
190 | unsigned char rtc_data[ALL_TIME_REGS + 1]; | 190 | unsigned char rtc_data[ALL_TIME_REGS + 1]; |
191 | int ret; | 191 | int ret; |
192 | u8 save_control; | 192 | u8 save_control; |
193 | 193 | ||
194 | ret = twl4030_rtc_read_u8(&save_control, REG_RTC_CTRL_REG); | 194 | ret = twl_rtc_read_u8(&save_control, REG_RTC_CTRL_REG); |
195 | if (ret < 0) | 195 | if (ret < 0) |
196 | return ret; | 196 | return ret; |
197 | 197 | ||
198 | save_control |= BIT_RTC_CTRL_REG_GET_TIME_M; | 198 | save_control |= BIT_RTC_CTRL_REG_GET_TIME_M; |
199 | 199 | ||
200 | ret = twl4030_rtc_write_u8(save_control, REG_RTC_CTRL_REG); | 200 | ret = twl_rtc_write_u8(save_control, REG_RTC_CTRL_REG); |
201 | if (ret < 0) | 201 | if (ret < 0) |
202 | return ret; | 202 | return ret; |
203 | 203 | ||
204 | ret = twl_i2c_read(TWL4030_MODULE_RTC, rtc_data, | 204 | ret = twl_i2c_read(TWL_MODULE_RTC, rtc_data, |
205 | REG_SECONDS_REG, ALL_TIME_REGS); | 205 | REG_SECONDS_REG, ALL_TIME_REGS); |
206 | 206 | ||
207 | if (ret < 0) { | 207 | if (ret < 0) { |
@@ -219,7 +219,7 @@ static int twl4030_rtc_read_time(struct device *dev, struct rtc_time *tm) | |||
219 | return ret; | 219 | return ret; |
220 | } | 220 | } |
221 | 221 | ||
222 | static int twl4030_rtc_set_time(struct device *dev, struct rtc_time *tm) | 222 | static int twl_rtc_set_time(struct device *dev, struct rtc_time *tm) |
223 | { | 223 | { |
224 | unsigned char save_control; | 224 | unsigned char save_control; |
225 | unsigned char rtc_data[ALL_TIME_REGS + 1]; | 225 | unsigned char rtc_data[ALL_TIME_REGS + 1]; |
@@ -233,17 +233,17 @@ static int twl4030_rtc_set_time(struct device *dev, struct rtc_time *tm) | |||
233 | rtc_data[6] = bin2bcd(tm->tm_year - 100); | 233 | rtc_data[6] = bin2bcd(tm->tm_year - 100); |
234 | 234 | ||
235 | /* Stop RTC while updating the TC registers */ | 235 | /* Stop RTC while updating the TC registers */ |
236 | ret = twl4030_rtc_read_u8(&save_control, REG_RTC_CTRL_REG); | 236 | ret = twl_rtc_read_u8(&save_control, REG_RTC_CTRL_REG); |
237 | if (ret < 0) | 237 | if (ret < 0) |
238 | goto out; | 238 | goto out; |
239 | 239 | ||
240 | save_control &= ~BIT_RTC_CTRL_REG_STOP_RTC_M; | 240 | save_control &= ~BIT_RTC_CTRL_REG_STOP_RTC_M; |
241 | twl4030_rtc_write_u8(save_control, REG_RTC_CTRL_REG); | 241 | twl_rtc_write_u8(save_control, REG_RTC_CTRL_REG); |
242 | if (ret < 0) | 242 | if (ret < 0) |
243 | goto out; | 243 | goto out; |
244 | 244 | ||
245 | /* update all the time registers in one shot */ | 245 | /* update all the time registers in one shot */ |
246 | ret = twl_i2c_write(TWL4030_MODULE_RTC, rtc_data, | 246 | ret = twl_i2c_write(TWL_MODULE_RTC, rtc_data, |
247 | REG_SECONDS_REG, ALL_TIME_REGS); | 247 | REG_SECONDS_REG, ALL_TIME_REGS); |
248 | if (ret < 0) { | 248 | if (ret < 0) { |
249 | dev_err(dev, "rtc_set_time error %d\n", ret); | 249 | dev_err(dev, "rtc_set_time error %d\n", ret); |
@@ -252,21 +252,21 @@ static int twl4030_rtc_set_time(struct device *dev, struct rtc_time *tm) | |||
252 | 252 | ||
253 | /* Start back RTC */ | 253 | /* Start back RTC */ |
254 | save_control |= BIT_RTC_CTRL_REG_STOP_RTC_M; | 254 | save_control |= BIT_RTC_CTRL_REG_STOP_RTC_M; |
255 | ret = twl4030_rtc_write_u8(save_control, REG_RTC_CTRL_REG); | 255 | ret = twl_rtc_write_u8(save_control, REG_RTC_CTRL_REG); |
256 | 256 | ||
257 | out: | 257 | out: |
258 | return ret; | 258 | return ret; |
259 | } | 259 | } |
260 | 260 | ||
261 | /* | 261 | /* |
262 | * Gets current TWL4030 RTC alarm time. | 262 | * Gets current TWL RTC alarm time. |
263 | */ | 263 | */ |
264 | static int twl4030_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) | 264 | static int twl_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) |
265 | { | 265 | { |
266 | unsigned char rtc_data[ALL_TIME_REGS + 1]; | 266 | unsigned char rtc_data[ALL_TIME_REGS + 1]; |
267 | int ret; | 267 | int ret; |
268 | 268 | ||
269 | ret = twl_i2c_read(TWL4030_MODULE_RTC, rtc_data, | 269 | ret = twl_i2c_read(TWL_MODULE_RTC, rtc_data, |
270 | REG_ALARM_SECONDS_REG, ALL_TIME_REGS); | 270 | REG_ALARM_SECONDS_REG, ALL_TIME_REGS); |
271 | if (ret < 0) { | 271 | if (ret < 0) { |
272 | dev_err(dev, "rtc_read_alarm error %d\n", ret); | 272 | dev_err(dev, "rtc_read_alarm error %d\n", ret); |
@@ -288,12 +288,12 @@ static int twl4030_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) | |||
288 | return ret; | 288 | return ret; |
289 | } | 289 | } |
290 | 290 | ||
291 | static int twl4030_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) | 291 | static int twl_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) |
292 | { | 292 | { |
293 | unsigned char alarm_data[ALL_TIME_REGS + 1]; | 293 | unsigned char alarm_data[ALL_TIME_REGS + 1]; |
294 | int ret; | 294 | int ret; |
295 | 295 | ||
296 | ret = twl4030_rtc_alarm_irq_enable(dev, 0); | 296 | ret = twl_rtc_alarm_irq_enable(dev, 0); |
297 | if (ret) | 297 | if (ret) |
298 | goto out; | 298 | goto out; |
299 | 299 | ||
@@ -305,7 +305,7 @@ static int twl4030_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) | |||
305 | alarm_data[6] = bin2bcd(alm->time.tm_year - 100); | 305 | alarm_data[6] = bin2bcd(alm->time.tm_year - 100); |
306 | 306 | ||
307 | /* update all the alarm registers in one shot */ | 307 | /* update all the alarm registers in one shot */ |
308 | ret = twl_i2c_write(TWL4030_MODULE_RTC, alarm_data, | 308 | ret = twl_i2c_write(TWL_MODULE_RTC, alarm_data, |
309 | REG_ALARM_SECONDS_REG, ALL_TIME_REGS); | 309 | REG_ALARM_SECONDS_REG, ALL_TIME_REGS); |
310 | if (ret) { | 310 | if (ret) { |
311 | dev_err(dev, "rtc_set_alarm error %d\n", ret); | 311 | dev_err(dev, "rtc_set_alarm error %d\n", ret); |
@@ -313,12 +313,12 @@ static int twl4030_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) | |||
313 | } | 313 | } |
314 | 314 | ||
315 | if (alm->enabled) | 315 | if (alm->enabled) |
316 | ret = twl4030_rtc_alarm_irq_enable(dev, 1); | 316 | ret = twl_rtc_alarm_irq_enable(dev, 1); |
317 | out: | 317 | out: |
318 | return ret; | 318 | return ret; |
319 | } | 319 | } |
320 | 320 | ||
321 | static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc) | 321 | static irqreturn_t twl_rtc_interrupt(int irq, void *rtc) |
322 | { | 322 | { |
323 | unsigned long events = 0; | 323 | unsigned long events = 0; |
324 | int ret = IRQ_NONE; | 324 | int ret = IRQ_NONE; |
@@ -333,7 +333,7 @@ static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc) | |||
333 | local_irq_enable(); | 333 | local_irq_enable(); |
334 | #endif | 334 | #endif |
335 | 335 | ||
336 | res = twl4030_rtc_read_u8(&rd_reg, REG_RTC_STATUS_REG); | 336 | res = twl_rtc_read_u8(&rd_reg, REG_RTC_STATUS_REG); |
337 | if (res) | 337 | if (res) |
338 | goto out; | 338 | goto out; |
339 | /* | 339 | /* |
@@ -347,14 +347,14 @@ static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc) | |||
347 | else | 347 | else |
348 | events |= RTC_IRQF | RTC_UF; | 348 | events |= RTC_IRQF | RTC_UF; |
349 | 349 | ||
350 | res = twl4030_rtc_write_u8(rd_reg | BIT_RTC_STATUS_REG_ALARM_M, | 350 | res = twl_rtc_write_u8(rd_reg | BIT_RTC_STATUS_REG_ALARM_M, |
351 | REG_RTC_STATUS_REG); | 351 | REG_RTC_STATUS_REG); |
352 | if (res) | 352 | if (res) |
353 | goto out; | 353 | goto out; |
354 | 354 | ||
355 | /* Clear on Read enabled. RTC_IT bit of TWL4030_INT_PWR_ISR1 | 355 | /* Clear on Read enabled. RTC_IT bit of TWL4030_INT_PWR_ISR1 |
356 | * needs 2 reads to clear the interrupt. One read is done in | 356 | * needs 2 reads to clear the interrupt. One read is done in |
357 | * do_twl4030_pwrirq(). Doing the second read, to clear | 357 | * do_twl_pwrirq(). Doing the second read, to clear |
358 | * the bit. | 358 | * the bit. |
359 | * | 359 | * |
360 | * FIXME the reason PWR_ISR1 needs an extra read is that | 360 | * FIXME the reason PWR_ISR1 needs an extra read is that |
@@ -376,18 +376,18 @@ out: | |||
376 | return ret; | 376 | return ret; |
377 | } | 377 | } |
378 | 378 | ||
379 | static struct rtc_class_ops twl4030_rtc_ops = { | 379 | static struct rtc_class_ops twl_rtc_ops = { |
380 | .read_time = twl4030_rtc_read_time, | 380 | .read_time = twl_rtc_read_time, |
381 | .set_time = twl4030_rtc_set_time, | 381 | .set_time = twl_rtc_set_time, |
382 | .read_alarm = twl4030_rtc_read_alarm, | 382 | .read_alarm = twl_rtc_read_alarm, |
383 | .set_alarm = twl4030_rtc_set_alarm, | 383 | .set_alarm = twl_rtc_set_alarm, |
384 | .alarm_irq_enable = twl4030_rtc_alarm_irq_enable, | 384 | .alarm_irq_enable = twl_rtc_alarm_irq_enable, |
385 | .update_irq_enable = twl4030_rtc_update_irq_enable, | 385 | .update_irq_enable = twl_rtc_update_irq_enable, |
386 | }; | 386 | }; |
387 | 387 | ||
388 | /*----------------------------------------------------------------------*/ | 388 | /*----------------------------------------------------------------------*/ |
389 | 389 | ||
390 | static int __devinit twl4030_rtc_probe(struct platform_device *pdev) | 390 | static int __devinit twl_rtc_probe(struct platform_device *pdev) |
391 | { | 391 | { |
392 | struct rtc_device *rtc; | 392 | struct rtc_device *rtc; |
393 | int ret = 0; | 393 | int ret = 0; |
@@ -398,7 +398,7 @@ static int __devinit twl4030_rtc_probe(struct platform_device *pdev) | |||
398 | return -EINVAL; | 398 | return -EINVAL; |
399 | 399 | ||
400 | rtc = rtc_device_register(pdev->name, | 400 | rtc = rtc_device_register(pdev->name, |
401 | &pdev->dev, &twl4030_rtc_ops, THIS_MODULE); | 401 | &pdev->dev, &twl_rtc_ops, THIS_MODULE); |
402 | if (IS_ERR(rtc)) { | 402 | if (IS_ERR(rtc)) { |
403 | ret = PTR_ERR(rtc); | 403 | ret = PTR_ERR(rtc); |
404 | dev_err(&pdev->dev, "can't register RTC device, err %ld\n", | 404 | dev_err(&pdev->dev, "can't register RTC device, err %ld\n", |
@@ -409,7 +409,7 @@ static int __devinit twl4030_rtc_probe(struct platform_device *pdev) | |||
409 | 409 | ||
410 | platform_set_drvdata(pdev, rtc); | 410 | platform_set_drvdata(pdev, rtc); |
411 | 411 | ||
412 | ret = twl4030_rtc_read_u8(&rd_reg, REG_RTC_STATUS_REG); | 412 | ret = twl_rtc_read_u8(&rd_reg, REG_RTC_STATUS_REG); |
413 | if (ret < 0) | 413 | if (ret < 0) |
414 | goto out1; | 414 | goto out1; |
415 | 415 | ||
@@ -420,11 +420,11 @@ static int __devinit twl4030_rtc_probe(struct platform_device *pdev) | |||
420 | dev_warn(&pdev->dev, "Pending Alarm interrupt detected.\n"); | 420 | dev_warn(&pdev->dev, "Pending Alarm interrupt detected.\n"); |
421 | 421 | ||
422 | /* Clear RTC Power up reset and pending alarm interrupts */ | 422 | /* Clear RTC Power up reset and pending alarm interrupts */ |
423 | ret = twl4030_rtc_write_u8(rd_reg, REG_RTC_STATUS_REG); | 423 | ret = twl_rtc_write_u8(rd_reg, REG_RTC_STATUS_REG); |
424 | if (ret < 0) | 424 | if (ret < 0) |
425 | goto out1; | 425 | goto out1; |
426 | 426 | ||
427 | ret = request_irq(irq, twl4030_rtc_interrupt, | 427 | ret = request_irq(irq, twl_rtc_interrupt, |
428 | IRQF_TRIGGER_RISING, | 428 | IRQF_TRIGGER_RISING, |
429 | dev_name(&rtc->dev), rtc); | 429 | dev_name(&rtc->dev), rtc); |
430 | if (ret < 0) { | 430 | if (ret < 0) { |
@@ -433,20 +433,20 @@ static int __devinit twl4030_rtc_probe(struct platform_device *pdev) | |||
433 | } | 433 | } |
434 | 434 | ||
435 | /* Check RTC module status, Enable if it is off */ | 435 | /* Check RTC module status, Enable if it is off */ |
436 | ret = twl4030_rtc_read_u8(&rd_reg, REG_RTC_CTRL_REG); | 436 | ret = twl_rtc_read_u8(&rd_reg, REG_RTC_CTRL_REG); |
437 | if (ret < 0) | 437 | if (ret < 0) |
438 | goto out2; | 438 | goto out2; |
439 | 439 | ||
440 | if (!(rd_reg & BIT_RTC_CTRL_REG_STOP_RTC_M)) { | 440 | if (!(rd_reg & BIT_RTC_CTRL_REG_STOP_RTC_M)) { |
441 | dev_info(&pdev->dev, "Enabling TWL4030-RTC.\n"); | 441 | dev_info(&pdev->dev, "Enabling TWL-RTC.\n"); |
442 | rd_reg = BIT_RTC_CTRL_REG_STOP_RTC_M; | 442 | rd_reg = BIT_RTC_CTRL_REG_STOP_RTC_M; |
443 | ret = twl4030_rtc_write_u8(rd_reg, REG_RTC_CTRL_REG); | 443 | ret = twl_rtc_write_u8(rd_reg, REG_RTC_CTRL_REG); |
444 | if (ret < 0) | 444 | if (ret < 0) |
445 | goto out2; | 445 | goto out2; |
446 | } | 446 | } |
447 | 447 | ||
448 | /* init cached IRQ enable bits */ | 448 | /* init cached IRQ enable bits */ |
449 | ret = twl4030_rtc_read_u8(&rtc_irq_bits, REG_RTC_INTERRUPTS_REG); | 449 | ret = twl_rtc_read_u8(&rtc_irq_bits, REG_RTC_INTERRUPTS_REG); |
450 | if (ret < 0) | 450 | if (ret < 0) |
451 | goto out2; | 451 | goto out2; |
452 | 452 | ||
@@ -461,10 +461,10 @@ out0: | |||
461 | } | 461 | } |
462 | 462 | ||
463 | /* | 463 | /* |
464 | * Disable all TWL4030 RTC module interrupts. | 464 | * Disable all TWL RTC module interrupts. |
465 | * Sets status flag to free. | 465 | * Sets status flag to free. |
466 | */ | 466 | */ |
467 | static int __devexit twl4030_rtc_remove(struct platform_device *pdev) | 467 | static int __devexit twl_rtc_remove(struct platform_device *pdev) |
468 | { | 468 | { |
469 | /* leave rtc running, but disable irqs */ | 469 | /* leave rtc running, but disable irqs */ |
470 | struct rtc_device *rtc = platform_get_drvdata(pdev); | 470 | struct rtc_device *rtc = platform_get_drvdata(pdev); |
@@ -480,7 +480,7 @@ static int __devexit twl4030_rtc_remove(struct platform_device *pdev) | |||
480 | return 0; | 480 | return 0; |
481 | } | 481 | } |
482 | 482 | ||
483 | static void twl4030_rtc_shutdown(struct platform_device *pdev) | 483 | static void twl_rtc_shutdown(struct platform_device *pdev) |
484 | { | 484 | { |
485 | /* mask timer interrupts, but leave alarm interrupts on to enable | 485 | /* mask timer interrupts, but leave alarm interrupts on to enable |
486 | power-on when alarm is triggered */ | 486 | power-on when alarm is triggered */ |
@@ -491,7 +491,7 @@ static void twl4030_rtc_shutdown(struct platform_device *pdev) | |||
491 | 491 | ||
492 | static unsigned char irqstat; | 492 | static unsigned char irqstat; |
493 | 493 | ||
494 | static int twl4030_rtc_suspend(struct platform_device *pdev, pm_message_t state) | 494 | static int twl_rtc_suspend(struct platform_device *pdev, pm_message_t state) |
495 | { | 495 | { |
496 | irqstat = rtc_irq_bits; | 496 | irqstat = rtc_irq_bits; |
497 | 497 | ||
@@ -499,42 +499,42 @@ static int twl4030_rtc_suspend(struct platform_device *pdev, pm_message_t state) | |||
499 | return 0; | 499 | return 0; |
500 | } | 500 | } |
501 | 501 | ||
502 | static int twl4030_rtc_resume(struct platform_device *pdev) | 502 | static int twl_rtc_resume(struct platform_device *pdev) |
503 | { | 503 | { |
504 | set_rtc_irq_bit(irqstat); | 504 | set_rtc_irq_bit(irqstat); |
505 | return 0; | 505 | return 0; |
506 | } | 506 | } |
507 | 507 | ||
508 | #else | 508 | #else |
509 | #define twl4030_rtc_suspend NULL | 509 | #define twl_rtc_suspend NULL |
510 | #define twl4030_rtc_resume NULL | 510 | #define twl_rtc_resume NULL |
511 | #endif | 511 | #endif |
512 | 512 | ||
513 | MODULE_ALIAS("platform:twl4030_rtc"); | 513 | MODULE_ALIAS("platform:twl_rtc"); |
514 | 514 | ||
515 | static struct platform_driver twl4030rtc_driver = { | 515 | static struct platform_driver twl4030rtc_driver = { |
516 | .probe = twl4030_rtc_probe, | 516 | .probe = twl_rtc_probe, |
517 | .remove = __devexit_p(twl4030_rtc_remove), | 517 | .remove = __devexit_p(twl_rtc_remove), |
518 | .shutdown = twl4030_rtc_shutdown, | 518 | .shutdown = twl_rtc_shutdown, |
519 | .suspend = twl4030_rtc_suspend, | 519 | .suspend = twl_rtc_suspend, |
520 | .resume = twl4030_rtc_resume, | 520 | .resume = twl_rtc_resume, |
521 | .driver = { | 521 | .driver = { |
522 | .owner = THIS_MODULE, | 522 | .owner = THIS_MODULE, |
523 | .name = "twl4030_rtc", | 523 | .name = "twl_rtc", |
524 | }, | 524 | }, |
525 | }; | 525 | }; |
526 | 526 | ||
527 | static int __init twl4030_rtc_init(void) | 527 | static int __init twl_rtc_init(void) |
528 | { | 528 | { |
529 | return platform_driver_register(&twl4030rtc_driver); | 529 | return platform_driver_register(&twl4030rtc_driver); |
530 | } | 530 | } |
531 | module_init(twl4030_rtc_init); | 531 | module_init(twl_rtc_init); |
532 | 532 | ||
533 | static void __exit twl4030_rtc_exit(void) | 533 | static void __exit twl_rtc_exit(void) |
534 | { | 534 | { |
535 | platform_driver_unregister(&twl4030rtc_driver); | 535 | platform_driver_unregister(&twl4030rtc_driver); |
536 | } | 536 | } |
537 | module_exit(twl4030_rtc_exit); | 537 | module_exit(twl_rtc_exit); |
538 | 538 | ||
539 | MODULE_AUTHOR("Texas Instruments, MontaVista Software"); | 539 | MODULE_AUTHOR("Texas Instruments, MontaVista Software"); |
540 | MODULE_LICENSE("GPL"); | 540 | MODULE_LICENSE("GPL"); |