04 Jul, 2013
40 commits
- 
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 - 
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 - 
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 - 
Currently, the RTC IRQ is never wakeup-enabled so is not capable of
bringing the system out of suspend.On OMAP platforms, we have gotten by without this because the TWL RTC is
on an I2C-connected chip which is capable of waking up the OMAP via the IO
ring when the OMAP is in low-power states.However, if the OMAP suspends without hitting the low-power states (and
the IO ring is not enabled), RTC wakeups will not work because the IRQ is
not wakeup enabled.To fix, ensure the RTC IRQ is wakeup enabled whenever the RTC alarm is
set.Signed-off-by: Kevin Hilman
Cc: Alessandro Zummo
Cc: Tony Lindgren
Cc: Grygorii Strashko
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
Use of PTR_RET() simplifies the code.
Signed-off-by: Sachin Kamat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
Use of PTR_RET() simplifies the code.
Signed-off-by: Sachin Kamat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
Use of PTR_RET() simplifies the code.
Signed-off-by: Sachin Kamat
Cc: Thomas Bogendoerfer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
Use of PTR_RET() simplifies the code.
Signed-off-by: Sachin Kamat
Cc: Roman Fietze
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
Use of PTR_RET() simplifies the code.
Signed-off-by: Sachin Kamat
Cc: David Dajun Chen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.Signed-off-by: Jingoo Han
Cc: Grant Likely
Cc: Rob Herring
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
This chip has a control register and can prevent altering saved clock.
Without this patch we could have:(arm)root@pac14:~# date
Tue May 21 03:08:27 MSK 2013
(arm)root@pac14:~# /etc/init.d/hwclock.sh show
Tue May 21 11:13:58 2013 -0.067322 seconds
(arm)root@pac14:~# /etc/init.d/hwclock.sh stop
[info] Saving the system clock.
[info] Hardware Clock updated to Tue May 21 03:09:01 MSK 2013.
(arm)root@pac14:~# /etc/init.d/hwclock.sh show
Tue May 21 11:14:15 2013 -0.624272 secondsThe patch enables write access to rtc before the driver tries to write
time and re-disables when time data is written.Signed-off-by: Sergey Yanovich
Acked-by: Marc Zyngier
Cc: Alessandro Zummo
Cc: Sachin Kamat
Cc: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
Android expects the RTC to have second resolution. On ab8540 cut2 RTC
block has a new register which allows setting seconds for wakeup alarms.Existing registers (minutes hi, mid and low) have seen their offsets
changed. Here is the new mapping:
* AlarmSec (A) 0x22
* AlarmMinLow (M) from 0x8 to 0x23
* AlarmMinMid (M) from 0x9 to 0x24
* AlarmMinHigh (M) from 0xA to 0x25Signed-off-by: Julien Delacou
Signed-off-by: Alexandre Torgue
Acked-by: Lee Jones
Acked-by: Linus Walleij
Cc: Samuel Ortiz
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Acked-by: Mark Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Laxman Dewangan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Martyn Welch
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Acked-by: Atsushi Nemoto
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Torben Hohn
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Gregory Hermant
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Nobuhiro Iwamatsu
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Acked-by: Geoff Levand
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Acked-by: Thierry Reding
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Chiwoong Byun
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Dale Farnsworth
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Kim B. Heino
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Kyle McMartin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Thomas Bogendoerfer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Nikolaus Voss
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Roman Fietze
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Sergey Lapin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Mike Rapoport
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: dann frazier
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds - 
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.Signed-off-by: Sachin Kamat
Cc: Mark Jackson
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds