26 Aug, 2014

3 commits

  • commit ee1d90146815fdc8d653c558b327fff2acba041d upstream.

    In __rtc_read_alarm(), if the alarm time retrieved by
    rtc_read_alarm_internal() from the device contains invalid values (e.g.
    month=2,mday=31) and the year not set (=-1), the initialization will
    loop infinitely because the year-fixing loop expects the time being
    invalid due to leap year.

    Fix reduces the loop to the leap years and adds final validity check.

    Signed-off-by: Ales Novak
    Acked-by: Alessandro Zummo
    Reported-by: Jiri Bohac
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Jiri Slaby

    Ales Novak
     
  • commit 6e85bab6bc1019f9b87c53b32da3ad7791e7ddf9 upstream.

    In particular seeing zero in eft->month is problematic, as it results in
    -1 (converted to unsigned int, i.e. yielding 0xffffffff) getting passed
    to rtc_year_days(), where the value gets used as an array index
    (normally resulting in a crash). This was observed with the driver
    enabled on x86 on some Fujitsu system (with possibly not up to date
    firmware, but anyway).

    Perhaps efi_read_alarm() should not fail if neither enabled nor pending
    are set, but the returned time is invalid?

    Signed-off-by: Jan Beulich
    Reported-by: Raymund Will
    Cc: Alessandro Zummo
    Cc: Jingoo Han
    Acked-by: Lee, Chun-Yi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Jiri Slaby

    Jan Beulich
     
  • commit 809d9627087e1db63b8672c1f264af73b13116fb upstream.

    Compared source code of rtc-lib.c::rtc_year_days() with
    efirtc.c::rtc_year_days(), found the code in rtc-efi decreases value of
    day twice when it computing year days. rtc-lib.c::rtc_year_days() has
    already decrease days and return the year days from 0 to 365.

    Signed-off-by: Lee, Chun-Yi
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Jiri Slaby

    Lee, Chun-Yi
     

23 Jun, 2014

1 commit

  • commit 2fe121e1f5aa3bf31b418a9790db6c400e922291 upstream.

    The rtc user must wait at least 1 sec between each time/calandar update
    (see atmel's datasheet chapter "Updating Time/Calendar").

    Use the 1Hz interrupt to update the at91_rtc_upd_rdy flag and wait for
    the at91_rtc_wait_upd_rdy event if the rtc is not ready.

    This patch fixes a deadlock in an uninterruptible wait when the RTC is
    updated more than once every second. AFAICT the bug is here from the
    beginning, but I think we should at least backport this fix to 3.10 and
    the following longterm and stable releases.

    Signed-off-by: Boris BREZILLON
    Reported-by: Bryan Evenson
    Tested-by: Bryan Evenson
    Cc: Andrew Victor
    Cc: Nicolas Ferre
    Cc: Jean-Christophe Plagniol-Villard
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Jiri Slaby

    Boris BREZILLON
     

14 Feb, 2014

1 commit

  • commit d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d upstream.

    41c7f7424259f ("rtc: Disable the alarm in the hardware (v2)") added the
    functionality to disable the RTC wake alarm when shutting down the box.

    However, there are at least two b0rked BIOSes we know about:

    https://bugzilla.novell.com/show_bug.cgi?id=812592
    https://bugzilla.novell.com/show_bug.cgi?id=805740

    where, when wakeup alarm is enabled in the BIOS, the machine reboots
    automatically right after shutdown, regardless of what wakeup time is
    programmed.

    Bisecting the issue lead to this patch so disable its functionality with
    a DMI quirk only for those boxes.

    Cc: Brecht Machiels
    Cc: Thomas Gleixner
    Cc: John Stultz
    Cc: Rabin Vincent
    Signed-off-by: Borislav Petkov
    [jstultz: Changed variable name for clarity, added extra dmi entry]
    Tested-by: Brecht Machiels
    Tested-by: Borislav Petkov
    Signed-off-by: John Stultz
    Signed-off-by: Greg Kroah-Hartman

    Borislav Petkov
     

07 Feb, 2014

1 commit

  • commit 75ea799df4cb07e505c91b4abaa87bc28aad3e66 upstream.

    The current MAX8907 driver has two issues related to weekday value
    handling:

    1)

    The HW WEEKDAY register has range 0..6 rather than 1..7 as documented.
    Note that I validated the actual HW range by observing the HW register
    roll from 6->0 rather than 6->7->1 as would otherwise be expected.

    This matches Linux's tm_wday range of 0..6.

    When the CMOS RAM content is lost, the date returned from the device is
    2007-01-01 00:00:00, which is a Monday. The WEEKDAY register reads 1 in
    this case. This matches the numbering in Linux's tm_wday field.

    Hence we should write Linux's tm_wday value to the register without
    modifying it. Hence, remove the +1/-1 calculations for WEEKDAY/tm_wday.

    2)

    There's no need to make alarms match on the WEEKDAY register, since the
    other fields together uniquely define the alarm date/time. Ignoring the
    WEEKDAY value in the match isolates the driver from any incorrect value in
    the current time copy of the WEEKDAY register.

    Each change individually, or both together, solves an issue that I
    observed; "hwclock -r" would time out waiting for its alarm to fire if the
    CMOS RAM content had been lost, and hence the WEEKDAY register value
    mismatched what the driver expected it to be. "hwclock -w" would solve
    this by over-writing the HW default WEEKDAY register value with what the
    driver expected.

    Signed-off-by: Stephen Warren
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Stephen Warren
     

20 Dec, 2013

1 commit


12 Sep, 2013

14 commits

  • Convert the composition of devm_request_mem_region and devm_ioremap to a
    single call to devm_ioremap_resource. The associated call to
    platform_get_resource is also simplified and moved next to the new call
    to devm_ioremap_resource.

    This was done using a combination of the semantic patches
    devm_ioremap_resource.cocci and devm_request_and_ioremap.cocci, found in
    the scripts/coccinelle/api directory.

    In rtc-lpc32xx.c and rtc-mv.c, the local variable size is no longer needed.

    In rtc-ds1511.c the size field of the local structure is not useful any
    more, and is deleted.

    Signed-off-by: Julia Lawall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julia Lawall
     
  • Let RTC core decide if the retrieved time is invalid, instead of
    processing errors in the driver.

    Signed-off-by: Alexander Shiyan
    Cc: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • Private field "rtc" is not used outside "probe", so there is no reason to
    keep it.

    Signed-off-by: Alexander Shiyan
    Cc: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • Replace devm_request_mem_region() and devm_ioremap() with
    devm_ioremap_resource().

    Signed-off-by: Alexander Shiyan
    Cc: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • enable_irq_wake() might fail, if so, we will see kernel warning in resume
    entries due to it always calls disable_irq_wake().

    WARNING: at kernel/irq/manage.c:529 irq_set_irq_wake+0xc4/0xf0()
    Unbalanced IRQ 52 wake disable
    Modules linked in: ipv6 libcomposite configfs
    CPU: 0 PID: 1591 Comm: ash Tainted: G W 3.10.0-00854-gdbd86d4-dirty #100
    (unwind_backtrace+0x0/0xf8) from (show_stack+0x10/0x14)
    (show_stack+0x10/0x14) from (warn_slowpath_common+0x54/0x68)
    (warn_slowpath_common+0x54/0x68) from (warn_slowpath_fmt+0x30/0x40)
    (warn_slowpath_fmt+0x30/0x40) from (irq_set_irq_wake+0xc4/0xf0)
    (irq_set_irq_wake+0xc4/0xf0) from (sirfsoc_rtc_restore+0x30/0x38)
    (sirfsoc_rtc_restore+0x30/0x38) from (platform_pm_restore+0x2c/0x50)
    (platform_pm_restore+0x2c/0x50) from (dpm_run_callback.clone.6+0x30/0xb0)
    (dpm_run_callback.clone.6+0x30/0xb0) from (device_resume+0x88/0x134)
    (device_resume+0x88/0x134) from (dpm_resume+0x114/0x230)
    (dpm_resume+0x114/0x230) from (hibernation_snapshot+0x178/0x1d0)
    (hibernation_snapshot+0x178/0x1d0) from (hibernate+0x130/0x1dc)
    (hibernate+0x130/0x1dc) from (state_store+0xb4/0xc0)
    (state_store+0xb4/0xc0) from (kobj_attr_store+0x14/0x20)
    (kobj_attr_store+0x14/0x20) from (sysfs_write_file+0xfc/0x17c)
    (sysfs_write_file+0xfc/0x17c) from (vfs_write+0xc8/0x194)
    (vfs_write+0xc8/0x194) from (SyS_write+0x40/0x6c)
    (SyS_write+0x40/0x6c) from (ret_fast_syscall+0x0/0x30)

    To avoid unbalanced "IRQ wake disable", ensure that disable_irq_wake() is
    called only when enable_irq_wake() have been successfully enabled.

    Signed-off-by: Xianglong Du
    Signed-off-by: Barry Song
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Xianglong Du
     
  • check_rtc_access_enable() returns pointer, thus NULL should be used
    instead of 0 in order to fix the following sparse warning:

    drivers/rtc/rtc-nuc900.c:102:16: warning: Using plain integer as NULL pointer

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Fix a read of the wrong register when checking whether the RTC timer has
    reached the alarm time.

    Signed-off-by: Sangjung Woo
    Signed-off-by: Myugnjoo Ham
    Reviewed-by: Jonghwa Lee
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sangjung Woo
     
  • Stop processing hid input when registering the RTC fails and handle a NULL
    returned from devm_rtc_device_register() as a failure too.

    Signed-off-by: Alexander Holler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Holler
     
  • Palmas series device like TPS65913, TPS80036 supports the backup battery
    for powering the RTC when no other energy source is available.

    The backup battery is optional, connected to the VBACKUP pin, and can be
    nonrechargeable or rechargeable. The rechargeable battery can be charged
    from the system supply using the backup battery charger.

    Add support for enabling charging of this backup battery. Also add the DT
    binding document and the new properties to have this support.

    Signed-off-by: Laxman Dewangan
    Reviewed-by: Felipe Balbi
    Acked-by: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Laxman Dewangan
     
  • On some platforms (like AM33xx), a special register (RTC_IRQWAKEEN) is
    available to enable Alarm Wakeup feature. This register needs to be
    properly handled for the rtcwake to work properly.

    Platforms using such IP should set "ti,am3352-rtc" in rtc device dt
    compatibility node.

    Signed-off-by: Hebbar Gururaja
    Acked-by: Kevin Hilman
    Acked-by: Sekhar Nori
    Cc: Grant Likely
    Cc: Rob Herring
    Cc: Rob Landley
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hebbar Gururaja
     
  • Add RTC driver for MOXA ART SoCs.

    Signed-off-by: Jonas Jensen
    Reviewed-by: Mark Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jonas Jensen
     
  • The 'remove' function is empty and does not do anything. Delete it.

    Signed-off-by: Sachin Kamat
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sachin Kamat
     
  • In order to get the module automatically loaded by hotplug mechanisms a
    MODULE_DEVICE_TABLE is needed.

    Therefore add one.

    This makes it also possible to use a module name other than
    HID-SENSOR-2000a0 which isn't very descriptive in kernel messages.

    Signed-off-by: Alexander Holler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Holler
     
  • Convert drivers/rtc/rtc-cmos to use dev_pm_ops instead of legacy pm_ops.
    This patch depends on pnp driver bus ops change to invoke pnp_driver
    dev_pm_ops.

    Signed-off-by: Shuah Khan
    Cc: Matthew Garrett
    Cc: Leonidas Da Silva Barbosa
    Cc: Ashley Lai
    Cc: Rajiv Andrade
    Cc: Marcel Selhorst
    Cc: Sirrix AG
    Cc: Alessandro Zummo
    Cc: "Rafael J. Wysocki"
    Cc: Bjorn Helgaas
    Cc: Grant Likely
    Cc: Rob Herring
    Cc: Peter Hüwe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shuah Khan
     

05 Sep, 2013

1 commit

  • Pull PTR_RET() removal patches from Rusty Russell:
    "PTR_RET() is a weird name, and led to some confusing usage. We ended
    up with PTR_ERR_OR_ZERO(), and replacing or fixing all the usages.

    This has been sitting in linux-next for a whole cycle"

    [ There are still some PTR_RET users scattered about, with some of them
    possibly being new, but most of them existing in Rusty's tree too. We
    have that

    #define PTR_RET(p) PTR_ERR_OR_ZERO(p)

    thing in , so they continue to work for now - Linus ]

    * tag 'PTR_RET-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    GFS2: Replace PTR_RET with PTR_ERR_OR_ZERO
    Btrfs: volume: Replace PTR_RET with PTR_ERR_OR_ZERO
    drm/cma: Replace PTR_RET with PTR_ERR_OR_ZERO
    sh_veu: Replace PTR_RET with PTR_ERR_OR_ZERO
    dma-buf: Replace PTR_RET with PTR_ERR_OR_ZERO
    drivers/rtc: Replace PTR_RET with PTR_ERR_OR_ZERO
    mm/oom_kill: remove weird use of ERR_PTR()/PTR_ERR().
    staging/zcache: don't use PTR_RET().
    remoteproc: don't use PTR_RET().
    pinctrl: don't use PTR_RET().
    acpi: Replace weird use of PTR_RET.
    s390: Replace weird use of PTR_RET.
    PTR_RET is now PTR_ERR_OR_ZERO(): Replace most.
    PTR_RET is now PTR_ERR_OR_ZERO

    Linus Torvalds
     

04 Sep, 2013

1 commit

  • Pull driver core patches from Greg KH:
    "Here's the big driver core pull request for 3.12-rc1.

    Lots of tiny changes here fixing up the way sysfs attributes are
    created, to try to make drivers simpler, and fix a whole class race
    conditions with creations of device attributes after the device was
    announced to userspace.

    All the various pieces are acked by the different subsystem
    maintainers"

    * tag 'driver-core-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (119 commits)
    firmware loader: fix pending_fw_head list corruption
    drivers/base/memory.c: introduce help macro to_memory_block
    dynamic debug: line queries failing due to uninitialized local variable
    sysfs: sysfs_create_groups returns a value.
    debugfs: provide debugfs_create_x64() when disabled
    rbd: convert bus code to use bus_groups
    firmware: dcdbas: use binary attribute groups
    sysfs: add sysfs_create/remove_groups for when SYSFS is not enabled
    driver core: add #include to core files.
    HID: convert bus code to use dev_groups
    Input: serio: convert bus code to use drv_groups
    Input: gameport: convert bus code to use drv_groups
    driver core: firmware: use __ATTR_RW()
    driver core: core: use DEVICE_ATTR_RO
    driver core: bus: use DRIVER_ATTR_WO()
    driver core: create write-only attribute macros for devices and drivers
    sysfs: create __ATTR_WO()
    driver-core: platform: convert bus code to use dev_groups
    workqueue: convert bus code to use dev_groups
    MEI: convert bus code to use dev_groups
    ...

    Linus Torvalds
     

14 Aug, 2013

1 commit


01 Aug, 2013

1 commit


30 Jul, 2013

1 commit


16 Jul, 2013

1 commit


11 Jul, 2013

1 commit

  • Pull MFD update from Samuel Ortiz:
    "For the 3.11 merge we only have one new MFD driver for the Kontron
    PLD.

    But we also have:
    - Support for the TPS659038 PMIC from the palmas driver.
    - Intel's Coleto Creek and Avoton SoCs support from the lpc_ich
    driver.
    - RTL8411B support from the rtsx driver.
    - More DT support for the Arizona, max8998, twl4030-power and the
    ti_am335x_tsadc drivers.
    - The SSBI driver move under MFD.
    - A conversion to the devm_* API for most of the MFD drivers.
    - The twl4030-power got split from twl-core into its own module.
    - A major ti_am335x_adc cleanup, leading to a proper DT support.
    - Our regular arizona and wm* updates and cleanups from the Wolfson
    folks.
    - A better error handling and initialization, and a regulator
    subdevice addition for the 88pm80x driver.
    - A bulk platform_set_drvdata() call removal that's no longer need
    since commit 0998d0631001 ("device-core: Ensure drvdata = NULL when
    no driver is bound")

    * tag 'mfd-3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (102 commits)
    mfd: sec: Provide max_register to regmap
    mfd: wm8994: Remove duplicate check for active JACKDET
    MAINTAINERS: Add include directory to MFD file patterns
    mfd: sec: Remove fields not used since regmap conversion
    watchdog: Kontron PLD watchdog timer driver
    mfd: max8998: Add support for Device Tree
    regulator: max8998: Use arrays for specifying voltages in platform data
    mfd: max8998: Add irq domain support
    regulator: palmas: Add TPS659038 support
    mfd: Kontron PLD mfd driver
    mfd: palmas: Add TPS659038 PMIC support
    mfd: palmas: Add SMPS10_BOOST feature
    mfd: palmas: Check if irq is valid
    mfd: lpc_ich: iTCO_wdt patch for Intel Coleto Creek DeviceIDs
    mfd: twl-core: Change TWL6025 references to TWL6032
    mfd: davinci_voicecodec: Fix build breakage
    mfd: vexpress: Make the driver optional for arm and arm64
    mfd: htc-egpio: Use devm_ioremap_nocache() instead of ioremap_nocache()
    mfd: davinci_voicecodec: Convert to use devm_* APIs
    mfd: twl4030-power: Fix relocking on error
    ...

    Linus Torvalds
     

10 Jul, 2013

1 commit


04 Jul, 2013

11 commits

  • On CSR SiRFprimaII/atlasVI, there is a programmable 16-bit divider
    (RTC_DIV) that divides the input 32.768KHz clock to the frequency that
    users need (E.g. 1 Hz). The divided real-time clock will be used to
    drive a 32-bit counter (RTC_COUNTER) that provides users with the actual
    time.

    In each cycle of the divided real-time clock, there is a Hertz interrupt
    generated to the RISC. Users can also configure an alarm (RTC_ALARM).
    When RTC_COUNTER matches the alarm, there will be an alarm interrupt
    generated to the RISC.

    The system RTC can generate an alarm wake-up signal to notify the power
    controller to wake up from power saving mode.

    Signed-off-by: Xianglong Du
    Signed-off-by: Barry Song
    Cc: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Xianglong Du
     
  • Use module_platform_driver_probe() macro which makes the code smaller and
    simpler.

    Signed-off-by: Fabio Porcedda
    Cc: Alessandro Zummo
    Cc: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabio Porcedda
     
  • rtc-omap driver modules is used both by OMAP1/2, Davinci SoC platforms.

    However, rtc wake support on OMAP1 is broken. Hence the
    device_init_wakeup() was removed from rtc-omap driver and moved to
    platform board files that supported it (DA850/OMAP-L138). [1]

    However, recently [2] it was suggested that driver should always do a
    device_init_wakeup(dev, true). Platforms that don't want/need
    wakeup support can disable it from userspace via:

    echo disabled > /sys/devices/.../power/wakeup

    Also, with the new DT boot-up, board file doesn't exist and hence there
    is no way to have device wakeup support rtc.

    The fix for above issues, is to hard code device_init_wakeup() inside
    driver and let platforms that don't need this, handle it through the
    sysfs power entry.

    [1]
    https://patchwork.kernel.org/patch/136731/

    [2]
    http://www.mail-archive.com/davinci-linux-open-source@linux.
    davincidsp.com/msg26077.html

    Signed-off-by: Hebbar Gururaja
    Cc: Alessandro Zummo
    Acked-by: Kevin Hilman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hebbar Gururaja
     
  • Added support for NXP PCF2127 RTC (i2c).

    [akpm@linux-foundation.org: fix typo, fix warnings]
    Signed-off-by: Renaud Cerrato
    Cc: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Renaud Cerrato
     
  • Enable dev as wakeup device before calling rtc_device_register(), so that
    it can create the "wakealarm" sysfs.

    Signed-off-by: Wei Ni
    Acked-by: Laxman Dewangan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wei Ni
     
  • Convert drivers/rtc/class to use dev_pm_ops for power management and
    remove Legacy PM ops hooks. With this change, rtc class registers
    suspend/resume callbacks via class->pm (dev_pm_ops) instead of Legacy
    class->suspend/resume. When __device_suspend() runs call-backs, it will
    find class->pm ops for the rtc class.

    Signed-off-by: Shuah Khan
    Signed-off-by: Jingoo Han
    Cc: Shuah Khan
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shuah Khan
     
  • The usage of strict_strtoul() is not preferred, because strict_strtoul()
    is obsolete. Thus, kstrtoul() should be used.

    Signed-off-by: Jingoo Han
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • If rtc->irq_task is non-NULL and task is NULL, they always
    rtc_irq_set_freq(), whenever err is set to -EBUSY it will then immediately
    be set to -EACCES, misleading the caller as to the underlying problem.

    Signed-off-by: Chris Brand
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Brand
     
  • Use module_platform_driver() to register the platform driver.

    Signed-off-by: Peter Ujfalusi
    Acked-by: Kevin Hilman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Ujfalusi
     
  • Initialize the rtc_reg_map in platform_driver's probe function instead at
    module_init time. This way we can make sure that the twl-core has been
    already probed and initialized (twl_priv->twl_id is valid) since the
    platform device for the RTC driver will be created by the twl-core after
    it finished its init.

    Reported-by: Christoph Fritz
    Signed-off-by: Peter Ujfalusi
    Tested-by: Kevin Hilman
    Tested-by: Grygorii Strashko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Ujfalusi
     
  • The bios may clear the rtc control register when resuming the system. Since the
    cmos interrupt handler may now be run before the rtc_cmos is resumed, this can
    cause the interrupt handler to ignore an alarm since the alarm bit is not set in
    the rtc control register. To work around this, check if the rtc_cmos is
    suspended and use the stored value for the rtc control register.

    Signed-off-by: Derek Basehore
    Reviewed-by: Sameer Nanda
    Cc: Alessandro Zummo
    Cc: Jingoo Han
    Cc: Steven Rostedt
    Cc: John Stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Derek Basehore