linux/drivers/rtc
Xianglong Du 3916b09eed drivers/rtc/rtc-sirfsoc.c: fix kernel panic of backing from hibernation
RTC settings will be lost if power supply is cut off after hibernation
finished, but the current "restore" function does not restore RTC related
settings, this causes rtc_read_time failure and kernel panic:

  rtc rtc0: **** DPM device timeout ****
  Stack trace:
    unwind_backtrace+0x0/0xf4
    show_stack+0x10/0x14
    dpm_wd_handler+0x24/0x28
    call_timer_fn.isra.33+0x24/0x88
    run_timer_softirq+0x178/0x1f0
    __do_softirq+0x120/0x200
    do_softirq+0x54/0x5c
    irq_exit+0x9c/0xd0
    handle_IRQ+0x44/0x90
    __irq_svc+0x40/0x70
    _raw_spin_unlock_irqrestore+0x10/0x48
    sirfsoc_rtc_iobrg_readl+0x34/0x3c
    sirfsoc_rtc_read_time+0x24/0x48
    __rtc_read_time.isra.3+0x48/0x5c
    rtc_read_time+0x30/0x44
    rtc_resume.part.9+0x20/0x104
    rtc_resume+0x5c/0x64
    dpm_run_callback.isra.4+0x2c/0x74
    device_resume+0x9c/0x144
    dpm_resume+0x100/0x224
    hibernation_snapshot+0x170/0x398
    hibernate+0x13c/0x1d8
    state_store+0xb4/0xb8
    kobj_attr_store+0x14/0x20
    sysfs_write_file+0x160/0x190
    vfs_write+0xb4/0x194
    SyS_write+0x3c/0x78

this patch uses SIMPLE_DEV_PM_OPS() to make restore() execute the
existing resume() function which will restore the set of RTC.

Signed-off-by: Xianglong Du <Xianglong.Du@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-03 16:21:19 -07:00
..
class.c rtc: honor device tree /alias entries when assigning IDs 2014-01-23 16:37:00 -08:00
hctosys.c rtc_sysfs_show_hctosys(): display 0 if resume failed 2012-10-06 03:05:04 +09:00
interface.c rtc: Keep system awake until all expired RTC timers are handled 2013-07-22 09:38:25 -07:00
Kconfig Merge branch 'akpm' (incoming from Andrew) 2014-01-23 19:11:50 -08:00
Makefile Merge branch 'akpm' (incoming from Andrew) 2014-01-23 19:11:50 -08:00
rtc-88pm80x.c drivers/rtc/rtc-88pm80x.c: use dev_get_platdata() 2013-11-13 12:09:28 +09:00
rtc-88pm860x.c drivers/rtc/rtc-88pm860x.c: use dev_get_platdata() 2013-11-13 12:09:28 +09:00
rtc-ab3100.c drivers/rtc/rtc-ab3100.c: remove empty function 2013-07-03 16:07:54 -07:00
rtc-ab8500.c drivers/rtc/rtc-ab8500.c: add second resolution to rtc driver 2013-07-03 16:07:59 -07:00
rtc-as3722.c drivers/rtc/rtc-as3722: use devm for rtc and irq registration 2014-01-23 16:36:59 -08:00
rtc-at32ap700x.c rtc: rtc-at32ap700x: remove unnecessary OOM messages 2014-04-03 16:21:17 -07:00
rtc-at91rm9200.c drivers/rtc/rtc-at91rm9200.c: correct alarm over day/month wrap 2013-12-12 18:19:26 -08:00
rtc-at91rm9200.h Revert "drivers/rtc/rtc-at91rm9200.c: use a variable for storing IMR" 2013-04-05 09:36:53 -07:00
rtc-at91sam9.c rtc: rtc-at91sam9: remove unnecessary platform_set_drvdata() 2013-07-03 16:07:49 -07:00
rtc-au1xxx.c drivers/rtc/rtc-au1xxx.c: remove empty function 2013-07-03 16:07:54 -07:00
rtc-bfin.c rtc: rtc-bfin: remove unnecessary platform_set_drvdata() 2013-07-03 16:07:49 -07:00
rtc-bq32k.c drivers/rtc/rtc-bq32k.c: remove empty function 2013-07-03 16:07:55 -07:00
rtc-bq4802.c drivers/rtc/rtc-bq4802.c: remove empty function 2013-07-03 16:07:54 -07:00
rtc-cmos.c drivers/rtc/rtc-cmos.c: propagate hpet_register_irq_handler() failure 2014-01-23 16:37:00 -08:00
rtc-coh901331.c rtc: rtc-coh901331: use devm_ioremap_resource() 2014-04-03 16:21:18 -07:00
rtc-core.h
rtc-da9052.c drivers/rtc/rtc-da9052.c: remove redundant private structure field 2014-04-03 16:21:19 -07:00
rtc-da9055.c drivers/rtc/rtc-da9055.c: use dev_get_platdata() 2013-11-13 12:09:28 +09:00
rtc-davinci.c rtc: rtc-davinci: use devm_ioremap_resource() 2014-04-03 16:21:18 -07:00
rtc-dev.c rtc: use dev_warn()/dev_dbg()/pr_err() instead of printk() 2013-02-21 17:22:29 -08:00
rtc-dm355evm.c drivers/rtc/rtc-dm355evm.c: remove empty function 2013-07-03 16:07:53 -07:00
rtc-ds1216.c drivers/rtc/rtc-ds1216.c: use module_platform_driver_probe() 2013-07-03 16:08:00 -07:00
rtc-ds1286.c drivers/rtc/rtc-ds1286.c: remove empty function 2013-07-03 16:07:56 -07:00
rtc-ds1302.c drivers/rtc/rtc-ds1302.c: handle write protection 2013-07-03 16:07:59 -07:00
rtc-ds1305.c rtc: fix potential race condition 2014-04-03 16:21:16 -07:00
rtc-ds1307.c rtc: fix potential race condition 2014-04-03 16:21:16 -07:00
rtc-ds1374.c drivers/rtc/rtc-ds1374.c: fix spacing related issues 2013-07-03 16:07:46 -07:00
rtc-ds1390.c rtc: rtc-ds1390: remove unnecessary OOM messages 2014-04-03 16:21:17 -07:00
rtc-ds1511.c rtc: fix potential race condition 2014-04-03 16:21:16 -07:00
rtc-ds1553.c rtc: fix potential race condition 2014-04-03 16:21:16 -07:00
rtc-ds1672.c rtc: fix potential race condition 2014-04-03 16:21:16 -07:00
rtc-ds1742.c rtc: fix potential race condition 2014-04-03 16:21:16 -07:00
rtc-ds2404.c drivers/rtc/rtc-ds2404.c: use dev_get_platdata() 2013-11-13 12:09:29 +09:00
rtc-ds3232.c rtc: fix potential race condition 2014-04-03 16:21:16 -07:00
rtc-ds3234.c drivers/rtc/rtc-ds3234.c: remove empty function 2013-07-03 16:07:56 -07:00
rtc-efi.c drivers/rtc/rtc-efi.c: remove empty function 2013-07-03 16:07:56 -07:00
rtc-em3027.c drivers/rtc/rtc-em3027.c: remove empty function 2013-07-03 16:07:56 -07:00
rtc-ep93xx.c drivers/rtc/rtc-ep93xx.c: use dev_get_platdata() 2013-11-13 12:09:29 +09:00
rtc-fm3130.c drivers/rtc/rtc-fm3130.c: remove empty function 2013-07-03 16:07:56 -07:00
rtc-generic.c drivers/rtc/rtc-generic.c: remove empty function 2013-07-03 16:07:57 -07:00
rtc-hid-sensor-time.c tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
rtc-hym8563.c drivers/rtc/rtc-hym8563.c: staticize local symbol 2014-01-23 16:37:00 -08:00
rtc-imxdi.c drivers/rtc/rtc-imxdi.c: check the return value from clk_prepare_enable() 2014-04-03 16:21:16 -07:00
rtc-isl1208.c drivers/rtc/rtc-isl1208.c: use devm_* APIs 2013-11-13 12:09:27 +09:00
rtc-isl12022.c drivers/rtc: Replace PTR_RET with PTR_ERR_OR_ZERO 2013-07-16 16:06:00 +09:30
rtc-isl12057.c drivers/rtc/rtc-isl12057.c: remove duplicate include 2014-04-03 16:21:19 -07:00
rtc-jz4740.c rtc: rtc-jz4740: use devm_ioremap_resource() 2014-04-03 16:21:19 -07:00
rtc-lib.c
rtc-lp8788.c drivers/rtc/rtc-lp8788.c: remove empty function 2013-07-03 16:07:53 -07:00
rtc-lpc32xx.c rtc: rtc-lpc32xx: remove unnecessary OOM messages 2014-04-03 16:21:18 -07:00
rtc-ls1x.c drivers/rtc/rtc-ls1x.c: remove empty function 2013-07-03 16:07:53 -07:00
rtc-m41t80.c drivers/rtc/rtc-m41t80.c: fix spacing related issue 2013-07-03 16:07:47 -07:00
rtc-m41t93.c drivers/rtc/rtc-m41t93.c: remove empty function 2013-07-03 16:07:56 -07:00
rtc-m41t94.c drivers/rtc/rtc-m41t94.c: remove empty function 2013-07-03 16:07:57 -07:00
rtc-m48t35.c drivers/rtc: Replace PTR_RET with PTR_ERR_OR_ZERO 2013-07-16 16:06:00 +09:30
rtc-m48t59.c drivers/rtc/rtc-m48t59.c: use dev_get_platdata() 2013-11-13 12:09:29 +09:00
rtc-m48t86.c drivers/rtc/rtc-m48t86.c: use dev_get_platdata() 2013-11-13 12:09:29 +09:00
rtc-max6900.c drivers/rtc/rtc-max6900.c: remove redundant checks 2013-11-13 12:09:27 +09:00
rtc-max6902.c drivers/rtc/rtc-max6902.c: remove empty function 2013-07-03 16:07:57 -07:00
rtc-max8907.c rtc: max8907: weekday encoding fixes 2014-01-23 16:37:00 -08:00
rtc-max8925.c drivers/rtc/rtc-max8925.c: remove empty function 2013-07-03 16:07:53 -07:00
rtc-max8997.c drivers/rtc/rtc-max8997.c: remove empty function 2013-07-03 16:07:57 -07:00
rtc-max8998.c For the 3.11 merge we only have one new MFD driver for the Kontron PLD. 2013-07-10 11:10:27 -07:00
rtc-max77686.c drivers/rtc/rtc-max77686.c: Fix wrong register 2013-09-11 15:58:56 -07:00
rtc-mc13xxx.c rtc: rtc-mc13xxx: remove unnecessary platform_set_drvdata() 2013-07-03 16:07:51 -07:00
rtc-moxart.c rtc: rtc-moxart: remove unnecessary OOM messages 2014-04-03 16:21:17 -07:00
rtc-mpc5121.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
rtc-mrst.c drivers/rtc/rtc-mrst.c: remove redundant dev_set_drvdata 2013-11-13 12:09:27 +09:00
rtc-msm6242.c drivers/rtc/rtc-msm6242.c: remove empty function 2013-07-03 16:07:53 -07:00
rtc-mv.c rtc: simplify devm_request_mem_region/devm_ioremap 2013-09-11 15:58:59 -07:00
rtc-mxc.c drivers/rtc/rtc-mxc.c: check the return value from clk_prepare_enable() 2014-01-23 16:36:59 -08:00
rtc-nuc900.c rtc: rtc-nuc900: remove unnecessary OOM messages 2014-04-03 16:21:17 -07:00
rtc-omap.c drivers/rtc/rtc-omap.c: remove redundant of_match_ptr 2013-11-13 12:09:30 +09:00
rtc-palmas.c drivers/rtc/rtc-palmas.c: support for backup battery charging 2013-09-11 15:58:55 -07:00
rtc-pcap.c rtc: rtc-pcap: remove unnecessary platform_set_drvdata() 2013-07-03 16:07:51 -07:00
rtc-pcf2123.c drivers/rtc/rtc-pcf2123.c: use dev_get_platdata() 2013-11-13 12:09:29 +09:00
rtc-pcf2127.c drivers/rtc/rtc-pcf2127.c: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO 2014-01-23 16:37:00 -08:00
rtc-pcf8523.c drivers/rtc/rtc-pcf8523.c: remove empty function 2013-07-03 16:07:57 -07:00
rtc-pcf8563.c drivers/rtc: Replace PTR_RET with PTR_ERR_OR_ZERO 2013-07-16 16:06:00 +09:30
rtc-pcf8583.c drivers/rtc: Replace PTR_RET with PTR_ERR_OR_ZERO 2013-07-16 16:06:00 +09:30
rtc-pcf50633.c rtc: rtc-pcf50633: use devm_*() functions 2013-04-29 18:28:38 -07:00
rtc-pl030.c drivers/rtc/rtc-pl030.c: use devm_kzalloc() instead of kmalloc() 2013-11-13 12:09:31 +09:00
rtc-pl031.c drivers/rtc/rtc-pl03x.c: remove unnecessary amba_set_drvdata() 2013-11-13 12:09:31 +09:00
rtc-pm8xxx.c rtc: rtc-pm8xxx: remove unnecessary OOM messages 2014-04-03 16:21:17 -07:00
rtc-proc.c procfs: new helper - PDE_DATA(inode) 2013-04-09 14:13:32 -04:00
rtc-ps3.c drivers/rtc/rtc-ps3.c: remove empty function 2013-07-03 16:07:58 -07:00
rtc-puv3.c drivers/rtc/rtc-puv3.c: use dev_dbg() instead of pr_debug() 2013-11-13 12:09:31 +09:00
rtc-pxa.c rtc: rtc-pxa: use devm_*() functions 2013-07-03 16:07:55 -07:00
rtc-r9701.c rtc: rtc-r9701: use spi_set_drvdata() 2013-04-29 18:28:34 -07:00
rtc-rc5t583.c rtc: rtc-rc5t583: use platform_{get,set}_drvdata() 2013-07-03 16:07:55 -07:00
rtc-rp5c01.c rtc: rtc-rp5c01: remove unnecessary platform_set_drvdata() 2013-07-03 16:07:52 -07:00
rtc-rs5c313.c drivers/rtc/rtc-rs5c313.c: remove empty function 2013-07-03 16:07:58 -07:00
rtc-rs5c348.c drivers/rtc/rtc-rs5c348.c: use dev_get_platdata() 2013-11-13 12:09:29 +09:00
rtc-rs5c372.c drivers/rtc/rtc-rs5c372.c: add R2221T/L variant to the driver 2013-05-07 18:38:26 -07:00
rtc-rv3029c2.c drivers/rtc/rtc-rv3029c2.c: remove empty function 2013-07-03 16:07:58 -07:00
rtc-rx4581.c drivers/rtc/rtc-rx4581.c: remove empty function 2013-07-03 16:07:58 -07:00
rtc-rx8025.c rtc: rtc-rx8025: remove unnecessary OOM messages 2014-04-03 16:21:18 -07:00
rtc-rx8581.c drivers/rtc/rtc-rx8581.c: add SMBus-only adapters support 2014-01-23 16:37:00 -08:00
rtc-s3c.c drivers/rtc/rtc-s3c.c: fix incorrect way of save/restore of S3C2410_TICNT for TYPE_S3C64XX 2014-03-04 07:55:48 -08:00
rtc-s3c.h rtc: s3c: make header file local 2013-04-19 13:51:25 +02:00
rtc-s5m.c drivers/rtc/rtc-s5m.c: s5m_rtc_{suspend,resume}() should depend on CONFIG_PM_SLEEP 2014-01-23 16:37:00 -08:00
rtc-s35390a.c rtc: rtc-s35390a: use devm_*() functions 2013-04-29 18:28:38 -07:00
rtc-sa1100.c rtc: rtc-sa1100: remove unnecessary platform_set_drvdata() 2013-07-03 16:07:51 -07:00
rtc-sh.c drivers/rtc/rtc-sh.c: use dev_get_platdata() 2013-11-13 12:09:30 +09:00
rtc-sirfsoc.c drivers/rtc/rtc-sirfsoc.c: fix kernel panic of backing from hibernation 2014-04-03 16:21:19 -07:00
rtc-snvs.c drivers/rtc/rtc-snvs.c: remove redundant of_match_ptr 2013-11-13 12:09:30 +09:00
rtc-spear.c rtc: rtc-spear: remove unnecessary OOM messages 2014-04-03 16:21:18 -07:00
rtc-starfire.c drivers/rtc/rtc-starfire.c: remove empty function 2013-07-03 16:07:58 -07:00
rtc-stk17ta8.c rtc: simplify devm_request_mem_region/devm_ioremap 2013-09-11 15:58:59 -07:00
rtc-stmp3xxx.c drivers/rtc/rtc-stmp3xxx.c: remove redundant of_match_ptr 2013-11-13 12:09:30 +09:00
rtc-sun4v.c drivers/rtc/rtc-sun4v.c: remove empty function 2013-07-03 16:07:58 -07:00
rtc-sunxi.c ARM: sun4i/sun7i: RTC driver 2013-12-20 22:55:03 +01:00
rtc-sysfs.c rtc: convert class code to use dev_groups 2013-07-29 13:10:58 -07:00
rtc-tegra.c drivers/rtc: don't check resource with devm_ioremap_resource 2013-05-18 11:57:07 +02:00
rtc-test.c rtc: fix potential race condition 2014-04-03 16:21:16 -07:00
rtc-tile.c drivers/rtc/rtc-tile.c: remove empty function 2013-07-03 16:07:53 -07:00
rtc-tps6586x.c drivers/rtc/rtc-tps6586x.c: device wakeup flags correction 2013-06-12 16:29:45 -07:00
rtc-tps65910.c drivers/rtc/rtc-tps65910.c: remove unnecessary include 2013-11-13 12:09:31 +09:00
rtc-tps80031.c drivers/rtc/rtc-tps80031.c: remove empty function 2013-07-03 16:07:58 -07:00
rtc-twl.c drivers/rtc/rtc-twl.c: use devm_*() functions 2014-01-23 16:36:59 -08:00
rtc-tx4939.c rtc: simplify devm_request_mem_region/devm_ioremap 2013-09-11 15:58:59 -07:00
rtc-v3020.c drivers/rtc/rtc-v3020.c: use dev_get_platdata() 2013-11-13 12:09:30 +09:00
rtc-vr41xx.c drivers/rtc/rtc-vr41xx.c: use devm_*() functions 2014-01-23 16:36:59 -08:00
rtc-vt8500.c rtc: rtc-vt8500: use devm_ioremap_resource() 2014-04-03 16:21:19 -07:00
rtc-wm831x.c drivers/rtc/rtc-wm831x.c: remove empty function 2013-07-03 16:07:59 -07:00
rtc-wm8350.c rtc: rtc-wm8350: switch to using SIMPLE_DEV_PM_OPS 2013-04-29 18:28:32 -07:00
rtc-x1205.c rtc: fix potential race condition 2014-04-03 16:21:16 -07:00
systohc.c NTP: Add a CONFIG_RTC_SYSTOHC configuration 2013-01-15 18:16:06 -08:00