summaryrefslogtreecommitdiff
path: root/drivers/rtc
AgeCommit message (Collapse)Author
2012-09-06rtc: max77663: fix alarm reading bugDaniel Fu
When reading alarm of RTC-max77663, it didn't set alrm->enabled correctly, if irq is masked, means disable alarm, alrm->enabled should be set to 0, else it should be 1. Change-Id: Id0b1ffd9a816643712f33624d7d52cbe7b66b3c3 Signed-off-by: Daniel Fu <danifu@nvidia.com> Reviewed-on: http://git-master/r/129593 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-09-05rtc: max77663: Set Alarm wday to its reset valueDaniel Fu
The wday is configured only when disabled alarm. When enable alarm, set it to its default reset value 0x01, and not enable it, to prevent an error happened when re-read the alarm value into the virtualized generic layer at boot up in reading alarm setting of RTC. Bug 1034871 Change-Id: I8bfa997653edaaa286cf768c1827b5ab986f52cc Signed-off-by: Daniel Fu <danifu@nvidia.com> Reviewed-on: http://git-master/r/129398 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Jinyoung Park <jinyoungp@nvidia.com>
2012-08-07rtc: tps80031: register as mfd sub deviceLaxman Dewangan
register RTC driver of TPS80031 as mfd sub driver in place of adding it as a sub devices. This is inline with the mfd driver policy. Change-Id: I2f9c13478a1e85c9670dd7bc576ec761f2e24733 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/121133 Reviewed-by: Automatic_Commit_Validation_User
2012-07-31rtc/tegra: treat compilation warning as errorschowdary
- Add compilation flag to treat warning as error bug 949219 Change-Id: Ic52b13519b817ab3861bd56692ec6b6da60edc48 Signed-off-by: schowdary <schowdary@nvidia.com>
2012-07-26rtc: tps6591x: Prevent wrong date settingPreetham Chandru
This CL handles the following: 1. Prevents setting of wrong date in tps6591x_rtc_set_time(). For example the following case was not handled in rtc driver: if hwclock command wanted to set 31/Dec/1999 then our RTC driver was setting the date to 31/Dec/2099 and later on when hwclock read the date back it was getting a invalid date. Also, the hwclock command can only handle date upto the year 2038. 2. Sets STOP_RTC bit to one when the driver is initialized Bug 1012914 Bug 1017647 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Change-Id: If8abfebe3ee6da05498deb38d7247ab265729c0c Reviewed-on: http://git-master/r/117298 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Kiran Adduri <kadduri@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-07-20rtc: set alarm logging enableBitan Biswas
Set alarm logs enabled to help understand suspend stress failures Change-Id: I60644ff0e3fea813ae1140be1b71fc2694d95709 Signed-off-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-on: http://git-master/r/115361 Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jinyoung Park <jinyoungp@nvidia.com> Tested-by: Jinyoung Park <jinyoungp@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-06-27rtc: max77663: avoid powering on system by RTC alarm.Jinyoung Park
Clean RTC alarm and don't set new alarm during shutdown process. After powering off, we do not want Maxim PMIC automaticly boots caused by RTC alarm. Bug 985193 Signed-off-by: Haley Teng <hteng@nvidia.com> Reviewed-on: http://git-master/r/104773 (cherry picked from commit 0bd7f3163f73ba3cf87dadd6bc6fa35a538ac153) Change-Id: I7209407503b9f51dfb5b8f59d05c6fa8f04c6069 Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/110858 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-06-01rtc: tps80031: add msecure supportTom Cherry
Bug 986402 Change-Id: Id12540e31f8d7d9a04d764ed012310a685eafb8d Signed-off-by: Tom Cherry <tcherry@nvidia.com> Reviewed-on: http://git-master/r/104269 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-05-22rtc: tps6591x: Limiting years in the 0 - 99 rangeVenu Byravarasu
As RTC can store year in the 0 - 99 range only, handling it accordingly bug 985890 Change-Id: Idcfb29028f482283ae2658579a3283c7d4f230f1 Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/102798 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-05-15rtc: tps6591x: Enable alarm interrupt for RTC_WKALM_SET ioctlPreetham Chandru
RTC_WKALM_SET ioctl should do two things: 1. Set alarm value 2. Enable alarm irq In the current implementation for RTC_WKALM_SET ioctl we are only setting the alarm value but not enabling the alarm irq and hence the system is not waking from lp0 state once the set alarm value expiries. For RTC_WKALM_SET ioctl, alarm->enabled will be set to one from userspace. So based on this condition we can differentiate between RTC_WKALM_SET & RTC_ALM_SET and accordingly enable alarm irq. Bug 978205 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Change-Id: Ia35192e691ca116b13093f52873020f67c5c2f8d Reviewed-on: http://git-master/r/101447 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-03-30rtc: tps80031: Enable RTC interrupt appropriatelyVenu Byravarasu
Observed interrupt not getting enabled properly. hence fixing it. bug 937221 Change-Id: If852c9cd40fc98711fe12a124b533ee8ee99eb3c Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/83992 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-03-23rtc: tps80031: Fixing POR month comparisonVenu Byravarasu
As month calculation is modified to fix bug 931452 and POR comparison for month is not updated, fixing it. bug 951622 Change-Id: Ifd906b48c51b155809ed88892579e9dd14abd5a0 Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/89663 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: David Schalig <dschalig@nvidia.com> Tested-by: David Schalig <dschalig@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-03-14rtc: max77663: Use alrm->enabled flag to enable rtc alarm irqJinyoung Park
Use alrm->enabled flag to enable rtc alarm irq in rtc_set_alrm function. Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/88048 (cherry picked from commit 41e8686fc049fbdc0e83ecfa3f68da06ff813b99) Change-Id: Ieb3b9863233b9d5bfc06459ef479c47a5e700d3b Reviewed-on: http://git-master/r/89739 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2012-03-14rtc: max77663: Update read buffer before read RTC IRQ status registerJinyoung Park
To get actual current RTC IRQ status, it have to update read buffer before read RTC IRQ status register. Bug 918156 Bug 924219 Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/88037 (cherry picked from commit 50528b7d136624ef0014deecba18d7bd9b8d8cc8) Change-Id: I5ffcc9b24fec0f3688f641ab9f7cf82a69d77aeb Reviewed-on: http://git-master/r/89738 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2012-02-29rtc: max8907c: correct month index calculation.Joseph Yoon
max8907c is returning Jan as 1 from rtc register. but kernel is assuming Jan as 0. so correct month index. Change-Id: I9b77b89952442891f53ebd6355352f36a07521cd Signed-off-by: Joseph Yoon <tyoon@nvidia.com> Reviewed-on: http://git-master/r/86561 Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2012-02-09rtc: tps6591x: Fixing month register program errorVenu Byravarasu
The month field of tm structure managed by kernel, expects a value between 0 to 11. However, TPS6591x RTC month register expects the month range to be between 1 to 12. Hence fixing it. Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Change-Id: I054de10dcd58497167c8460fe935325cee3c582f Reviewed-on: http://git-master/r/79930 Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-02-09rtc: tps80031: Fixing month register program errorVenu Byravarasu
The month field of tm structure managed by kernel, expects a value between 0 to 11. However, TPS80031 RTC month register expects the month range to be between 1 to 12. Hence fixing it. bug 931452 Change-Id: Ie208c50b316e452e50eb2b607bafe83cb227eaea Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/79928 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-01-24Merge branch 'linux-3.1.y' into android-tegra-nv-3.1Varun Wadekar
Linux 3.1.10 Change-Id: I465d184c492e8041dd0cd90f2cb70fde17ba7118 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-18drivers/rtc/interface.c: fix alarm rollover when day or month is out-of-rangeBen Hutchings
commit e74a8f2edb92cb690b467cea0ab652c509e9f624 upstream. Commit f44f7f96a20a ("RTC: Initialize kernel state from RTC") introduced a potential infinite loop. If an alarm time contains a wildcard month and an invalid day (> 31), or a wildcard year and an invalid month (>= 12), the loop searching for the next matching date will never terminate. Treat the invalid values as wildcards. Fixes <http://bugs.debian.org/646429>, <http://bugs.debian.org/653331> Reported-by: leo weppelman <leoweppelman@googlemail.com> Reported-by: "P. van Gaans" <mailme667@yahoo.co.uk> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Stultz <john.stultz@linaro.org> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-11Revert "rtc: Disable the alarm in the hardware"Linus Torvalds
commit 157e8bf8b4823bfcdefa6c1548002374b61f61df upstream. This reverts commit c0afabd3d553c521e003779c127143ffde55a16f. It causes failures on Toshiba laptops - instead of disabling the alarm, it actually seems to enable it on the affected laptops, resulting in (for example) the laptop powering on automatically five minutes after shutdown. There's a patch for it that appears to work for at least some people, but it's too late to play around with this, so revert for now and try again in the next merge window. See for example http://bugs.debian.org/652869 Reported-and-bisected-by: Andreas Friedrich <afrie@gmx.net> (Toshiba Tecra) Reported-by: Antonio-M. Corbi Bellot <antonio.corbi@ua.es> (Toshiba Portege R500) Reported-by: Marco Santos <marco.santos@waynext.com> (Toshiba Portege Z830) Reported-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr> (Toshiba Portege R830) Cc: Jonathan Nieder <jrnieder@gmail.com> Requested-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: If63f475a7edbe389ceb01cd430efb2d2a127eb6e Reviewed-on: http://git-master/r/74231 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-11rtc: m41t80: Workaround broken alarm functionalityJohn Stultz
commit c3b79770e51ab1fd4201f3b54edf30113b9ce74f upstream. The m41t80 driver can read and set the alarm, but it doesn't seem to have a functional alarm irq. This causes failures when the generic core sees alarm functions, but then cannot use them properly for things like UIE mode. Disabling the alarm functions allows proper error reporting, and possible fallback to emulated modes. Once someone fixes the alarm irq functionality, this can be restored. CC: Matt Turner <mattst88@gmail.com> CC: Nico Macrionitis <acrux@cruxppc.org> CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Reported-by: Matt Turner <mattst88@gmail.com> Reported-by: Nico Macrionitis <acrux@cruxppc.org> Tested-by: Nico Macrionitis <acrux@cruxppc.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: Idbb49a2b153a9da2a281e927f14e4a15a676987d Reviewed-on: http://git-master/r/74157 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-06Revert "rtc: Disable the alarm in the hardware"Linus Torvalds
commit 157e8bf8b4823bfcdefa6c1548002374b61f61df upstream. This reverts commit c0afabd3d553c521e003779c127143ffde55a16f. It causes failures on Toshiba laptops - instead of disabling the alarm, it actually seems to enable it on the affected laptops, resulting in (for example) the laptop powering on automatically five minutes after shutdown. There's a patch for it that appears to work for at least some people, but it's too late to play around with this, so revert for now and try again in the next merge window. See for example http://bugs.debian.org/652869 Reported-and-bisected-by: Andreas Friedrich <afrie@gmx.net> (Toshiba Tecra) Reported-by: Antonio-M. Corbi Bellot <antonio.corbi@ua.es> (Toshiba Portege R500) Reported-by: Marco Santos <marco.santos@waynext.com> (Toshiba Portege Z830) Reported-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr> (Toshiba Portege R830) Cc: Jonathan Nieder <jrnieder@gmail.com> Requested-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-06rtc: m41t80: Workaround broken alarm functionalityJohn Stultz
commit c3b79770e51ab1fd4201f3b54edf30113b9ce74f upstream. The m41t80 driver can read and set the alarm, but it doesn't seem to have a functional alarm irq. This causes failures when the generic core sees alarm functions, but then cannot use them properly for things like UIE mode. Disabling the alarm functions allows proper error reporting, and possible fallback to emulated modes. Once someone fixes the alarm irq functionality, this can be restored. CC: Matt Turner <mattst88@gmail.com> CC: Nico Macrionitis <acrux@cruxppc.org> CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Reported-by: Matt Turner <mattst88@gmail.com> Reported-by: Nico Macrionitis <acrux@cruxppc.org> Tested-by: Nico Macrionitis <acrux@cruxppc.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-05Linux 3.1.7Varun Wadekar
Change-Id: I99507d7cfdcee064f808856dc2ce99d806fd864f
2011-12-30rtc: ricoh583: Fixing month & year calculationsvenu byravarasu
Changes done: 1. As Ricoh RTC month range is between 1 - 12 instead of 0 - 11, fixing it. 2. Filling only two valid BCD digits in the year fields. 3. Enabling YAL alone, with workaround. 4. Code clean up based on check patch warnings. bug 902137 Change-Id: I497ac5d04230e87baa776e84f6eafa8a28ae54ea Signed-off-by: venu byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/72082 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2011-12-21drivers/rtc/rtc-s3c.c: fix driver clock enable/disable balance issuesJonghwan Choi
commit 2dbcd05f1e9e0932833d16dab1696176fc164b07 upstream. If an error occurs after the clock is enabled, the enable/disable state can become unbalanced. Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-21rtc: tps80031: fix missing curly bracketsDavid Schalig
Bug 914750 Bug 914753 Change-Id: I5aef20ca4925057a5d9d0932c9267a40c732ef4a Signed-off-by: David Schalig <dschalig@nvidia.com> Reviewed-on: http://git-master/r/69720 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2011-12-21rtc: ricoh583: add ricoh583 PMU RTC drivervenu byravarasu
Add Ricoh583 PMU RTC driver along with make files. bug 902137 Change-Id: If9a62ca897e4d41735c7638fff17c7b7570bc3c6 Signed-off-by: venu byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/70017 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2011-12-14Merge branch 'linux-3.1.5' into android-tegra-nv-3.1Varun Wadekar
Conflicts: arch/arm/Kconfig Change-Id: If8aaaf3efcbbf6c9017b38efb6d76ef933f147fa Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-12-09rtc: Fix some bugs that allowed accumulating time drift in suspend/resumeArve Hjønnevåg
commit 6a8943d9ec2567572fca25cf69ad45844d0141a3 upstream. The current code checks if abs(delta_delta.tv_sec) is greater or equal to two before it discards the old delta value, but this can trigger at close to -1 seconds since -1.000000001 seconds is stored as tv_sec -2 and tv_nsec 999999999 in a normalized timespec. rtc_resume had an early return check if the rtc value had not changed since rtc_suspend. This effectivly stops time for the duration of the short sleep. Check if sleep_time is positive after all the adjustments have been applied instead since this allows the old_system adjustment in rtc_suspend to have an effect even for short sleep cycles. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09rtc: Disable the alarm in the hardwareRabin Vincent
commit c0afabd3d553c521e003779c127143ffde55a16f upstream. Currently, the RTC code does not disable the alarm in the hardware. This means that after a sequence such as the one below (the files are in the RTC sysfs), the box will boot up after 2 minutes even though we've asked for the alarm to be turned off. # echo $((`cat since_epoch`)+120) > wakealarm # echo 0 > wakealarm # poweroff Fix this by disabling the alarm when there are no timers to run. Cc: John Stultz <john.stultz@linaro.org> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08rtc: max77663: Disable alarm wakeupJin Park
It should be disabled alarm wakeup to wakeup from sleep by EN1 input signal. Bug 849360 Bug 903301 Reviewed-on: http://git-master/r/66321 (cherry picked from commit 4338d09efe5a58e126d92c794aa641bdfa7f5cd0) Change-Id: If59631bf662f6c4812dcd24cbca65750d5e5b117 Signed-off-by: Jin Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/67382 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-11-30Merge branch 'korg-android-tegra-3.1' into after-upstream-androidDan Willemsen
Conflicts: arch/arm/mach-tegra/Kconfig arch/arm/mach-tegra/board-ventana.c drivers/misc/Kconfig drivers/video/tegra/dc/hdmi.c Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
2011-11-30rtc: tps6586x: Fix for proper wakealarmWei Ni
In the driver probe function, call device_init_wakeup() before registering rtc device, so that wakealarm sysfs will be created. BUG=889820 Change-Id: I957fdffb02cd7e43dd96db0794e2e9f8dc7bd3ee Signed-off-by: Wei Ni <wni@nvidia.com> Reviewed-on: http://git-master/r/58937 Reviewed-by: Allen Martin <amartin@nvidia.com> Reviewed-on: http://git-master/r/63244 Rebase-Id: R9e078974bd9e773443b19492b83d25694f4582c2
2011-11-30rtc: max77663: Update driver for alarm interruptMin-wuk Lee
Updated rtc-max77663 driver for alarm interrupt. - Enable alarm for sec, min, hour, mday, month and year except wday, because sometimes wday value is not matched with requested alarm time. - Set alarm to wake-up event from sleep mode. - Add max77663_rtc_irq_mask and max77663_rtc_irq_unmask functions. - Fix incorrected wday calculation. - Clean-up the codes. Bug 849360 Original Author: Jinyoung Park Reviewed-on: http://git-master/r/60655 (cherry picked from commit 80acd66deffa20a391e5324fc9038b7fab42d08d) Change-Id: Ibd637eac7f94ebc920873c652f7776072e2832d1 Reviewed-on: http://git-master/r/62380 Reviewed-on: http://git-master/r/63763 Reviewed-by: Min-wuk Lee <mlee@nvidia.com> Tested-by: Min-wuk Lee <mlee@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: Rfc8fb0c75d7514a4f0aeca69e9478a0d6572fa99
2011-11-30rtc: max77663: Cleanup update_irq_enable operationJin Park
After update rtc core, the update_irq_enable operation was removed and no one calls rtc_class_ops->update_irq_enable() anymore. Cleanup update_irq_enable operation in rtc-max77663 driver. Change-Id: I0a9c6d6e348246f62109d03e92fb72ef2fe45157 Signed-off-by: Jin Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/54685 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: Rf73a6a28d6a39f8e2cf10a173a8506648ba60af2
2011-11-30rtc: max77663: Added delay for awaiting buffer updateJin Park
Added 14ms delay for awaiting buffer update. So there is no need to check update buffer flag bit on RTC_UPDATE1 register. Bug 849360 Signed-off-by: Jin Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/50987 (cherry picked from commit 1879feec7231ec082e6133e2172566ad4ee43f66) Change-Id: If54c6ea3744140b9886ace26f335b0c0ecb72bb2 Reviewed-on: http://git-master/r/54635 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R7af025ac026c58ad7aa3d97038c04eb873658eca
2011-11-30rtc: max77663: Add MAX77663 RTC driverJin Park
Add RTC driver for Maxim PMU MAX77663. Bug 849360 Original-Change-Id: Ia7c910a852527f6a7bf5d2622cb1f76fd72222cd Signed-off-by: Jin Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/49584 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: R716e08b9f98c3be480877009bef0db99ccf8043e
2011-11-30rtc: tps80031: Clearing Alarm interrupt statusvenu byravarasu
Sometimes it is observed that the POR value of RTC interrupt register is having Alarm set. Hence clearing it before enabling RTC interrupt. bug 867362 Original-Change-Id: Id84db407880d4c1f5fb3023218c2b21e82cf515d Reviewed-on: http://git-master/r/49372 Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Tested-by: Bitan Biswas <bbiswas@nvidia.com> Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Rebase-Id: Reb9a71a090477a0c7b565f9fa188f25e7679fa15
2011-11-30rtc: tps6591x: Clear interrupt when probing deviceBo Yan
Make sure alarm interrupt is cleared during device probing. bug 867362 Original-Change-Id: Iad33c0e0715de2ec68291a57c2a55d1ad1198565 Reviewed-on: http://git-master/r/49302 Reviewed-by: Bo Yan <byan@nvidia.com> Tested-by: Bo Yan <byan@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Rebase-Id: R5574970052e9a1c1334003e0f03e1d62c7ee5109
2011-11-30rtc: max8907c: fix startup crashPrashant Gaikwad
The rtc_device_register() call has changed semantics so that it will immediately call out to rtc_read_alarm() and since the callbacks require the drvdata to be set, we need to set it before the registration call to valid NULL dereference. Based on 21b398e9670f0bb8f05b7b4cd03e018e8a0b7522 Change-Id: I4960a180ffb63415310bf9fce05de155d0633337 Reviewed-on: http://git-master/r/49460 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: Rb5896ff9928b249d97c263e1647ca451e0380b74
2011-11-30rtc: tps6591x: Registering PMU RTC as a wake sourcevenu byravarasu
Without this registration, "wakealarm" node doesnot get created under the sysfs path /sys/class/rtc/rtc0. This is used for setting RTC alarms using sysfs. bug 846920 Original-Change-Id: I287448354612d526f4b96294fef24f5669949130 Reviewed-on: http://git-master/r/44507 Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Rebase-Id: Rab6c47661fad4fd823fb8bb2c7aa5b8b210f23a7
2011-11-30rtc : tps6586x: move NULL checking to the front.Jubeom Kim
Reviewed-on: http://git-master/r/37866 (cherry picked from commit 4299db4686321fb3017f9118a36610898f172639) Original-Change-Id: Icbfef4dc5604506d30592317c94a7d4fc1bcf16c Reviewed-on: http://git-master/r/39582 Tested-by: Jubeom Kim <jubeomk@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R7d8f5628cde155fe54d31f37eeacb4b5bb4962d1
2011-11-30rtc: tegra: Use new Tegra platform types.Yudong Tan
This change is needed to support three platforms, silicon, fpga and simulation. Change-Id: I1e132fd744e1fe716c3098b117e38e3c77678b49 Reviewed-on: http://git-master/r/36352 Reviewed-by: Mark Stadler <mastadler@nvidia.com> Tested-by: Yudong Tan <ytan@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: Rb4c122fc6b87240fc5a14f1addb4d22e121a84a7
2011-11-30rtc: tps80031: Adding driver for TI PMU RTC 80031venu byravarasu
With this change, RTC driver for TI PMU 80031 is being checked in. bug 833336 Original-Change-Id: If4789a5dd49163d2391ab016845ff5807c061f12 Reviewed-on: http://git-master/r/34453 Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Thomas Cherry <tcherry@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: R98c49f456537e65d02460e738029673e7eea1bc0
2011-11-30rtc: tps6586x: fix error in setting alarm1Ken Chang
Alarm1 expiration time is set based on rtc value. Should not compare the absolute rtc value with the valid range of alarm1 directly, expiration time from now is used instead. Bug 832563 Original-Change-Id: I338e7ee684b5cad6b2fba99b5ac4ec6cff9b75cd Reviewed-on: http://git-master/r/34295 Tested-by: Ken Chang <kenc@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-by: Yu-Fong (Foster) Cho <ycho@nvidia.com> Rebase-Id: Rb4f233478ea418ddf5a7ae9e1d782dbc5c97cbde
2011-11-30rtc: tps6586x: fix alarm1 overflowKen Chang
tps6586 alarm1 has a 24-bit register, however LSB 10 bits [9:0] are used as a counter of ticks per second. Therefore, the valid range is within 0x3FFF seconds (14-bit width). Check the value set to alarm1. Change the value to (current rtc[23:10] minus 1) if the target value is larger than 0x3FFF (4 hours). If no such fix, there might be overflow issues when alarm1 is enabled, and the system might wakes up unexpectedly. This change is to keep the system in suspend state as long as possible if alarm is enabled. Bug 827056 Original-Change-Id: Icb310132e08b56642179d92dfe00a34bfd28982a Reviewed-on: http://git-master/r/32700 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Ken Chang <kenc@nvidia.com> Reviewed-by: Yu-Fong (Foster) Cho <ycho@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-by: ChihJen Hsu <chhsu@nvidia.com> Rebase-Id: Receaa52de2019ef4a02403312afa1385e5642caf
2011-11-30rtc: tps6591x: enabling backup battery chargingvenu byravarasu
With this change: 1. Enabled backup battery charging 2. Setting RTC default time, if it is not set previously. bug 796507 Original-Change-Id: Idffb99f24718cd8b15f38b6ca8109969ef47be81 Reviewed-on: http://git-master/r/31522 Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Gaurav Sarode <gsarode@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Narendra Damahe <ndamahe@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: R6a38294f28a7efb288b89b5d8ad39daae73bd5ca
2011-11-30rtc: tps6591x: setting default date & timevenu byravarasu
Following changes are done: 1. Set default date, if platform data is incorrect. 2. Added an offset to adjust the RTC time to show the correct date in the time stamp. Original-Change-Id: I69d9632a3db4a64b61f68bf84098fd00cb95bed7 Reviewed-on: http://git-master/r/27761 Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Original-Change-Id: I875005353c75567821f0497a4ee47dc087d8e322 Rebase-Id: R98eaf3a015ef7614d7ed8c096f51ad69931ea223
2011-11-30rtc: tps6591x: wake up from suspend on alarmvenu byravarasu
Changes required for waking up system, when RTC alarm is triggered. bug 793949 Original-Change-Id: Idcc536a819e977fe35bafeebdffddf57d5388f21 Reviewed-on: http://git-master/r/27359 Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Original-Change-Id: I68bb747cb965d14af9918ad6086ac2e9888f7136 Rebase-Id: Ra2e528aeb4727392e17ee911d673cc49e9d03068